GeezerVison is showing github.com — fix(tui): request root sessions in switcher dialog by cwj2001 · Pull Request #32724 · anomalyco/opencode
Conversation
cwj2001
commented
Jun 17, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Issue for this PR
Closes #16270
Closes #32725
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
The TUI session switch dialog now requests root sessions from dialog-local browse and search queries. This keeps the existing directory/project filters and passes roots: true, so recently updated subagent child sessions cannot consume the server-side session list limit before the dialog renders top-level sessions.
The shared TUI sync cache remains a mixed root+child session list for parent/child navigation, subagent footer metadata, and child permission/question aggregation.
The tests cover both sides of that split: the dialog query helper requests root sessions, while the shared sync refresh does not add roots=true.
How did you verify your code works?
- Checked the local OpenCode database for a project with many child sessions: recent session rows were dominated by child sessions while top-level sessions still existed.
- Ran
bun test test/component/dialog-session-list.test.ts test/cli/cmd/tui/sync.test.tsx from packages/tui.
- Ran
bun run typecheck from packages/tui.
- Ran
git diff --check.
- Pre-push hook ran
bun turbo typecheck successfully.
Screenshots / recordings
Not included. This fixes session switcher data loading rather than visual layout.
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks for your contribution!
This PR doesn't have a linked issue. All PRs must reference an existing issue.
Please:
- Open an issue describing the bug/feature (if one doesn't exist)
- Add
Fixes #<number> or Closes #<number> to this PR description
See CONTRIBUTING.md for details.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
cwj2001
changed the title
fix(tui): load root sessions in switcher cache
fix(tui): request root sessions in switcher dialog
Jun 17, 2026
|
Thanks for the pr. used it as start for #33931
|
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.
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.