Skip to content

[APP-9120] Add "Reopen closed session" to tab context menu#9344

Open
etirelli wants to merge 1 commit intowarpdotdev:masterfrom
etirelli:fix/reopen-closed-session-tab-context-menu
Open

[APP-9120] Add "Reopen closed session" to tab context menu#9344
etirelli wants to merge 1 commit intowarpdotdev:masterfrom
etirelli:fix/reopen-closed-session-tab-context-menu

Conversation

@etirelli
Copy link
Copy Markdown

Description

Fixes #9120.

The "Reopen closed session" action existed and was reachable via keyboard shortcut (Cmd/Ctrl+Shift+T) and the macOS native File menu, but was not surfaced in the tab right-click context menu on any platform.

This PR adds a "Reopen closed session" item to the tab context menu (via TabData::close_tab_menu_items()), available on all platforms. The item is disabled (greyed out) when the undo-close stack is empty, consistent with how the same action is presented in the macOS File menu.

Testing

Added an integration test test_reopen_closed_session_from_tab_context_menu that:

  1. Waits for the initial tab to bootstrap
  2. Opens a second tab via keyboard shortcut
  3. Closes the second tab
  4. Right-clicks the first tab to open the context menu
  5. Clicks "Reopen closed session" and asserts that the tab count returns to 2

cargo fmt and cargo clippy pass cleanly.

Server API dependencies

N/A — this is a purely client-side UI change with no server interaction.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Changelog Entries for Stable

CHANGELOG-IMPROVEMENT: "Reopen closed session" now appears in the tab right-click context menu on all platforms, disabled when no closed sessions are available to restore.

Surfaces the existing ReopenClosedSession action in the tab right-click
context menu on all platforms. Previously the action was only accessible
via keyboard shortcut or the macOS native File menu. The item is disabled
(greyed out) when the undo-close stack is empty.

Adds an integration test that opens a second tab, closes it, right-clicks
the first tab, and verifies the "Reopen closed session" item restores it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Edson Tirelli <ed.tirelli@gmail.com>
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 28, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @etirelli on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@oz-for-oss
Copy link
Copy Markdown

oz-for-oss Bot commented Apr 28, 2026

@etirelli

I'm starting a first review of this pull request.

You can follow along in the session on Warp.

I approved this pull request and requested human review from: @vkodithala, @vorporeal, @alokedesai.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

I approved this pull request. No matching stakeholder was found for the changed files, so no human reviewers were requested.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR exposes the existing reopen-closed-session action in the tab context menu, disables it when the undo-close stack is empty, and adds an integration test covering reopening a closed tab through that menu.

Concerns

  • None found.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@etirelli
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Copy Markdown

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds the existing Reopen closed session action to the tab context menu and covers the enabled path with an integration test that closes and restores a tab through the menu.

Concerns

  • No blocking correctness, security, or test concerns found in the changed diff. The supplemental security pass found no new attack surface; this only wires an existing local UI action into an existing menu.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Linux] "Restore closed tab" UI entry missing even though reopen shortcut works

1 participant