Repository navigation
fix(tui): keep older pinned sessions visible - #64339
jipeng6036-del wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
This fixes #64337, the bug where pinned sessions disappeared from the session list once they fell outside the newest 50. I ran the issue's reproduction with tabs off: 3 pins, then 55 newer sessions. On the base the "Pinned" group is gone. With this change all three pins are listed under "Pinned" with their 1–3 quick-switch numbers, and nothing is duplicated in the date groups. The dialog test and the TUI package type check (tsc -b) pass.
The public API is unchanged; this is internal to the TUI session dialog.
I found nothing that blocks a merge. Pins from another project are left out unless "all projects" is on, as are archived and child sessions. A pin that fails to load is skipped. Pinning or unpinning now reloads the list once and looks up each missing pin by ID, which is fine for the usual handful of pins.
Related: #60236


Issue for this PR
Closes #64337
Type of change
What does this PR do?
The session picker only reads the 50 most recent sessions, so older pins disappear. Fetch missing pinned sessions by ID and keep only unarchived root sessions in the selected scope. Thanks @Jet-00656 for the report and @opencodejr for reproducing it.
How did you verify your code works?
bun run --cwd packages/tui test test/cli/tui(440 passed)Screenshots / recordings
Checklist
Added by the opencode bot (AI-generated).
Related: #60236