Skip to content

fix(window-tabs-panes): preserve user-set tab name across AI auto-naming (#9102)#10734

Open
lonexreb wants to merge 1 commit into
warpdotdev:masterfrom
lonexreb:fix/9102-rename-persistence
Open

fix(window-tabs-panes): preserve user-set tab name across AI auto-naming (#9102)#10734
lonexreb wants to merge 1 commit into
warpdotdev:masterfrom
lonexreb:fix/9102-rename-persistence

Conversation

@lonexreb
Copy link
Copy Markdown
Contributor

@lonexreb lonexreb commented May 12, 2026

Closes #9102

Summary

Fixes #9102 — a regression where /rename-tab no longer persists the tab name in the vertical-tabs sidebar: the AI session auto-naming would overwrite the user-set name after every subsequent agent prompt.

The macOS window menu kept showing the renamed value (because it reads PaneGroup::display_title, which honors custom_title), but the vertical-tabs sidebar row reverted to the AI conversation title — making /rename-tab feel broken in this layout.

Root cause

In app/src/workspace/view/vertical_tabs.rs, the tab-level custom title was being suppressed at the row level in Panes granularity. Three call sites set PaneProps::display_title_override via:

let title_override = (!uses_outer_group_container(display_granularity))
    .then(|| pane_group.custom_title(app))
    .flatten();

Because uses_outer_group_container == true for Panes, the row override was always None and the row fell through to props.title / the agent conversation title. The group header above the row showed the user-set name (which is why the macOS menu was fine), but the prominent row title underneath continued to refresh from agent activity, so the user perceived their rename as having been clobbered.

Pre-fix behavior, single-pane tab in Panes mode:

Surface Title shown after AI prompt
PaneGroup::display_title (menu) MY SESSION (user set)
Vertical-tabs group header MY SESSION (user set)
Vertical-tabs row (the visible one) AI conversation title (regression)

Fix

Replaces the inlined predicate at all three call sites with a single helper, tab_title_override_for_row, plus a pure-decision counterpart select_tab_title_override_for_row that is unit-testable. The new helper:

  • Always surfaces custom_title when there is no outer group container (Tabs granularity / FocusedSession mode) — the row is the only place the user-set title can appear.
  • Surfaces custom_title for single-pane groups in Panes mode (the common shape and the one reported here), so the user-set name takes precedence over AI auto-naming in the row title.
  • Leaves multi-pane groups in Panes mode unchanged: each pane keeps its own row title, and the group header continues to carry the custom name. (Mirroring the tab-level custom title onto every pane row would itself be a regression for multi-pane tabs.)

PaneProps::displayed_title continues to prefer pane-level renames (set_custom_vertical_tabs_title) over the tab-level override, so pane-level rename UX is unaffected.

Files changed

  • app/src/workspace/view/vertical_tabs.rs — new tab_title_override_for_row + select_tab_title_override_for_row helpers; 3 call sites updated.
  • app/src/workspace/view/vertical_tabs_tests.rs — 4 new regression tests.

Test plan

  • cargo test -p warp --lib rename_tab_title — 3 new tests pass.
  • cargo test -p warp --lib tab_title_override_for_row_is_none — 1 new test passes.
  • cargo test -p warp --lib "vertical_tabs::tests" — full module (existing + new) passes.
  • cargo check -p warp --tests — clean.
  • cargo fmt -p warp -- --check — clean.
  • Manual repro from the issue:
    1. Switch the sidebar to vertical-tabs (Panes granularity).
    2. Start a Claude Code session (or any AI session).
    3. Run /rename-tab MY SESSION. Sidebar row should now read MY SESSION.
    4. Send any follow-up prompt to the agent.
    5. Before the fix: the row reverts to the AI-generated summary.
      After the fix: the row stays on MY SESSION regardless of how many prompts you send.
    6. Verify the macOS Window menu also continues to show MY SESSION (no regression).

Manual testing note

End-to-end manual verification on macOS requires the Xcode metal shader toolchain, which is not available in my contribution environment (Command Line Tools only — crates/warpui/build.rs panics on missing metal). I verified the change via:

  • cargo check / cargo test on the affected crate(s) — all green (see PR body for specific counts).
  • Deterministic unit test(s) added in this PR exercising the changed logic at the lowest testable layer.
  • Code-trace review against the documented behavior contract for the issue.

Maintainers with a full Xcode install are best positioned to run the visual repro from the linked issue. Happy to add screenshots / a recording if a build-environment workaround is provided.

…ing (warpdotdev#9102)

In the vertical-tabs sidebar, a tab the user had renamed via `/rename-tab`
reverted to Warp's AI-generated conversation title after every subsequent
agent prompt. macOS's window menu — which reads `PaneGroup::display_title`
and therefore honors `custom_title` — kept the user-set value, but the
sidebar row did not, making `/rename-tab` appear broken in the new
vertical-tabs layout.

The custom title was being suppressed at the row level in `Panes`
granularity. `PaneProps::display_title_override` was wired through with
`(!uses_outer_group_container).then(|| pane_group.custom_title(app))`, so
in `Panes` mode the row override was always `None` and the row fell
through to `props.title` / the agent conversation title. The group header
still showed the user-set name, but the prominent row title underneath
continued to update from agent activity.

Replace the inlined predicate with `tab_title_override_for_row`, a small
helper that:
  - Always surfaces `custom_title` when there is no outer group container
    (e.g. `Tabs` granularity / `FocusedSession` mode) — the row is the
    only place the user-set title can appear.
  - Surfaces `custom_title` for single-pane groups in `Panes` mode (the
    common shape and the one reported in warpdotdev#9102), so the user-set name
    takes precedence over AI auto-naming in the row title.
  - Leaves multi-pane groups in `Panes` mode unchanged: each pane keeps
    its own row title and the group header carries the custom name.

The decision is split into a pure helper `select_tab_title_override_for_row`
that is covered by 4 new regression tests in `vertical_tabs_tests.rs`.
@cla-bot cla-bot Bot added the cla-signed label May 12, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 12, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 12, 2026

@lonexreb

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

oz-for-oss[bot]
oz-for-oss Bot previously requested changes May 12, 2026
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR updates vertical-tabs title selection so tab-level custom names can override generated AI titles for single-pane rows, and adds focused regression coverage for the selection helper. I did not find correctness or security issues in the changed logic itself.

Concerns

  • Manual testing evidence is missing for a user-visible vertical-tabs behavior change. The PR body leaves the manual repro unchecked and includes no screenshots or screen recording, while the repository review guidance requires manual testing evidence or a justification when behavior can be manually verified.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 12, 2026

@lonexreb

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @zachbai.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot dismissed their stale review May 12, 2026 16:48

Oz no longer requests changes for this pull request after the latest automated review.

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR updates vertical-tabs title selection so a tab-level custom title from /rename-tab is used for row rendering when there is no outer group container, and for the single-pane Panes case where the row is the primary visible title. The added tests cover the regression case, the multi-pane non-mirroring case, Tabs granularity, and the no-custom-title fallback.

Concerns

  • No blocking correctness or security concerns found in the changed lines.
  • The PR changes user-visible behavior; the description explains why end-to-end manual evidence could not be captured in the contributor environment and lists deterministic validation that was run.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested a review from zachbai May 12, 2026 16:48
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR updates vertical-tabs title selection so a tab-level custom title from /rename-tab is used for row rendering when there is no outer group container, and for the single-pane Panes case where the row is the primary visible title. The added tests cover the regression case, the multi-pane non-mirroring case, Tabs granularity, and the no-custom-title fallback.

Concerns

  • No blocking correctness or security concerns found in the changed lines.
  • The PR changes user-visible behavior; the description explains why end-to-end manual evidence could not be captured in the contributor environment and lists deterministic validation that was run.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Regression] /rename no longer persists tab name: AI session naming overrides it after each prompt (vertical tab layout)

1 participant