Repository navigation
Fix terminal tab actions during title updates - #338938
HaterAndrew wants to merge 4 commits into
Conversation
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Anthony Kim (@anthonykim1)Matched files:
|
There was a problem hiding this comment.
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.
|
@microsoft-github-policy-service agree |
Megan Rogge (meganrogge)
left a comment
There was a problem hiding this comment.
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?
|
Megan Rogge (@meganrogge) Confirmed: finishing a rename clears editable state before |
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.
Cover Enter, Escape, and blur for microsoft#327279.
c1346e1 to
9910792
Compare
|
Megan Rogge (@meganrogge) Rebased onto current |
Head branch was pushed to by a user without write access
344d254
|
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.
|
|
Copilot resolve the merge conflicts in this pull request |

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.
After: entered text remains visible through status changes.
Verified
From
test/smoke, runnode test/index.js --fail-zero -g 'Terminal Tabs'. For Linux, enable Terminal Tabs and disable retries in generatedterminal.test.js; use Xvfb with--electronArgs='--no-sandbox --disable-gpu --disable-dev-shm-usage'.