Files
warp/app
R3flector 6ea1a52af1 Fix new-session "+" dropdown alignment when Tabs Panel is on the right (#9492)
## Description

Fixes #9485.

The "+" (new session) dropdown next to the vertical-tabs panel was
hardcoded to anchor `BottomLeft → TopLeft` (`view.rs`), so when the user
moved the Tabs Panel to the right side of the toolbar via "Edit toolbar"
the menu tried to expand to the right of the "+" button — which sits at
the right edge of the window. With `WindowBySize` clamping, the menu was
squashed into a narrow vertical strip of icons hugging the right edge of
the window (see screenshots in #9485).

This change makes the dropdown's anchor mirror the side the tabs panel
is on, matching the same pattern already used for the per-tab kebab menu
later in this file (`Self::tabs_panel_side(...)` + `BottomLeft/TopLeft`
vs `BottomRight/TopRight`):

- Tabs Panel on **left**: `BottomLeft → TopLeft` (menu opens to the
right — original layout, unchanged).
- Tabs Panel on **right**: `BottomRight → TopRight` (menu opens to the
left — fixes the bug).

The mapping is extracted into
`Workspace::vertical_tabs_dropdown_anchors` next to the existing
`tabs_panel_side` helper to keep the call site readable and
unit-testable.

### Out of scope (follow-up)

In the same render method, the "tab config" chip near the "+" button is
anchored `MiddleRight → TopLeft` regardless of side and almost certainly
has the same overflow problem when the panel is on the right. Keeping
this PR focused on the menu reported in #9485 — happy to file a
follow-up issue once this lands.

## Testing

- New unit test `test_vertical_tabs_dropdown_anchors_match_panel_side`
in `app/src/workspace/view_test.rs` asserts the anchor pair for both
`PanelPosition::Left` and `PanelPosition::Right`.
- Manually verified on Linux (CachyOS) on a local build:
- Tabs Panel on **left**: "+" menu opens cleanly to the right of the
button (regression check — unchanged).
- Tabs Panel on **right**: "+" menu opens cleanly to the left of the
button and is fully visible (the fixed case from #9485).
- Local checks: `cargo fmt --all -- --check` clean, `cargo clippy -p
warp --all-targets --tests --features gui -- -D warnings` clean, `cargo
test -p warp --features gui --lib workspace::view` 104 passed including
the new test.

## Agent Mode
- [ ] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

## Changelog Entries for Stable

CHANGELOG-BUG-FIX: Fix new-session "+" dropdown alignment when the Tabs
Panel is placed on the right side of the header toolbar.

---------

Co-authored-by: Oz <oz-agent@warp.dev>
Co-authored-by: harryalbert <65182701+harryalbert@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Harry <harryalbert364@gmail.com>
2026-05-04 15:38:04 -04:00
..