You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Session pinning in the Desktop app (TUI parity) #55764
The TUI can pin sessions (session.pin.toggle / ctrl+f, jump with <leader>1..9). Desktop and Web
have no way to pin a session, so long-running or important ones are only findable by scrolling back
through the date-grouped list.
I'd like a Pinned group at the top of the Desktop home session list, plus pin/unpin in a
session's row menu, persisted across restarts.
I'm a user, not a developer, so I can't implement this myself — filing it so it's tracked. #28813
already worked out the two possible approaches (backend pinned_at + API for TUI/Desktop/Web
parity, or a client-side store in packages/app for Desktop/Web only) if that helps whoever picks
it up.
Is Desktop session pinning planned or tracked internally? #36193 shows the TUI side got an internal
issue, so I'm wondering whether a Desktop equivalent exists and I just couldn't find it.
Scope
In: pin/unpin a session, Pinned group above today/yesterday/older, persists across restarts.
Thanks for the detailed write-up and for checking earlier requests! You're asking for session pinning in the Desktop app: pin/unpin from a session's row menu, a Pinned group above today/yesterday/older on the home session list, kept across restarts, like the TUI's session.pin.toggle.
I couldn't find an open Desktop-side issue for this, so this one can track it. Maintainers will consider it.
I'd like to take this on. For a bounded first version, I propose keeping pins as a local UI preference using the existing packages/app/src/runtime/persistence/storage.ts persistence layer, scoped to the stable server identity and keyed by session ID. This preserves pins across Desktop restarts without a database/API migration or changing TUI pins. Because this is shared app code, Web would get the same behavior within its own local storage; pins would not sync between clients/devices.
On current dev (41cb349):
Add Pin/Unpin to the existing row menu in home/sessions/view.tsx, and derive a Pinned group before the date groups in home/sessions/controller.tsx. Pinned rows appear once, keep the existing updated-time ordering, and obey the selected project/worktree filter. Unpinning returns a row to its date group without modifying the session's timestamp.
Keep pinned sessions outside the current 64-row recent-list trimming. On restart, resolve saved IDs through the existing session.get API, then merge/deduplicate before grouping; otherwise older pins would disappear when absent from the recent index. Hide archived/deleted sessions, remove confirmed missing IDs, and retain pins on transient connection errors.
I would cover pin/unpin grouping, old-pin restoration beyond the recent limit, project/server isolation, missing/archived sessions, persistence reload, and the existing row interactions with focused tests and UI verification.
Could a maintainer approve this scope and persistence direction before implementation, or indicate whether a shared-backend design is required instead?
Adding shipped-build evidence for the persistence question, from Desktop 2.2.5 (macOS arm64, bundled CLI opencode v2.2.5).
1. Desktop has no pin code path at all. The packaged renderer bundle (/Applications/OpenCode.app/Contents/Resources/app.asar) contains zero occurrences of session.pin, session.pin.toggle, or togglePin. The TUI binary from the same release does contain them, and session.pin.toggle is dispatched only from the session-list dialog action list ({command: "session.pin.toggle", title: "pin/unpin", onTrigger: (row) => session.togglePin(row.value)}), which matches the TUI docs wording "Pin or unpin session in the session list".
2. Nothing on the server side.Session.Info in the OpenAPI schema has id, parentID, fork, projectID, agent, model, cost, tokens, outcome, time, title, subpath, metadata, permissions, revert, location — no pin/star/favorite field. Of the 138 documented paths, none match pin, star, favorite, bookmark, or archive; there is no pin endpoint to call and no field to set.
3. Pins are client-local in the TUI already. The TUI keeps the pin list in its own state file (session.json, next to model.json), not in the session record, so a client-local store in packages/app is consistent with existing behavior rather than a new compromise.
4. cli.json cannot help.session.pin.toggle in cli.json does not reach the Desktop UI: the app keeps its own keybind map in its own settings store (keybinds: {}), and cli.json is only read for TUI plugin enablement.
Practical consequence: right now a Desktop user cannot pin a session by any supported route — no keybind, no row action, and no pinned field to sort on. A client-side store keyed by stable server identity (as proposed above) is the only option that does not require a schema and API change.
This one bites me daily on Windows. I keep a few long-running sessions open, and there's simply no way to make one stay at the top. Right-clicking a tab gives me Rename / Close tab / Delete session, that's it. Since the list is ordered by recency, the session I care about keeps sinking as I open new ones, and dragging it back up only helps until I close it.
Pin / Unpin in the tab menu, with pinned sessions staying above the rest and surviving a restart, would end the scrolling entirely. Sharing the pin with the TUI's session.pin.toggle would be ideal so both surfaces agree, but a desktop-only pin would already fix my workflow.
Not sure if this is planned. #60236 and #59906 read like the same ask on other surfaces, and #52794 suggests pinning isn't showing up in the TUI on Windows either right now.
Activity
opencode-agent commentedon Oct 15, 2026
Thanks for the detailed write-up and for checking earlier requests! You're asking for session pinning in the Desktop app: pin/unpin from a session's row menu, a Pinned group above today/yesterday/older on the home session list, kept across restarts, like the TUI's
session.pin.toggle.I couldn't find an open Desktop-side issue for this, so this one can track it. Maintainers will consider it.
Related issues:
This can't be done as a Desktop extension today, because extensions have no way to add to the session list or a session's row menu.
Dante-dan commentedon Oct 15, 2026
I'd like to take this on. For a bounded first version, I propose keeping pins as a local UI preference using the existing
packages/app/src/runtime/persistence/storage.tspersistence layer, scoped to the stable server identity and keyed by session ID. This preserves pins across Desktop restarts without a database/API migration or changing TUI pins. Because this is shared app code, Web would get the same behavior within its own local storage; pins would not sync between clients/devices.On current
dev(41cb349):home/sessions/view.tsx, and derive a Pinned group before the date groups inhome/sessions/controller.tsx. Pinned rows appear once, keep the existing updated-time ordering, and obey the selected project/worktree filter. Unpinning returns a row to its date group without modifying the session's timestamp.session.getAPI, then merge/deduplicate before grouping; otherwise older pins would disappear when absent from the recent index. Hide archived/deleted sessions, remove confirmed missing IDs, and retain pins on transient connection errors.session.json. This chooses the client-local direction discussed in [FEATURE]: Session pinning support for Desktop/Web (shared backend) #28813, rather than its broader shared-backend/TUI migration.I would cover pin/unpin grouping, old-pin restoration beyond the recent limit, project/server isolation, missing/archived sessions, persistence reload, and the existing row interactions with focused tests and UI verification.
Could a maintainer approve this scope and persistence direction before implementation, or indicate whether a shared-backend design is required instead?
Popcornnnnnnnn commentedon Nov 3, 2026
Adding shipped-build evidence for the persistence question, from Desktop 2.2.5 (macOS arm64, bundled CLI
opencode v2.2.5).1. Desktop has no pin code path at all. The packaged renderer bundle (
/Applications/OpenCode.app/Contents/Resources/app.asar) contains zero occurrences ofsession.pin,session.pin.toggle, ortogglePin. The TUI binary from the same release does contain them, andsession.pin.toggleis dispatched only from the session-list dialog action list ({command: "session.pin.toggle", title: "pin/unpin", onTrigger: (row) => session.togglePin(row.value)}), which matches the TUI docs wording "Pin or unpin session in the session list".2. Nothing on the server side.
Session.Infoin the OpenAPI schema hasid, parentID, fork, projectID, agent, model, cost, tokens, outcome, time, title, subpath, metadata, permissions, revert, location— no pin/star/favorite field. Of the 138 documented paths, none matchpin,star,favorite,bookmark, orarchive; there is no pin endpoint to call and no field to set.3. Pins are client-local in the TUI already. The TUI keeps the pin list in its own state file (
session.json, next tomodel.json), not in the session record, so a client-local store inpackages/appis consistent with existing behavior rather than a new compromise.4.
cli.jsoncannot help.session.pin.toggleincli.jsondoes not reach the Desktop UI: the app keeps its own keybind map in its own settings store (keybinds: {}), andcli.jsonis only read for TUI plugin enablement.Practical consequence: right now a Desktop user cannot pin a session by any supported route — no keybind, no row action, and no
pinnedfield to sort on. A client-side store keyed by stable server identity (as proposed above) is the only option that does not require a schema and API change.s63388951-design commentedon Nov 4, 2026
This one bites me daily on Windows. I keep a few long-running sessions open, and there's simply no way to make one stay at the top. Right-clicking a tab gives me Rename / Close tab / Delete session, that's it. Since the list is ordered by recency, the session I care about keeps sinking as I open new ones, and dragging it back up only helps until I close it.
Pin / Unpin in the tab menu, with pinned sessions staying above the rest and surviving a restart, would end the scrolling entirely. Sharing the pin with the TUI's session.pin.toggle would be ideal so both surfaces agree, but a desktop-only pin would already fix my workflow.
Not sure if this is planned. #60236 and #59906 read like the same ask on other surfaces, and #52794 suggests pinning isn't showing up in the TUI on Windows either right now.