Repository navigation
feat(app): archive the open session with ⌘⇧S - #65428
Conversation
There was a problem hiding this comment.
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 -binpackages/apppasses.
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?
Issue for this PR
No issue. This came up while comparing session triage flows in Slack.
Type of change
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.mod+shift+s.mod+shift+awas 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?
e2e/regression/tabs.spec.ts). It presses ⌘⇧S from the composer, then checks that the session is PATCHed witharchived: true, that its tab closes, and that the view moves to the next tab.bun run typecheckinpackages/apppasses.bun run lint:changedpasses.typecheck:e2ereports 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
Requested by: @Brendonovich (Brendan via Slack)
Added by the opencode bot (AI-generated).
Fixes #62601
Related: #65242