GeezerVison is showing github.com — fix(tui): pass the location ref when checking connected providers by YamineRL · Pull Request #60852 · anomalyco/opencode
Conversation
YamineRL
commented
Oct 31, 2026
•
edited by opencodejr
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Issue for this PR
Closes #60851
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
useConnected() read data.location.integration.list() without a location ref, so it looked at the default location instead of the TUI's current one and got []. With connected() false, the /model picker sets no category on its options, so typing a provider name matched nothing. The hook now passes useLocation().ref, like the provider and model lists in the same dialog. Every caller of useConnected() already runs inside LocationProvider.
How did you verify your code works?
- On 2.2.0 I made the same change in the built binary: typing a provider id in
/model lists all of that provider's models again. Without the change it lists none.
bun run typecheck in packages/tui: no type errors.
bun test in packages/tui: one failure ("the art stops every frame when hidden..."), and it fails the same way on dev without this change.
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
🤖 Generated with Claude Code
Added by the opencode bot (AI-generated).
Related: #60587
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 change looks correct: useConnected() now reads integrations for the TUI's current location, the same way the provider and model lists in the /model dialog already do. Every caller renders inside LocationProvider. When the ref isn't set yet, list(undefined) still falls back to the default location, so startup behaves as before.
I couldn't reproduce the bug. I drove the TUI with the simulated provider and a connected Exa integration on the base, opened /model and searched simulation. Both from the home screen and after /cd sub, the base already showed the provider header and matched the search. The bug seems to need the default location's integration list to be missing or stale while the TUI is somewhere else. Could you share the exact steps that lead there (for example, opening a session from another directory, a workspace, or attaching to a remote server)? Before/after screenshots of /model would also help. The connected-provider, plugin-model and app-lifecycle tests pass. Running tsc directly shows no new errors; the typecheck script itself couldn't run in my environment.
Public API: unchanged.
Note: the open PR #60591 makes the same one-line change in use-connected.tsx as part of a broader fix, so the two will conflict on this file.
Related: #60587
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.
useConnected() now passes useLocation().ref to integration.list(), so it reads the TUI's current location instead of the default one, which matches the description. The change is minimal. I saw a mention that #60591 changes the same line, so whichever lands second will need a rebase.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 5, 2026
This branch has not been deployed
No deployments
Reviewers
+1 more reviewer
Reviewers whose approvals may not affect merge requirements
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.
|