Skip to content

Fix Administrator label missing in command center#309255

Open
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:fix/admin-mode-command-center-308595
Open

Fix Administrator label missing in command center#309255
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:fix/admin-mode-command-center-308595

Conversation

@yogeshwaran-c
Copy link
Copy Markdown
Contributor

Summary

  • The [Administrator] label stopped appearing in the command center search bar because the AgentTitleBarStatusWidget (which replaces the default command center in compact/agent mode) creates its own WindowTitle instance that never receives the isAdmin/isPure property updates flowing through the title service
  • Expose titleProperties and onDidChangeTitleProperties on the ITitlebarPart interface, then sync these properties from the title service into the widget's WindowTitle so getTitleDecorations() returns the correct [Administrator] suffix

Fixes #308595

Test plan

  • Run VS Code as Administrator on Windows
  • Verify [Administrator] label appears in the command center search bar with default settings (agent status compact mode)
  • Verify [Administrator] label appears when agent status is in non-compact mode
  • Verify [Administrator] label appears in the plain text title bar when command center is disabled
  • On Linux, verify [Superuser] label appears when running as root

The AgentTitleBarStatusWidget creates its own WindowTitle instance to
render the command center label, but this instance never received the
isAdmin/isPure property updates that flow through the title service.
As a result, getTitleDecorations() always returned an empty suffix,
and the [Administrator] label was never shown in the agent status pill
that replaces the default command center.

Fix by exposing titleProperties and onDidChangeTitleProperties on the
ITitlebarPart interface, then syncing properties from the title service
to the widget's WindowTitle instance.

Fixes microsoft#308595
@vs-code-engineering
Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

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

@bpasero

Matched files:

  • src/vs/workbench/browser/parts/titlebar/titlebarPart.ts

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.

Administrator mode doesn't show up in search bar like earlier

2 participants