Skip to content

fix(dashboard): align submenu rows with the rest of the menu - #1205

Merged
suleimansh merged 1 commit into
mainfrom
fix/submenu-trigger-alignment
Jul 25, 2026
Merged

fix(dashboard): align submenu rows with the rest of the menu#1205
suleimansh merged 1 commit into
mainfrom
fix/submenu-trigger-alignment

Conversation

@suleimansh

Copy link
Copy Markdown
Member

The bug

In the session ⋮ menu, Open in editor sat noticeably right of every other row.

DropdownMenuSubTrigger put justify-between on the row so the chevron would sit at the far end. But justifying the row spreads every child, not just the last one, so a trigger whose label is plain text had that label pushed toward the middle while ordinary items sat left against their icon.

The only way to sit straight was to remember a flex-1 wrapper around the label. AgentModelMenu and OptionsMenu happen to do that; SessionActionsMenu does not, in two places.

The fix

The chevron moves itself to the end with ml-auto, and the row keeps ordinary item layout. Both ways of writing a trigger now align identically, so the next call site cannot get it wrong.

Measured, not eyeballed

Driven in real Chrome against the live dashboard, reading the left edge of each label's glyphs with a DOM Range (an element box would measure the row for a bare-text label and the wrapper for a wrapped one, which is not a comparison).

Before:

Open on GitHub          723
Open project folder     723
Open in editor          775.8   <-
Copy resume command     723
Serve                   723
Delete session          723

After: all six at 723.

The second capture landed on a multi-package project, which also exercises the Serve trigger's submenu form. It aligns too.

Tests

dashboard 495 pass / 0 fail, typecheck and build clean. No unit test: this is a layout property jsdom cannot observe, so the browser measurement above is the evidence.

DropdownMenuSubTrigger justified its row to push the chevron to the end,
which spread every child apart, so a trigger whose label is plain text had
that label centred between the icon and the chevron while ordinary rows sat
left. The only way to sit straight was to remember a flex-1 wrapper, which
two of the three call sites did and the session menu did not.

The chevron now takes ml-auto and the row keeps normal item layout, so both
ways of writing a trigger align identically.

Measured in Chrome against the live dashboard: before, 'Open in editor'
started at x=775.8 while its five siblings started at x=723; after, all six
start at 723.
@suleimansh suleimansh self-assigned this Jul 25, 2026
@suleimansh
suleimansh marked this pull request as ready for review July 25, 2026 22:32
@suleimansh
suleimansh merged commit 11bd367 into main Jul 25, 2026
1 check passed
@suleimansh
suleimansh deleted the fix/submenu-trigger-alignment branch July 25, 2026 22:32
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