Skip to content

Surface closed sessions in the "+" tab menu #77

Description

@adamatan

Surface closed sessions in the "+" tab menu

Problem

Resuming a closed session is already possible today via the History view (HistoryView / workspace_restore), but it's buried: you have to leave the workspace, find the right entry in a separate view, and restore it there. When you're mid-flow and just want to bring back the last thing you closed, there's no fast path.

The "+" (new tab) dropdown in TabBar.tsx currently has two sections and nothing else:

New terminal
  Shell
  <custom terminals>
---
New agent
  <registry CLIs>

Proposal

Add a third "Resume" section to that same dropdown:

  • List the last few closed sessions inline (title, agent/CLI icon, maybe a relative timestamp), most-recent first.
  • End the list with a "More..." item that opens a submenu (or the full History view) with the rest.
  • Selecting an entry resumes it the same way History's "Restore" does today, just without leaving the workspace.

Scope is mostly UI: TabBar.tsx gets a new dropdown section reading from whatever backs HistoryView today, plus a small "N most recent + overflow submenu" list component. No new persistence/backend work should be needed since the resume path already exists, just a shortcut to trigger it from where users actually are (the tab bar) instead of a separate view.

Bonus: rethink the close confirmation itself

Once resuming is one click away from the "+" menu, the close confirmation dialog (src/lib/closeTab.ts, "Ends this agent's session. It won't be restored when the workspace reopens.") stops needing to be a hard stop every single time. Right now every non-main tab close requires clicking through a modal, which adds friction to something that should be quick.

Consider instead:

  • Closing a tab happens immediately, no blocking confirm.
  • A brief toast (or similar) tells the user the session ended and where to bring it back from (the new "+" > Resume menu).
  • A "Don't show this again" option on the dialog (or the toast) for users who'd rather never see it, once they've learned where resume lives.

This turns closing a tab back into a fast, low-friction action while still pointing people at the safety net instead of relying on a modal to stop them every time.

Screenshot

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions