Repository navigation
Fix clearing custom terminal titles - #336599
Merged
Megan Rogge (meganrogge) merged 1 commit intoSep 17, 2026
Merged
Megan Rogge (meganrogge) merged 1 commit into
Megan Rogge (meganrogge) merged 1 commit into
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Anthony Kim (@anthonykim1)Matched files:
|
Copilot started reviewing on behalf of
Chirag Bhardwaj (Chirag-Bhardwaj)
September 17, 2026 18:19
View session
Contributor
Author
|
@microsoft-github-policy-service agree |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix correctly restores title behavior and includes regression coverage for all described cases.
Pull request overview
Fixes terminal title clearing so dynamic process and shell-sequence titles resume correctly.
Changes:
- Clears stale API title state and restores the shell title listener.
- Adds regression tests for empty and undefined title resets.
File summaries
| File | Description |
|---|---|
terminalInstance.ts |
Resets static title state and restores dynamic title updates. |
terminalInstance.test.ts |
Tests process and OSC title updates after clearing. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Megan Rogge (meganrogge)
approved these changes
Sep 17, 2026
Megan Rogge (meganrogge)
left a comment
Collaborator
There was a problem hiding this comment.
Thanks!
Megan Rogge (meganrogge)
enabled auto-merge (squash)
September 17, 2026 22:07
Paul (pwang347)
approved these changes
Sep 17, 2026
Sandeep Somavarapu (sandy081)
approved these changes
Sep 17, 2026
Abdon Morales (abdonmorales)
pushed a commit
to abdonmorales/vscode-utcs
that referenced
this pull request
Sep 23, 2026
(cherry picked from commit 5ddf120)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #333933.
Clearing a custom terminal name leaves
_staticTitleand the API title source intact, so subsequent label refreshes can restore the old name and process title updates remain blocked. It also leaves the shell title listener disconnected. Reset those fields and restore the listener when an API rename clears the title.Adds regression coverage for empty-string and undefined renames followed by a process title update, and for an OSC title sequence after clearing the name. All three cases fail before the fix and pass afterward.
Validation:
npm run test-browser-no-install -- --browser chromium --run src/vs/workbench/contrib/terminal/test/browser/terminalInstance.test.ts— 114 passing.git diff --checkpass.To verify manually: rename a terminal to a custom name, rename it to an empty name, then run
printf '\033]0;updated-title\007'withterminal.integrated.tabs.titleset to${sequence}. The title should follow subsequent shell updates instead of retaining the custom name.AI assistance: implemented and tested with OpenAI Codex.