Skip to content

Fix terminal tab actions during title updates - #338938

Open
HaterAndrew wants to merge 4 commits into
microsoft:mainfrom
HaterAndrew:fix/terminal-tab-title-updates
Open

HaterAndrew wants to merge 4 commits into
microsoft:mainfrom
HaterAndrew:fix/terminal-tab-title-updates

Conversation

@HaterAndrew

@HaterAndrew HaterAndrew commented Sep 30, 2026 •

Copy link
Copy Markdown

Closes #327279.

What

Frequent OSC title updates and delayed status updates could replace terminal tab controls during clicks or inline renaming. Update labels, descriptions, hovers and accessible names in place. Keep the editing class in the resource label options so decoration updates preserve the visible rename editor.

The smoke tests require an actual Bell status, acknowledge stopping both streams, and check text, focus, visibility and final labels for Enter, Escape and blur. Current upstream remote-host labels remain covered by the accessibility test.

Before: the rename input is clipped out of its row.

Rename input clipped out of the terminal row

After: entered text remains visible through status changes.

Rename input remains visible after status changes

Verified

  • Linux Electron Terminal Tabs: 17 passing, one existing skip, retries disabled.
  • Windows/macOS browser clients: 17 passing and one skip each, with a Linux backend. Native Windows verification runs in PR CI.
  • Both negative controls reproduce their intended failure. A 15-second bell-listener delay passes.
  • Host-label unit test, client/extension builds, smoke compilation, TypeScript, targeted ESLint and hygiene pass.

From test/smoke, run node test/index.js --fail-zero -g 'Terminal Tabs'. For Linux, enable Terminal Tabs and disable retries in generated terminal.test.js; use Xvfb with --electronArgs='--no-sandbox --disable-gpu --disable-dev-shm-usage'.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 17:02
@vs-code-engineering

vs-code-engineering Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Anthony Kim (@anthonykim1)

Matched files:

  • src/vs/workbench/contrib/terminal/browser/terminalTabsList.ts
  • src/vs/workbench/contrib/terminal/test/browser/terminalTabsList.test.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused implementation preserves row lifecycle correctly and has comprehensive regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Prevents frequent terminal title updates from rebuilding tab rows, preserving actions and inline rename state.

Changes:

  • Updates terminal tab labels and ARIA names reactively in place.
  • Adds smoke coverage for actions, rename behavior, and accessibility labels.
File Description
src/​vs/​workbench/​contrib/​terminal/​browser/​terminalTabsList.ts Adds row-scoped title listeners and observable ARIA labels.
test/​smoke/​src/​areas/​terminal/​terminal-tabs.test.ts Tests tab behavior during rapid title updates.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@HaterAndrew

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@meganrogge Megan Rogge (meganrogge) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, this approach looks good: re-rendering the label on title change instead of refreshing the whole list should fix the lost clicks. One question before approving: _renderLabel is skipped while the tab is in inline rename mode. When the user finishes renaming, does the new name appear immediately, or does the label stay stale until the next refresh or title change? Could you confirm, and ideally add a test for that path?

@HaterAndrew

HaterAndrew commented Nov 3, 2026 •

Copy link
Copy Markdown
Author

Megan Rogge (@meganrogge) Confirmed: finishing a rename clears editable state before rename fires its title event, so the new label appears immediately. Cancellation refreshes the row. c1346e1 stops OSC updates before Enter, Escape, or blur and checks input removal plus visible/accessibility labels. All three cases pass locally, including Windows/macOS client simulations. Could you take another look?

Update terminal tab labels in place so OSC title changes preserve
native action clicks and inline rename input. Keep accessible names
current through the list observable interface.

Verified 16 Terminal Tabs smoke tests under Linux/Xvfb, with the
existing Linux suite skip disabled locally in generated output.
One existing test remains skipped. Type checking, smoke compilation,
targeted lint, and hygiene pass.
@HaterAndrew
HaterAndrew force-pushed the fix/terminal-tab-title-updates branch from c1346e1 to 9910792 Compare November 3, 2026 22:07
@HaterAndrew

Copy link
Copy Markdown
Author

Megan Rogge (@meganrogge) Rebased onto current main in 9910792, preserving the shared inline-edit input. Enter, Escape, and blur display the final label after OSC updates stop. Linux Terminal Tabs: 17 passing, one existing skip. The Windows/macOS rename simulations also pass; broader Windows Split simulation still times out. Could you take another look?

)

Preserve current upstream host labels while reading observable labels in the accessibility test. Exercise real status transitions after bell startup and retain the visible inline editor through decoration updates.
auto-merge was automatically disabled November 9, 2026 20:11

Head branch was pushed to by a user without write access

@HaterAndrew

HaterAndrew commented Nov 9, 2026 •

Copy link
Copy Markdown
Author

Megan Rogge (@meganrogge) Fixed in 344d254: status changes preserve tab controls and the visible rename editor. All 17 tests pass on Linux and simulated Windows/macOS clients; both regression controls and the host-label test pass. Native Windows CI is awaiting maintainer approval.

Rename editor remains visible after status changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the changes addressing terminal tab actions and inline renaming during frequent updates.

No open issues 🎉

Review effort: Balanced

@meganrogge Megan Rogge (meganrogge) added this to the 1.147.0 milestone Nov 11, 2026
@meganrogge

Copy link
Copy Markdown
Collaborator

Copilot resolve the merge conflicts in this pull request

This branch has not been deployed

No deployments
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.

Terminal tab actions become unresponsive during frequent OSC title updates

6 participants