#18290 · @Protocol-zero-0 · opened Mar 19, 2026 at 9:40 PM UTC · last updated Mar 21, 2026 at 8:15 PM UTC
fix(ui): wrap fork dialog with PlatformProvider context
Score breakdown
Impact
Clarity
Urgency
Ease Of Review
Guidelines
Readiness
Size
Trust
Traction
Summary
This PR fixes a critical crash when using the Fork feature by correctly providing the PlatformProvider context to the dialog. It's a small, focused fix addressing a severe regression.
Description
Issue for this PR
Closes #18250
Type of change
- [x] Bug fix
- [ ] New feature
- [ ] Refactor / code improvement
- [ ] Documentation
What does this PR do?
Clicking the Fork button crashes with Platform context must be used within a context provider because dialog.show() uses createRoot() to render the dialog, which creates a new SolidJS root that doesn't inherit parent context providers.
The fix wraps <DialogFork /> with <PlatformProvider> in the fork command's onSelect handler, passing the current platform value from the parent scope. This is the same pattern used elsewhere in the codebase when rendering components in isolated roots.
How did you verify your code works?
- Confirmed
dialog.show()usescreateRoot()which creates an isolated context - Verified
PlatformProvider/usePlatformfollow thecreateSimpleContextpattern - Change is minimal (8 lines) and follows existing patterns in the codebase
Checklist
- [x] I have tested my changes locally
- [x] I have not included unrelated changes in this PR
Made with Cursor
Linked Issues
#18250 [DESKTOP/WebUI] Forking not possible
View issueComments
PR comments
Protocol-zero-0
Follow-up update: I aligned the remaining call sites on this branch with the generated SDK signature ( instead of the old key), refreshed local dependencies, and re-ran the full repo typecheck successfully before pushing. This should clear the current typecheck failure once CI finishes rerunning.
Protocol-zero-0
Follow-up update: I aligned the remaining auth.set call sites on this branch with the generated SDK signature, refreshed local dependencies, and re-ran the full repo typecheck successfully before pushing. CI is rerunning now, and this should clear the current typecheck failure once the new checks finish.
Protocol-zero-0
Another follow-up: I narrowed the compatibility fix to the app-side call sites only. The branch now keeps the runtime body payload, isolates the current mixed auth.set typings in the app client, and passes the full repo typecheck locally before push.
Changed Files
packages/app/src/components/dialog-connect-provider.tsx
+2−2packages/app/src/components/dialog-custom-provider.tsx
+2−2packages/app/src/pages/session/use-session-commands.tsx
+8−1packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx
+1−1