GeezerVison is showing github.com — [FEATURE]: Session pinning in the Desktop app (TUI parity) · Issue #55764 · anomalyco/opencode
[FEATURE]: Session pinning in the Desktop app (TUI parity) #55764DescriptionFeature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Note on prior requests
Describe the enhancement you want to request
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
Reacted by Jack Stringer, Eoligan, s63388951-design, Mahdi Mohammadi, Alexandre Izanic, Michael Ignat and Euphoriah Activityopencode-agent commented on 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 commented on 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.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.
- Start the new persisted schema empty; do not import or rewrite TUI's
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 commented on 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 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. s63388951-design commented on 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. michaelignat commented on Nov 23, 2026 +1 would be really helpful k0d3d commented on Nov 26, 2026 Plugin-author data point for the API side of this.
A GUI plugin can persist pinned session IDs today with Store.global / Store.session, but it cannot surface them: there is no contribution point for a pin/unpin action on a session's row menu, and no slot or grouping API for a Pinned section above the date groups on Home. #52478 already notes that there is no supported way for plugins to pin sessions, and #61385 shows the analogous gap for per-message actions (it proposes a MessageAction registry plus ctx.sessions.reveal(...)).
For a plugin to implement Desktop pinning without patching session-ui, it would need roughly:
- a
SessionAction / row-menu contribution point, or ctx.layout.pin(session, pinned) plus a pinned-state store; and
- a Home/session-list slot or grouping API that can list pinned sessions.
Alternatively, if pins are meant to be shared with the TUI, a server-side pinned field/API would let both clients read the same state — with the caveat from #44736 that TUI pins are currently client-local.
Desktop is the priority here; TUI parity through the existing session.pin.toggle would be the follow-up.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|