Issue for this PR
Closes #60236
Fixes #52794 — the same symptom, reported as a bug.
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
#39396 made tabs replace pinned quick slots and hid pins from the session list. Only quick slots collide with tab keys. The Pinned category does not.
In packages/tui/src/component/dialog-session-list.tsx, the Pinned category and ctrl+f pin action now work with tabs enabled. Quick slots stay disabled under tabs, and gutter slot numbers stay hidden.
Pins outside the fetched page of 50 sessions are read from the local session store. A createEffect calls data.session.sync(sessionID) for pinned IDs missing from the store, which fetches GET /api/session/{id}. A pin that returns 404 (deleted elsewhere) is skipped.
The scope filter (current directory vs. all projects) still applies to pins. During a search, only pins in the search results appear, as before. This uses the existing session.json pins. No new state, protocol, or server changes.
How did you verify your code works?
Added a test to packages/tui/test/cli/tui/dialog-session-list.test.tsx. With tabs enabled, session.json pins ses_old, the list endpoint returns only ses_recent, and GET /api/session/ses_old returns the old session. The frame shows "Old pinned session" under "Pinned" and "Recent session". The test fails when the store fallback is removed.
In packages/tui:
bun check --no-script -b: clean.
bun test test/cli/tui/dialog-session-list.test.tsx test/config.test.tsx: 16 pass, 0 fail.
bun run test (whole package): 1564 pass, 2 skip, 1 fail. The failure is test/component/go-upsell-art.test.tsx and fails the same way on dev without this change.
- The test also pins a session that the server returned from another worktree of the same project. It must stay under Pinned, not under its date. This covers the review fix in 99fef80.
- Root
bun run lint: clean.
Not tried interactively with bun run dev:live.
Screenshots / recordings
None. The change adds a list category that the test covers.
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
Added by the opencode bot (AI-generated).
Fixes #52794
Related: #59938