Repository navigation
Branch picker chevrons: give back the 24px hit target in the same 20px slot - #12781
Conversation
…x slot #12735 shrank .aui-branch-chevron-btn from 24x32 to 20x20 to make the chevrons read as part of the count. That dropped them under the 24px every footer control keeps since #12173, which playwright_user_message_time.py checks, so 'Frontend build + bundle sanity' fails on main once its earlier steps pass (#12770, #12772). Size the button 24px and take the extra 4px back with a -2px margin. Every footer element stays where it was and the glyph centres do not move; only the clickable area grows, and with no hover fill it is not visible.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8357530d0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @apply inline-flex size-[calc(20px*var(--ui-space-scale,1))] shrink-0 cursor-pointer items-center justify-center rounded-full p-0 text-chat-icon-fg transition-colors hover:text-black active:text-black dark:hover:text-white dark:active:text-white focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:text-chat-icon-fg dark:disabled:hover:text-chat-icon-fg; | ||
| /* A 24px hit target (the size #12173 guarantees every footer control) in the 20px slot the layout was | ||
| tuned to: the -2px margin gives the extra 4px back, so nothing moves and there is no fill to show it. */ | ||
| @apply inline-flex -m-[calc(2px*var(--ui-space-scale,1))] size-[calc(24px*var(--ui-space-scale,1))] shrink-0 cursor-pointer items-center justify-center rounded-full p-0 text-chat-icon-fg transition-colors hover:text-black active:text-black dark:hover:text-white dark:active:text-white focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:text-chat-icon-fg dark:disabled:hover:text-chat-icon-fg; |
There was a problem hiding this comment.
Clamp the chevron hit target to at least 24px
Because both the size and margin are multiplied by --ui-space-scale, this still violates the 24px guarantee for supported smaller UI settings. For example, the minimum 12px UI font sets the spacing scale to 0.8, producing a 19.2px button; browser interface scales below 100% shrink it further. The existing layout test only exercises the default and enlarged spacing scales, so it passes without covering this case. Keep the visual slot scaled if desired, but clamp the actual button box to a 24px minimum.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Correct: at the 12px UI font size --ui-space-scale is 0.8, and the scaled target came out at 19.2px. Fixed in 77caffb: the size is now max(24px, the scaled 20px slot), and the margin hands back the difference, so the slot and glyph centres still follow the scale (checked at 12, 14 and 20px, centres unchanged) while the hit area never drops below 24px. The browser check now includes the 12px layout; with the previous commit it fails there at width 19.19.
…e scale 24px * --ui-space-scale fell to 19.2px at the 12px UI font size (scale 0.8). Size the target as max(24px, the scaled 20px slot) and hand the difference back with the margin, so the slot and the glyph centre still follow the scale while the hit area never drops under 24px. Add the 12px layout to playwright_user_message_time.py, which only covered 15px and 20px and so could not see it.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77caffb964
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| --aui-chevron-hit: max(24px, var(--aui-chevron-slot)); | ||
| width: var(--aui-chevron-hit); | ||
| height: var(--aui-chevron-hit); | ||
| margin: calc((var(--aui-chevron-slot) - var(--aui-chevron-hit)) / 2); |
There was a problem hiding this comment.
Prevent clamped chevrons from overlapping actions
At the browser's supported 50% Interface Scale setting, --ui-space-scale is 0.5 with the default font, so this creates a 24px button with -7px margins on every side while the production picker has only a 3px left margin. The Previous button therefore overlaps the preceding user-action button by 4px and, because the picker occurs later in the DOM, wins hit testing in that strip, so clicking the edge of More can navigate branches instead. The added test only reaches a 0.8 spacing scale and checks dimensions and viewport bounds, so it cannot detect this pointer-target collision; the 24px target needs to be retained without returning more space than the gap permits.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Right, and it was worse than 50%: at the 12px UI font with 100% Interface Scale the symmetric margin already pushed Previous 2.4px over Delete. Fixed in 294df4e: the extra width now goes only toward the count between the chevrons (not a control), with padding keeping the glyph centre where it was (checked at 12, 15 and 20px), and the floor is 24px times the browser Interface Scale, like browser zoom. The browser check now asserts no two footer controls overlap (as boxes, since large layouts wrap the picker) and covers 50% Interface Scale at 12px; the previous commit fails the overlap check.
… its floor with Interface Scale The symmetric -extra/2 margin pushed Previous over the Delete/More button beside it: at the 12px UI font the gap is 1.6px and the extra 8px, and at the browser's 50% Interface Scale a fixed 24px reached 7px past the slot. In an overlap the later element wins the click. Put the extra on the inner side only (toward the count, which is not a control), with padding keeping the glyph where it was, and make the floor 24px times the browser Interface Scale, as browser zoom would. The browser check now asserts no two footer controls overlap and adds the 50% Interface Scale layout; the previous commit fails the overlap check at 12px.
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…tton and focus ring stay as drawn Growing the button itself moved its focus ring: a 24px circle off the glyph's centre and over the count. The button is back to the 20px slot, scaled; an invisible positioned ::before carries the extra toward the count, and, being positioned, paints over the count so presses there reach the chevron (the previous padding never did: the count, painted later, took them). The layout check now measures each control's real target by hit testing the middle of every edge, and requires the chevron's own box to stay square and unpadded so the ring stays centred on the glyph.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e043fff2b8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| inset-inline-end: calc(var(--aui-chevron-extra) * -1); | ||
| } | ||
| .aui-branch-chevron-btn:last-child::before { | ||
| inset-inline-start: calc(var(--aui-chevron-extra) * -1); |
There was a problem hiding this comment.
Reserve count space before extending both chevrons
When the minimum UI font size is combined with a narrow custom chat font, each pseudo-element extends 8px toward the count, but the count has no corresponding 16px minimum width. Studio permits arbitrary imported chat fonts, so a short value such as 1/2 can be narrower than the combined extensions; the two hit targets then overlap, and the later Next button wins hit testing on part of Previous. The fixture's font-mono count is wide enough to hide this case, so reserve sufficient count width or otherwise prevent the inward extensions from meeting.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Correct, the fixture's monospace count hid it. Fixed in 0a5aa6a: the count between the chevrons now has a minimum width of both extensions plus 1px (the slack keeps touching targets from trading a sub-pixel once snapped), with its text centred, so a wider count, the usual case, is unchanged (pixel comparisons against the merge base at UI font scales 0.75, 0.9375 and 1.25, idle and focused, are identical). The layout check gains a narrow-count layout at the 12px UI font; removing the minimum width fails it with Next taking Previous's inner edge.
…ions In a narrow custom chat font a short count such as 1/2 can be narrower than the two ::before extensions together, and Next would then win presses on the inner edge of Previous. The count now has a minimum width of both extensions plus 1px, centred; any count wider than that, the usual case, is untouched. The layout check gains a narrow-count layout at the smallest UI font.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a5aa6ab81
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .aui-branch-chevron-btn::before { | ||
| content: ""; | ||
| position: absolute; | ||
| inset-block: calc(var(--aui-chevron-extra) / -2); |
There was a problem hiding this comment.
Reserve vertical room for expanded chevrons
At the supported 12px UI font and 200% Interface Scale, --ui-space-scale is 1.6, so the chevron box is 32px but this pseudo-element extends 8px above and below it to form a 48px target. In a narrow viewport the action controls and branch picker wrap onto separate lines, while UserMessageFooter provides only a scaled gap-y-1 (6.4px), causing each chevron target to overlap the preceding action row by 1.6px; because the picker is later in the DOM, clicking the lower edge of an action can navigate branches instead. The layout matrix only exercises 50% Interface Scale, so it misses this supported maximum-scale case; reserve enough cross-axis space whenever the picker wraps.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Correct. Fixed in b38a688: the chevrons carry block margins of half the extra, so the space above and below the box that the target covers is reserved in layout. In one row with the action buttons that fits inside the row's height and nothing moves (the 0.75 UI font scale footer is pixel-identical to the merge base, and at larger font scales the extra is smaller or zero); when the picker wraps onto its own row, that row grows to hold its targets instead of reaching across the gap. The layout check gains 200% Interface Scale layouts at 375 and 320px at the 12px UI font; the previous head fails them with Previous taking the lower edge of an action button.
At 200% Interface Scale and the 12px UI font the target reaches 8px past the box on each side, more than the footer's 6.4px row gap, so once the picker wrapped onto its own row it took the lower edge of the action buttons above. The chevrons now carry block margins of half the extra: inside one row with the actions they fit in the row's height and nothing moves; a wrapped picker row grows to hold its targets. The layout check gains 200% layouts at 375 and 320px; the previous head fails them.
9184edc to
b38a688
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Frontend build + bundle sanityfails on main in itsBrowser check for user message timestampsstep (for example #12770 and #12772):It reproduces locally on main (
d68515afd0and later). It was hidden until the earlier steps of that job went green (#12749, #12763).Which side is wrong
#12735 restyled the branch picker chevrons as small glyphs with no hover fill. In doing so it changed
.aui-branch-chevron-btnfromh-8 w-6(32x24) tosize-[20px]. #12173 made 24px the minimum for every control in the user message footer ("Copy/Edit/Fork/Delete and branch targets must retain their size"), which is the WCAG 2.2 target-size floor. The test is right. The visual change in #12735 is intended, but the hit area did not need to shrink with it.Change
The chevron button itself is unchanged: still the 20px slot, scaled, so the glyph, the hover colour and the keyboard focus ring are drawn exactly as on main. An invisible, absolutely positioned
::beforeextends the hit target to at least 24px:1/2count between the chevrons, which is not a control, never toward Delete on the outer side, which at small font sizes sits closer than the extra.::beforepaints over the count, so a press on that extra width reaches the chevron. Padding or a larger box does not: the count is painted later and takes the press.Verification
tests/studio/playwright_user_message_time.pynow measures each footer control's real target (its box plus any positioned::before) and hit tests the middle of every edge withelementFromPoint, at nine layouts including the 12px font, 50% and 200% Interface Scale, and a narrow count. It also requires no two targets to overlap, and the chevron's own box to stay square and unpadded so the focus ring stays centred on the glyph.::beforewithpointer-events: none::beforeextended on both sidesPixel comparisons against the merge base in the test fixture (375px, en):
Nothing on screen moves. Only the area that accepts a press grows.