Skip to content

fix(app): close tabs of sessions deleted elsewhere, as in the TUI - #51044

Closed
opencode-agent[bot] wants to merge 3 commits into
devfrom
web-delete-test
Closed

opencode-agent[bot] wants to merge 3 commits into
devfrom
web-delete-test

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Match the TUI's handling of a session deleted outside this window (packages/tui/src/context/session-tabs.tsx, packages/tui/src/app.tsx):

  • Close the deleted session's tab and drop it from recently closed tabs. If it was the viewed tab, open the neighbouring tab, or Home when none remains.
  • Show Session "<title>" was deleted only when the deleted session was being viewed. Background tabs close silently.
  • Deletes started in this window keep their existing flow (their own navigation and tab cleanup, no notice). A pending local removal at the time of the session.deleted event identifies them.
  • Remove the deleted row from the cached Home index immediately, then refill the page.
  • Closing the tabs of a deleted parent session now also navigates away when the tab is showing one of its subagents. removeSessions previously matched the current route only against a tab's root session.

Checks

  • bun typecheck in packages/app: passed.
  • Verified manually with Chromium E2E during development; the regression tests were removed at review request.

No production deployment.

Requested by: @Brendonovich (Brendan via Slack)

@opencode-agent opencode-agent Bot changed the title fix(app): reconcile deleted sessions and notify open tabs fix(app): close tabs of sessions deleted elsewhere, as in the TUI Oct 6, 2026
@thdxr
thdxr changed the base branch from v2 to dev October 10, 2026 19:16
@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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.

1 participant