Skip to content

fix(tui): keep older pinned sessions visible - #64339

Open
jipeng6036-del wants to merge 1 commit into
anomalyco:devfrom
jipeng6036-del:fix/tui-load-older-pinned-sessions
Open

jipeng6036-del wants to merge 1 commit into
anomalyco:devfrom
jipeng6036-del:fix/tui-load-older-pinned-sessions

Conversation

@jipeng6036-del

@jipeng6036-del jipeng6036-del commented Nov 17, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #64337

Type of change

  • Bug fix

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)
  • TUI package typecheck passed. The regression covers an older pin and a pin from another project.

Screenshots / recordings

Session picker before and after, captured from the TUI test renderer

Checklist

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

Added by the opencode bot (AI-generated).

Related: #60236

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Before

After

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tui: pinned sessions disappear from the session list once outside the newest 50

1 participant