fix(tui): request root sessions in session dialog#26432
fix(tui): request root sessions in session dialog#26432codeg-dev wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
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 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. |
|
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:
It still keeps the important design constraint from the #24383 discussion: the shared Authorship disclosure: prepared with AI assistance. |
Issue for this PR
Closes #16270
Related: #13877, #25897, #23276
Type of change
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
/sessionseven thoughopencode session listcan still show them.This keeps the shared
sync.data.sessionbootstrap 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 passingroots: 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 30000bun run typecheckbun run buildcreateDialogSessionListQueryand verified the default picker query is{ scope: "project", roots: true, limit: 100 }with nostart/search, and the search query preserves path filters withroots: true,limit: 30, andsearch.Screenshots / recordings
N/A. This changes the session query used by the TUI dialog, not the rendered UI layout.
Checklist
Authorship disclosure: prepared with AI assistance.