Repository navigation
feat(app): switch OpenCode accounts from the model picker - #66848
Conversation
The model picker lists the Console workspace's providers under one OpenCode header: the active account, a Go badge when the workspace has Go models, and, with several accounts, a menu that switches accounts the way Settings does, adds one, or opens OpenCode's accounts. OpenCode's own paid models sit right under the header, then a Go sub-heading and the workspace's other providers; free models stay last. The header's menu is reachable with Tab, as the picker's rows are no longer Tab stops. No flag.
One OpenCode sign-in account still opens the picker's account menu, to add or manage accounts. The menu lists only sign-in accounts; API keys stay in Settings, and an active key shows no switcher. No flag.
There was a problem hiding this comment.
I found no blocking problems in the code, but I couldn't check it in the UI. The change is desktop/web-app UI only, it can't be driven through the TUI, and no Playwright browsers are available here, so I couldn't run the picker e2e or component tests. The before/after light and dark screenshots you mentioned will cover the visual side.
What I ran: all 346 unit tests in packages/app under src/providers/models, src/providers/connect and src/settings pass, including the new picker-sections.test.ts. tsc -b passes. Reading the code, "Manage accounts" enters the connect dialog's accounts step the same way picking OpenCode from the provider list does, "Add account" goes straight to sign-in, and later selections are unchanged. Free models are still only keyless opencode ones, so local zero-cost providers keep their own sections.
Public API: unchanged. The changes are app UI, a new optional accounts prop on DialogConnectProvider, and new English i18n keys.
No further concerns.
4e81e7d to
42b89d4
Compare
Issue for this PR
Closes #
Type of change
What does this PR do?
Stacked on #66847.
The picker gets one OpenCode header for the active Console workspace. The header is a menu trigger showing the account and a Go badge.
No feature flag: additive UI in the desktop app. English copy only; no existing keys removed.
Known limitations
How did you verify your code works?
bun typecheckand unit tests inpackages/app;/reviewand/rmsloppasses; visual check of every state in the desktop app (opencode-drive against a fake Console) compared with the design stories. Picker e2e and the model-picker component tests pass.Screenshots / recordings
Before/after screenshots against the design (light and dark) to follow in a comment.
Checklist