Skip to content

[Feature] Support host session tabs independent of workspaces [4014] - #4024

Open
Chris-playground wants to merge 6 commits into
binaricat:mainfrom
Chris-playground:feature/issue-4014-multi-session-tabs
Open

Chris-playground wants to merge 6 commits into
binaricat:mainfrom
Chris-playground:feature/issue-4014-multi-session-tabs

Conversation

@Chris-playground

@Chris-playground Chris-playground commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implement #4014 with flat session groups inside each host tab. Add, select, rename (double-click or F2), and close child sessions while keeping the top-level tab identity and position stable, including after the original session is closed.

Host session tabs need a flat membership/selection model; workspaces own split trees and pane focus. Sharing the workspace lifecycle caused the first + action to replace the top-level tab ID and mixed session-group closing with split-pane collapse. This implementation separates those responsibilities while reusing connection creation, SSH transport reuse, and terminal rendering.

Type of Change

  • Bug fix
  • New feature
  • Refactor / code cleanup
  • Documentation update
  • Build / CI change
  • Other: exclude local validation/build artifacts from developer lint/type-check inputs

Related Issue

Closes #4014

Changes Made

  • Add independent session-group membership, selection, and stable tab identity. Adding/switching child sessions does not create workspaces or change workspace focus mode.
  • Preserve default/custom top-level order when adding sessions or closing the original member. Explicit split/merge actions move only the selected sessions into workspaces.
  • Route tray/quick-switcher activation, pane visibility, side-panel targets, AI context, activity, and close actions to the selected member.
  • Persist group metadata and migrate experimental focusLayout: 'tabs' restore records into flat groups without losing member names, selection, or saved tab order.
  • Keep the shared terminal footer for host information, actions, and monitoring.
  • Address all three P2 findings: retain independent serial configuration in cloned sessions; add Spanish session-tab labels; position ZMODEM progress above the reserved terminal/footer area.
  • Prevent delayed terminal focus retries and restore-focus events from dismissing the inline rename editor. Preserve Enter save, Escape cancel, and blur save.
  • Add domain, state, startup, visibility, and focus regressions. Exclude .artifacts and generated output directories from local static-analysis inputs.

Screenshots / Demo

Browser interaction checks cover opening two hosts, adding child sessions without moving the host tab, closing the original member, continuing to add/switch sessions, and inline renaming. Rename checks use a real focusable terminal textarea and wait beyond the delayed focus retry, verifying that typed names never reach the terminal input.

Windows x64 test build: 0.0.0-issue4014.7.

Testing

  • Local browser validation using Vite and real React state/tab components with a fixture terminal backend; no page errors in the checked flows.
  • npm run lint passes (7 existing warnings).
  • npm run build passes.
  • 352 targeted session-group/terminal/protocol tests passed, followed by 82 focus/rename-related tests after the rename fix. These sets overlap.
  • Seven group-interaction checks, six rename/focus checks, and four footer/progress layout cases passed in the browser.
  • Packaged Windows modules (node-pty, ssh2, serial bindings, sqlite3) load; ConPTY spawn/output/exit smoke passes.
  • TypeScript diagnostics compared with the same main baseline (2796d1113): 774 baseline versus 773 current, with no introduced diagnostics. The repository-wide type check still has historical errors.
  • Full npm test suite was not run.
  • Generated capability specifications are unchanged (not applicable).

Physical serial-device loopback and remote SSH ZMODEM transfer were not performed. Serial configuration propagation, native Windows named-pipe I/O, and local ZMODEM protocol/backpressure tests were exercised.

Compatibility / Rollback

Restore changes are additive and keep the existing storage adapter/schema version. Experimental workspace-backed session tabs are migrated on read. Reverting the PR restores pre-feature behavior; older builds can ignore the additive group fields and reopen members as individual tabs.

Checklist

  • Code follows the existing domain/application/UI layering.
  • No separate documentation change is required for this feature.
  • Existing workspace split/focus behavior and restore compatibility are covered by regression tests.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T16:37:24.159727Z 4fe5da7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4fe5da7fb1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread application/i18n/locales/en/terminal.ts Resolved
Comment thread components/terminal/TerminalView.tsx Resolved
@Chris-playground Chris-playground changed the title [Feature] Support multiple SSH sessions in a host tab [Feature] Support host session tabs independent of workspaces [4014] Oct 28, 2026
@Chris-playground

Copy link
Copy Markdown
Contributor Author

@binaricat Could you take a look at this PR when convenient? WDYT.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 同一个SSH连接可以在一个标签下建立多个会话

1 participant