Skip to content

feat(app): archive the open session with ⌘⇧S - #65428

Merged
Brendonovich merged 1 commit into
devfrom
brendan/archive-session-shortcut
Nov 21, 2026
Merged

Brendonovich merged 1 commit into
devfrom
brendan/archive-session-shortcut

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

No issue. This came up while comparing session triage flows in Slack.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds an Archive session command bound to mod+shift+s, which archives the open session from the keyboard. Until now you could only archive from the sidebar and Home menus.

  • The command archives the session and removes its tab, the same way archiving from the sidebar does. The view then moves to the next open session tab, or to Home if no tabs are left.
  • It's disabled for child sessions and for sessions that are already archived. That matches the sidebar, which only offers Archive on root sessions.
  • It appears in the command palette, and it can be rebound in keybind settings like any other command.
  • It invalidates the Home and inbox session queries after archiving, as the sidebar's archive does.
  • Nothing else in the app uses mod+shift+s. mod+shift+a was the other option, but it's already taken by auto-accept permissions, and Chrome on macOS keeps it for tab search.

How did you verify your code works?

  • Added an e2e case in the tabs keeper suite (e2e/regression/tabs.spec.ts). It presses ⌘⇧S from the composer, then checks that the session is PATCHed with archived: true, that its tab closes, and that the view moves to the next tab.
  • The new case passes, and it fails when the binding is changed. The neighbouring keyboard-navigation case also still passes.
  • bun run typecheck in packages/app passes.
  • bun run lint:changed passes.
  • typecheck:e2e reports no errors in the changed file. Its existing errors are in other specs.

Screenshots / recordings

A recording of pressing ⌘⇧S twice and then finding the command in the palette was shared in the Slack thread. I couldn't attach it to this PR.

Checklist

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

Requested by: @Brendonovich (Brendan via Slack)


Added by the opencode bot (AI-generated).

Fixes #62601

Related: #65242

@Brendonovich
Brendonovich merged commit 889ab11 into dev Nov 21, 2026
13 checks passed
@Brendonovich
Brendonovich deleted the brendan/archive-session-shortcut branch November 21, 2026 17:03

@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 looks good to merge. The new session.archive command archives the open root session, closes its tab and moves to the next one. That matches what the sidebar and inbox archive do: the same session.update call, the same Home and inbox query refresh and the same tab-removal event.

How I checked

  • The new e2e case and the keyboard-navigation case next to it pass in Chromium with this change.
  • The new case fails on the base, where no archive request is sent.
  • tsc -b in packages/app passes.

Public API: unchanged. This adds an app command and a default keybind only.

Fixes #62601: that issue's "Archive session" entry in Settings → Shortcuts is left over from an older version and has no handler. Registering session.archive brings it back to life, including bindings users already customised. It also adds an archive action to the command palette, which the Top tabs layout lacked.

Two points to consider (neither blocks a merge):

  • In 1.x, this command defaulted to mod+shift+backspace. Going back to that default would keep users' existing habits.
  • If you keep mod+shift+s: in the web app on Windows and Linux, Ctrl+Shift+S is also Firefox's screenshot shortcut and Edge's web capture.

Could you also add a screenshot or short video of the new command in the palette, since the recording from Slack isn't on this PR?

Fixes #62601
Related: #65242

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop: Archive session shortcut does nothing

1 participant