Skip to content

fix: update window title when the active workspace is renamed - #2785

Closed
JC-Chung wants to merge 1 commit into
sourcegit-scm:developfrom
JC-Chung:fix/update-title-on-workspace-rename
Closed

JC-Chung wants to merge 1 commit into
sourcegit-scm:developfrom
JC-Chung:fix/update-title-on-workspace-rename

Conversation

@JC-Chung

Copy link
Copy Markdown
Contributor

Summary

When a workspace is renamed via the "Configure Workspace" dialog, the main window title (shown in the taskbar) keeps displaying the old name until the next ActivePage/ActiveWorkspace change triggers PostActivePageChanged().

Root Cause

Launcher.Title is a snapshot string built in PostActivePageChanged(). Nothing subscribes to Workspace.Name changes, so renaming the active workspace never rebuilds the title.

Changes

  • src/ViewModels/Launcher.cs
    • Subscribe to Workspace.PropertyChanged in the ActiveWorkspace setter (unsubscribing the previous workspace to avoid stale handlers).
    • Add OnActiveWorkspacePropertyChanged, which calls PostActivePageChanged() when Name changes on the active workspace.

The existing _ignoreIndexChange guard inside PostActivePageChanged() prevents redundant rebuilds during SwitchWorkspace().

Test

  1. Create two workspaces so the workspace name appears in the window title.
  2. Open "Configure Workspace" and rename the active workspace.
  3. The window title now updates immediately; previously it stayed stale until switching tabs or workspaces.

love-linger added a commit that referenced this pull request Oct 15, 2026
…ry changed (#2785)

Signed-off-by: leo <longshuang@msn.cn>
@love-linger

Copy link
Copy Markdown
Collaborator

I've pushed my fixed for this BUG.

love-linger added a commit that referenced this pull request Oct 15, 2026
…ry changed (#2785)

Signed-off-by: leo <longshuang@msn.cn>
@JC-Chung JC-Chung closed this Oct 15, 2026
@JC-Chung
JC-Chung deleted the fix/update-title-on-workspace-rename branch October 15, 2026 08:34
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.

2 participants