GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(tui): request root sessions in session dialog by codeg-old · Pull Request #26432 · anomalyco/opencode

Conversation

@codeg-old

@codeg-old codeg-old commented May 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Issue for this PR

Closes #16270
Related: #13877, #25897, #23276

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The session switch dialog was rendering root sessions from the shared mixed session bootstrap list. In projects with many recent child/subagent sessions, the server-side limit can be filled before the dialog filters out child sessions, so root sessions disappear from /sessions even though opencode session list can still show them.

This keeps the shared sync.data.session bootstrap unchanged, because other TUI flows use it for parent/child navigation. The dialog now has its own root-session query for both the default picker and search results, preserving the current scope/path filter while passing roots: true.

The default dialog query asks for the latest 100 root sessions instead of reusing the bootstrap 30-day window. Search asks for the latest 30 matching root sessions. Delete and workspace recovery paths refetch the dialog root-session resource so the picker stays current.

How did you verify your code works?

  • bun test test/cli/tui/dialog-session-list.test.ts test/server/session-list.test.ts test/server/httpapi-sdk.test.ts --timeout 30000
  • bun run typecheck
  • bun run build
  • Manual driver: imported createDialogSessionListQuery and verified the default picker query is { scope: "project", roots: true, limit: 100 } with no start/search, and the search query preserves path filters with roots: true, limit: 30, and search.

Screenshots / recordings

N/A. This changes the session query used by the TUI dialog, not the rendered UI layout.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Authorship disclosure: prepared with AI assistance.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

EdgarSedov, jivot, DenisUlianov, 4n70w4, nickensoul, overlord-space, Zoltberg63, pamarcos, CasualDeveloper, and ak64th reacted with thumbs up emoji
All reactions
  • 👍 10 reactions
@codeg-old
fix(tui): request root sessions in session dialog
18cdb05
@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found a related PR that should be reviewed:

PR #23276: fix(tui): request root sessions in switch session dialog
#23276

This PR appears to be a prior/related fix addressing a very similar issue with requesting root sessions in the session dialog. It's referenced in the current PR's description under "Related: #13877, #25897, #23276". The current PR (26432) may be building upon or refining the approach from #23276.

This should be cross-referenced to understand if there's overlapping logic or if the current PR supersedes the previous approach.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced May 9, 2026
/sessions TUI only shows recent sessions, ignores historical ones #16270
Closed
TUI /sessions picker only shows recent sessions #13877
Closed
TUI session picker hides older root sessions when recent child sessions fill list #25897
Closed
[BUG] session_list returns empty despite sessions existing in database #15108
Closed
@codeg-old

codeg-old commented May 9, 2026

Copy link
Copy Markdown
Author

Context on #23276 overlap:

This is intentionally close to #23276's narrow-dialog approach, but it adds two differences that should help avoid the earlier stale/template/design problems:

  1. The default dialog query does not include the bootstrap 30-day start filter. It asks for the latest 100 root sessions directly, which better matches the CLI root-session behavior and addresses reports where older root sessions are hidden.
  2. The root-query construction is covered by test/cli/tui/dialog-session-list.test.ts, so the dialog-specific scope is explicit and protected.

It still keeps the important design constraint from the #24383 discussion: the shared sync.data.session bootstrap remains mixed and unchanged for parent/child navigation.

Authorship disclosure: prepared with AI assistance.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@EdgarSedov EdgarSedov mentioned this pull request May 30, 2026
TUI /sessions only show sessions from last 30 days, while CLI session list shows all my sessions (thank god) #16733
Closed
@EdgarSedov

EdgarSedov commented May 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

I'm affected by this too on opencode v1.15.12. The TUI session picker hiding older sessions is a real workflow blocker because I often need to browse and resume older conversations, not only search for them if I already remember keywords.

#26432 looks like the right fix to me because it keeps the shared bootstrap session list unchanged and scopes the root/no-30-day query to the session switch dialog. That avoids the broader parent/child navigation concern from earlier attempts.

Happy to test a rebased build if useful.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@magnusoverli magnusoverli mentioned this pull request Jun 2, 2026
I lost all sessions. magnusoverli/opencode#35
Closed
@github-actions github-actions Bot mentioned this pull request Jun 3, 2026
fix(tui): list only root sessions in session picker #30607
Closed
3 of 6 tasks
@pamarcos

pamarcos commented Jun 3, 2026

Copy link
Copy Markdown

Yet another user hit by the bug this PR addresses. I upgraded and suddenly all my historical sessions disappeared from the TUI and I didn't know why

t0rrant reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@CasualDeveloper CasualDeveloper mentioned this pull request Jun 6, 2026
fix(tui): load root sessions safely in dialogs #31132
Closed
3 of 6 tasks
@CasualDeveloper

CasualDeveloper commented Jun 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Thanks for the original work here. Opened #31132 as an updated version of this fix. Would appreciate if y'all can give my PR some reactions too!

It keeps the same dialog-local root-session query approach, but updates it for current dev, covers both TUI session dialog implementations, removes the browse start cutoff, and also fixes an async browse-order race bug I encountered (see #31125).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Jun 11, 2026
fix(tui): pass roots:true to session.list to prevent root sessions being hidden by LIMIT 100 #31884
Closed
@github-actions github-actions Bot mentioned this pull request Jun 21, 2026
fix(opencode): improvements to workspace feature on TUI #33227
Closed
3 of 6 tasks
@CasualDeveloper

CasualDeveloper commented Jun 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Update: #33931 has now landed on dev and closed #16270 / #32725. It fixes the same root-session loading problem in the TUI session switcher, so I am closing #31132 as superseded by #33931. Thanks again for the original work on this fix.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Jul 25, 2026
feat(opencode): add --resume session picker #38878
Closed
3 of 6 tasks
@5h4d0wn1k 5h4d0wn1k mentioned this pull request Sep 26, 2026
fix(core): treat an empty session subpath as no subpath #51514
Closed
3 of 6 tasks
@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thdxr thdxr closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

/sessions TUI only shows recent sessions, ignores historical ones

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@codeg-old @EdgarSedov @pamarcos @CasualDeveloper @thdxr
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.