GeezerVison is showing github.com — fix(tui): check connected providers in the session location by neriousy · Pull Request #66424 · anomalyco/opencode
Conversation
neriousy
commented
Nov 25, 2026
•
edited by opencodejr
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Issue for this PR
Closes #66112
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
useConnected() read the integration, provider and model lists with no location, so it checked the TUI's default (launch dir) location. The model dialogs read the lists for the session's location (location.ref).
When the TUI opens straight into a session in another directory (-s <id> from a parent dir, or a remote --server TUI whose cwd doesn't exist on the server), only the session location gets synced. The default lists are empty, so the check fails and /models falls back to "Free models" even with connected providers.
The fix: pass location.ref to all three lists, the same as the dialogs and the sidebar onboarding already do. When the session is in the default location, ref resolves to the same entries, so nothing changes there. This also fixes the other useConnected() callers (prompt warning, /connect suggestion).
No flag, it's a fix.
How did you verify your code works?
- added a regression test in
packages/tui/test/component/dialog-model.test.tsx: the launch dir has nothing connected and the session dir has a connected integration. It fails on dev and passes with the fix
- full
packages/tui suite passes, bun typecheck is clean
- ran the opencode-drive repro from the issue against
dev and against this branch: TUI started in the project root with --session for a session in packages/b, then /models
Screenshots / recordings
|
Before (dev) |
After |
/models in a session outside the launch dir |
 |
 |
Before (dev):
before.mp4
After:
after.mp4
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
hint: if you need to wait for this pull request to be reviewed, merged, or closed before continuing, use this instead of polling:
gh event listen --resource fix(tui): check connected providers in the session location #66424 --event com.github.pull_request.review.submitted.v1,com.github.pull_request.state.changed.v1
- It prints the first event as a JSON line on stdout and exits; run it again to wait for the next one.
- Add
--timeout to stop waiting after a while, for example --timeout 30m; it then exits with status 8.
- Events carry no details; read the pull request to see what changed.
- It misses changes made before it starts, so read the pull request once it is running.
- See
gh event listen --help for other event types.
- Event subscriptions are in preview and may not be enabled for your account.
Added by the opencode bot (AI-generated).
Fixes #62105
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix works. I ran the #66112 drive repro (TUI started from the project root with --session for a session in packages/b, then /models) on both checkouts. On dev it opens the "Free models" page with no items. With this change it shows the normal picker with the provider's model. The new test fails on dev and passes here. tsc -b for packages/tui passes.
The public API is unchanged.
Every useConnected() caller sits inside LocationProvider, and when the session is in the default location location.ref reads the same lists as before, so I have no concerns. #62105 has the same root cause (flat /models list and "View all integrations" in a session outside the launch directory), so this fixes it too. The open PRs #66138 and #60852 make the same change.
Fixes #62105


Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 26, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|