Repository navigation
fix(gui-plugins): support insecure file picker - #59860
Open
Aeromtrich wants to merge 1 commit into
Open
Aeromtrich wants to merge 1 commit into
Aeromtrich wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Looks good. I reproduced the bug on the base by running the web UI from source on a LAN IP over plain HTTP: clicking Open file throws crypto.randomUUID is not a function and no tab opens. With this change, the Open file tab opens and shows the file picker. The new Playwright regression test passes here and fails on the base, and tsc -b in packages/gui-plugins passes.
Public API is unchanged.
The fallback key only has to be unique among the open tabs and keeps the open: prefix that isLauncher checks, so a short random ID is fine there. No blocking concerns.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Issue for this PR
Fixes #59791
Type of change
What does this PR do?
Opening a new file picker on a non-localhost HTTP origin could throw because
crypto.randomUUIDis unavailable outside a secure context. Use a non-cryptographic fallback only for the temporary side-panel tab ID, so the picker still opens.How did you verify your code works?
crypto.randomUUID, opens the Review panel, and verifies that Open file opens the picker.bun run test:e2e:built -- e2e/regression/review.spec.ts -g "opens the file picker when randomUUID is unavailable"bun run lint:changedbun run typecheck:tscinpackages/gui-pluginsVisual
Screenshots / recordings
The regression covers the user-visible picker opening in the insecure-context condition.
Checklist
Added by the opencode bot (AI-generated).
Related: #46168, #48144, #55777, #46419