Skip to content

fix(app): register archive session command in both layouts - #41741

Merged
Brendonovich merged 4 commits into
anomalyco:devfrom
NathanTCode:session-archive-shortcut
Aug 21, 2026
Merged

fix(app): register archive session command in both layouts#41741
Brendonovich merged 4 commits into
anomalyco:devfrom
NathanTCode:session-archive-shortcut

Conversation

@NathanTCode

@NathanTCode NathanTCode commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #41690

Type of change

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

What does this PR do?

session.archive was registered inside LegacyLayout, which never mounts
since general.newLayoutDesigns defaults to true. So the keybind did
nothing and the command was missing from the palette.

Moved it to use-session-commands, which the session route mounts in both
shells. While doing that I pulled the archive logic out of
message-timeline.tsx into a useSessionArchive hook, so the timeline
menus, the new command and deleteSession share the same navigation code
instead of duplicating it.

No behavior change for the ... menu.

How did you verify your code works?

  • bun run --cwd packages/desktop dev, opened a session, pressed
    Cmd+Shift+Backspace -> session archived
  • Same command via the palette (Cmd+K -> "Archive session")
  • Archiving from the ... menu still works
  • bun typecheck and the command / command-keybind tests pass

Screenshots / recordings

Before

"Archive session" missing from the command palette but works from the ... menu.

CleanShot 2026-08-11 at 08 57 56 CleanShot 2026-08-11 at 08 58 38 CleanShot 2026-08-11 at 09 00 51

After

"Archive session" shown and working from the command palette. Still working from the ... menu.

CleanShot 2026-08-11 at 09 00 14 CleanShot 2026-08-11 at 09 00 20 CleanShot 2026-08-11 at 09 00 35

Checklist

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

The session.archive command was registered inside LegacyLayout, which
never mounts when general.newLayoutDesigns is enabled (the default).
The keybind was dead and the command missing from the palette.

Move it to use-session-commands, mounted by the session route in both
shells, and extract the archive logic into a useSessionArchive hook
shared with the timeline menus and deleteSession.
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Aug 11, 2026
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Aug 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@NathanTCode

Copy link
Copy Markdown
Contributor Author

Happy to adjust anything, especially the useSessionArchive extraction if
you'd rather keep the PR to the one-line fix. Thanks for taking a look.

@NathanTCode

Copy link
Copy Markdown
Contributor Author

@Brendonovich @Hona Hi guys, would you mind taking a look at this PR when you get a chance? It would make daily use of the Desktop version much easier by bringing back the Archive feature. Thanks a lot!

@Brendonovich
Brendonovich enabled auto-merge (squash) August 21, 2026 08:19
@Brendonovich
Brendonovich merged commit f357e70 into anomalyco:dev Aug 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Archive session is missing in new layout

2 participants