Repository navigation
Conversation
…bled Tabs replaced the pinned quick slots because <leader>1-9 collides with ctrl+1-9. The Pinned category in the session list and the ctrl+f pin action never collided, yet they were hidden too, and pins saved before enabling tabs became unreachable. Pins that fall outside the fetched page of 50 sessions are now read from the local session store, synced on demand, so an old pinned session does not drop out of the Pinned category.
There was a problem hiding this comment.
With tabs on, the Pinned category and ctrl+f now work and quick slots stay hidden. I checked this in the TUI with opencode-drive: on the base, ctrl+f does nothing and there is no pin hint; with this change the session moves under "Pinned" (screenshots below). The dialog test passes. The type check gives the same errors as the base, none in the changed file.
Public API: unchanged. This only changes the TUI dialog, and session.json keeps its format.
One behaviour change is worth fixing (see the inline comment). The scope filter now also applies to pins the server already returned, so for users without tabs, some pins that used to show under Pinned now show under their date.
The server scopes the fetched page by project and subpath, so a pin from another worktree of the same project was dropped from Pinned by the directory check that only the store fallback needs.
There was a problem hiding this comment.
The new commit addresses the scope-filter point. Pins the server already returned now always stay under "Pinned", and the directory check applies only to pins taken from the local store. The updated test covers a pinned session from another worktree. The dialog test passes. The type check gives the same errors as the base, none in the changed file. A re-run in the TUI with tabs on still shows "Pinned" and pin/unpin ctrl+f.
Public API: unchanged.
No further concerns.



Issue for this PR
Closes #60236
Fixes #52794 — the same symptom, reported as a bug.
Type of change
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 andctrl+fpin 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
createEffectcallsdata.session.sync(sessionID)for pinned IDs missing from the store, which fetchesGET /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.jsonpins. 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.jsonpinsses_old, the list endpoint returns onlyses_recent, andGET /api/session/ses_oldreturns 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 istest/component/go-upsell-art.test.tsxand fails the same way ondevwithout this change.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
Added by the opencode bot (AI-generated).
Fixes #52794
Related: #59938