Skip to content

[FEATURE]: Add unarchive/restore for archived sessions #24153

@alohaninja

Description

@alohaninja
  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem: Archiving a session is currently a one-way operation. Once archived, sessions disappear from the sidebar and the only place they're visible is dimmed in the command palette file picker. There's no way to restore them without directly hitting the API.

Related issues:

Proposed solution:

Add an unarchive action that restores an archived session to active status and navigates to it. The backend already supports this — UpdatedTime accepts archived: null — it just needs UI wiring.

Entry points (Web app):

  • Command palette: "Unarchive session" command
  • Command palette file picker: action on dimmed archived sessions (the one place they're already visible)
  • Session dropdown menu: show "Unarchive" instead of "Archive" when viewing an archived session by URL
  • Keyboard shortcut via command palette

Entry points (TUI):

  • Session list dialog: new keybind to archive/unarchive toggle

Behavior: Unarchiving restores the session to its original workspace grouping and navigates to it.

Scope of changes:

  • PATCH endpoint validation: accept null for time.archived (~1 line)
  • unarchiveSession() function + command palette entry in layout.tsx
  • Event reducer: handle un-archive events in reactive store
  • File picker: unarchive action on archived session rows
  • Message timeline dropdown: conditional archive/unarchive
  • TUI session list: archive/unarchive keybind
  • i18n: common.unarchive, command.session.unarchive

Estimated ~100-150 lines across ~8 files. No new dependencies. No schema/migration changes needed.

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions