Skip to content

fix(tui): keep saved tabs separate by server - #47999

Closed
abeisleem wants to merge 22 commits into
anomalyco:v2from
abeisleem:server-tab-state
Closed

abeisleem wants to merge 22 commits into
anomalyco:v2from
abeisleem:server-tab-state

Conversation

@abeisleem

@abeisleem abeisleem commented Sep 8, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #47998

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Keeps saved TUI tabs and terminal selections separate for each server, so opening a remote TUI cannot reuse or overwrite the local layout. Both global and current-directory tab scopes are isolated, including when servers have identical session and terminal IDs.

The managed local server keeps its legacy storage and a stable identity across endpoint changes. Explicit server URLs use a normalized, credential-free identity; terminal lists use that identity too.

Legacy layouts are preserved for managed local use. If an older client already saved remote tabs into that layout, those stale entries may need closing manually; this fix prevents future mixing but does not reconstruct historical ownership.

A saved-server picker could build on this later (#37667). Opening remote sessions as tabs remains a separate request (#45346). #18302 is an analogous desktop-app issue.

How did you verify your code works?

  • 70 focused tests and the TUI typecheck passed after updating to upstream v2.
  • The push hook passed all 36 repository typecheck tasks.
  • Manually checked and recorded local/remote behavior before and after the fix.
  • An earlier full-suite run had three unrelated plugin-source failures.
  • To verify manually, open tabs locally, launch with --server <url> using the same storage channel and launch directory, change the remote tabs, then return locally. Each server should restore only its own layout.

Screenshots / recordings

pr-47999.mov

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@abeisleem

Copy link
Copy Markdown
Author

@kitlangton lets this through pretty please

@abeisleem

Copy link
Copy Markdown
Author

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

you lie

@github-actions

github-actions Bot commented Oct 8, 2026

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