Skip to content

Bound the vehicle menu's width in the top bar - #468

Merged
vcanuel merged 1 commit into
mainfrom
fix/long-vehicle-label
Nov 25, 2026
Merged

vcanuel merged 1 commit into
mainfrom
fix/long-vehicle-label

Conversation

@vcanuel

@vcanuel vcanuel commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

A long vehicle label (a Polestar 4's variant: "Polestar 4 Long Range Single Motor / Dual Motor (coupé and SUV) · 2024") pushed the account's menu out of the top bar, so that it could no longer be clicked, on a desktop window as on a phone.

The bar already bounded the vehicle menu (.picker: max-inline-size: 26rem, min-inline-size: 0, shrinkable), but it gave that class to VehicleMenu, whose root is a v-menu: Vuetify hands its attributes to the overlay, not to the button. The class never reached the bar, and the button kept its whole label (577 px). The bound now has an element of its own around the menu, so that the label truncates (its text-truncate was there already) and the account's menu stays in reach.

Changes

  • AppShell.vue: VehicleMenu wrapped in a div.picker, the bound unchanged.
  • AppShell.test.ts: the vehicle menu's button lies within the bound (fails without the change).

Screenshots

A Polestar 4 of the simulator (polestar2 scenario, variant ps4-2024 chosen), the bar of the vehicle's page. Before: in a 760 px desktop window the account's button starts at 743 px, beyond reach; on a Pixel 7 (412 px) the bar overflows the page and the button sits at 458 px. After: the label is cut at 416 px (26rem) on a desktop window, at the width left on a phone, and the account's button is in view and clickable (also checked at 620 and 320 px).

Before After
Desktop 760 px, light
Desktop 760 px, dark
Pixel 7, light
Pixel 7, dark

Tests

  • task web-lint: passes (2 warnings, pre-existing).
  • task web-test: 2071 tests pass, coverage unchanged.
  • Not run locally: task unit-go, task integration, task system (no Go change; left to the CI).
  • No text, API or fixture changed.

Closes #466

🤖 Generated with Claude Code

The bar gave the vehicle menu the class that bounds it, but the menu's root is a
v-menu, which hands its attributes to its overlay: the button kept its whole label,
and a long one (a Polestar 4's variant) pushed the account's menu out of the bar,
on a desktop window as on a phone. The bound now has an element of its own around
the menu, so that the label truncates and the account's menu stays in reach.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@vcanuel
vcanuel merged commit 6db5780 into main Nov 25, 2026
7 of 8 checks passed
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.

A long vehicle name pushes the account menu out of reach

1 participant