fix(dashboard): align submenu rows with the rest of the menu - #1205
Merged
Conversation
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
marked this pull request as ready for review
July 25, 2026 22:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
In the session ⋮ menu,
Open in editorsat noticeably right of every other row.DropdownMenuSubTriggerputjustify-betweenon 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-1wrapper around the label.AgentModelMenuandOptionsMenuhappen to do that;SessionActionsMenudoes 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:
After: all six at
723.The second capture landed on a multi-package project, which also exercises the
Servetrigger'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.