Skip to content

fix: only promote live panel titles to the workspace title - #146

Merged
arzafran merged 1 commit into
mainfrom
fix/title-guard-seeded-placeholders
Jul 20, 2026
Merged

fix: only promote live panel titles to the workspace title#146
arzafran merged 1 commit into
mainfrom
fix/title-guard-seeded-placeholders

Conversation

@arzafran

Copy link
Copy Markdown
Member

What this does

Fixes the unit-test failure blocking main CI (and therefore the auto-release) since #144 merged. Workspace sidebar titles could be overwritten by the generic placeholder title a panel gets at creation, which is what broke the session-snapshot test.

Summary

  • The focus-change re-derivation added in fix: split workspaces keep sidebar titles updated #144 read panelTitles, but every panel-creation path seeds that map with the panel's displayTitle placeholder. A focus change could then replace a workspace's numbered default title ("Terminal 2") with the placeholder ("Terminal"), which is exactly what TabManagerSessionSnapshotTests.testSessionSnapshotExcludesRemoteWorkspacesFromRestore caught.
  • New panelsWithLiveTitle set tracks panels whose title came from a real update (OSC title or session restore). refreshWorkspaceTitleFromFocusedPanel now promotes only those; placeholder seeds still drive the in-workspace tab strip but never the sidebar title.
  • Pruned alongside the other per-panel metadata in pruneSurfaceMetadata.

Test Plan

  • TabManagerSessionSnapshotTests all pass locally (the failing test reproduced deterministically before this change)
  • tests_v2/test_workspace_split_title_updates.py still fully green against a tagged debug build (the fix: split workspaces keep sidebar titles updated #144 behavior is preserved)
  • CI green

The focus-change re-derivation from #144 read panelTitles, which every
panel-creation path seeds with the panel's displayTitle placeholder. A
focus change could then overwrite a workspace's numbered default title
(Terminal 2) with the generic placeholder (Terminal), which broke
TabManagerSessionSnapshotTests.testSessionSnapshotExcludesRemoteWorkspacesFromRestore
on main.

Track which panels have received a real title (OSC update or session
restore) in panelsWithLiveTitle and let refreshWorkspaceTitleFromFocusedPanel
promote only those. Placeholder seeds still drive the in-workspace tab
strip, never the sidebar title.

Verified: TabManagerSessionSnapshotTests all pass locally (red before),
tests_v2/test_workspace_split_title_updates.py still all green against a
tagged build.
@arzafran
arzafran merged commit 206031f into main Jul 20, 2026
4 of 7 checks passed
@arzafran
arzafran deleted the fix/title-guard-seeded-placeholders branch July 20, 2026 18:20
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.

1 participant