fix(window-tabs-panes): preserve user-set tab name across AI auto-naming (#9102)#10734
fix(window-tabs-panes): preserve user-set tab name across AI auto-naming (#9102)#10734lonexreb wants to merge 1 commit into
Conversation
…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`.
|
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 Powered by Oz |
There was a problem hiding this comment.
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
|
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: Comment Powered by Oz |
Oz no longer requests changes for this pull request after the latest automated review.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Closes #9102
Summary
Fixes #9102 — a regression where
/rename-tabno 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 honorscustom_title), but the vertical-tabs sidebar row reverted to the AI conversation title — making/rename-tabfeel 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 inPanesgranularity. Three call sites setPaneProps::display_title_overridevia:Because
uses_outer_group_container == trueforPanes, the row override was alwaysNoneand the row fell through toprops.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
Panesmode:PaneGroup::display_title(menu)MY SESSION(user set)MY SESSION(user set)Fix
Replaces the inlined predicate at all three call sites with a single helper,
tab_title_override_for_row, plus a pure-decision counterpartselect_tab_title_override_for_rowthat is unit-testable. The new helper:custom_titlewhen there is no outer group container (Tabsgranularity /FocusedSessionmode) — the row is the only place the user-set title can appear.custom_titlefor single-pane groups inPanesmode (the common shape and the one reported here), so the user-set name takes precedence over AI auto-naming in the row title.Panesmode 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_titlecontinues 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— newtab_title_override_for_row+select_tab_title_override_for_rowhelpers; 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.Panesgranularity)./rename-tab MY SESSION. Sidebar row should now readMY SESSION.After the fix: the row stays on
MY SESSIONregardless of how many prompts you send.MY SESSION(no regression).Manual testing note
End-to-end manual verification on macOS requires the Xcode
metalshader toolchain, which is not available in my contribution environment (Command Line Tools only —crates/warpui/build.rspanics on missingmetal). I verified the change via:cargo check/cargo teston the affected crate(s) — all green (see PR body for specific counts).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.