Repository navigation
fix(gui-plugins): support insecure file picker - #59860
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.
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |


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