Incorrect filename display title bar when using pop up windows

Steps to reproduce

  • In the settings screen, select “Obsidian frame” under Window frame style in the Appearance section.
  • Launch a sandbox vault.
  • Right-click any wikilink in a note and select “Open in new window” (for example, “I have no prior experience” in “Start Here” note).
  • In the new window that appears, click any wikilink (for example, “I don’t want my notes to been seen by others” in “No prior experience” note).
  • The filename that should be displayed in the window’s title bar shows the name of the previously displayed file instead of the current one. (It shows “No prior experience” instead of “Vault is just a local folder”)

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

The title of the currently displayed note should appear in the pop-out window’s title bar.

Actual result

The title of the previously displayed note is shown instead.

Environment

SYSTEM INFO:
Obsidian version: v1.8.1
Installer version: v1.6.7
Operating system: Windows 11 Home 10.0.22631
Login status: logged in
Language: ja
Catalyst license: vip
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none


Additional information

I often use the “Open in new window” feature, so having a discrepancy between the title bar display and the actual note tends to be confusing. I would greatly appreciate if this could be fixed.

Steps to reproduce

  • Open a popout window with a note in it, that’s different from the current note in the main window
  • Switch between both windows, verifying that each window’s title correspond to the name of the note in that window
  • In the popout window, click to open a new tab

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

The popout window’s title should change, and the main window’s title should stay as it was

Actual result

The main window’s title changes to “New Tab”

Environment

SYSTEM INFO:
Obsidian version: v1.8.9
Installer version: v1.8.9
Operating system: Windows 10 Pro 10.0.19045
Login status: logged in
Catalyst license: supporter
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

The above is not the only way to repro, just the simplest. The root issue is that app.workspace.updateTitle() sets the title from the active leaf (regardless of what window it’s in), instead of from the most recently-active leaf in the main window. And it’s called whenever the workspace layout changes, not just when a main window leaf becomes active. So any layout change while a popout window is active will corrupt the main window title.

thank you

Both will be fixed 1.9