Repository navigation
Closed
Labels
area: sessionTouches session storage, listing, or resumearea: tuiTouches terminal UI rendering, input, or themingenhancementNew capability
Milestone
Description
Summary
To archive or unarchive a saved session today, you read the 8-character id prefix off the /resume picker, close the picker, and type /archive <id-prefix> or /unarchive <id-prefix>. That is several steps per session, which makes cleaning up a long list slow. The picker already deletes the highlighted row with Ctrl+D and switches between active and archived views with Ctrl+A. It should move a session between those views just as directly.
Design
The picker's keys are currently hand-written match arms in ResumePicker::handle_key, and its footer hints are a separate hand-maintained list (footer_hints). Adding a key means editing both and keeping them in sync, and #278 would have to rebind keys that live in ad hoc match arms. Before adding the new key:
- Declare the picker's row actions (resume, delete, archive / unarchive) and view actions (scope, archived view, clear filter) once as named actions. Each action carries its default key and a footer label that can depend on the current view.
handle_keydispatches through that table, andfooter_hintsrenders from it, so a key and its hint cannot drift apart. Customize TUI key bindings #278 rebinds the same names. - Keep the session operations in the session layer and call them from both entry points. The typed
/archive,/unarchive, and/deletecommands and the picker actions apply the same rules: the live session is refused, the last-active time is preserved, and errors use the same wording.
Acceptance criteria
- In the
/resumepicker, Ctrl+X archives the highlighted session in the active view and unarchives it in the archived view. The row leaves the current view immediately, the highlight moves to the next row, and the filter and scope are kept. - Ctrl+X on the live session is refused with a footer note pointing to bare
/archive, the same rule the typed command applies. - The footer hint names the key with a label that matches the view ("archive" or "unarchive"). After each change, a footer note shows the session's id prefix and title.
- A failed write shows an error in the footer and keeps the row in place.
- The picker's keys and footer hints come from a single action table, and the typed commands and the picker share one implementation of each session operation.
- The sessions guide documents the key. Render tests cover the new key in both views and the refusal for the live session.
Metadata
Metadata
Assignees
Labels
area: sessionTouches session storage, listing, or resumearea: tuiTouches terminal UI rendering, input, or themingenhancementNew capability
Activity
feat(tui): archive and unarchive sessions from the /resume picker (#294)