Skip to content

fix(ui-kit, ui-react): interactive FilterRow pills reach 44px by default (#4086) - #4096

Merged
schlessera merged 8 commits into
mainfrom
fix/4086-filterrow-default-reach
Nov 16, 2026
Merged

schlessera merged 8 commits into
mainfrom
fix/4086-filterrow-default-reach

Conversation

@schlessera

@schlessera schlessera commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Closes #4086

What changed

Interactive FilterRow pills now reach a 44px touch target by default, as ruled on #3531. Under any-pointer: coarse every pill with an onClick carries .bk-hit, keeps its 20.5px paint height, and paints at least 44px wide (maintainer decision on #4086, 2026-11-16), so no pill reaches sideways. The strip's clipping moves into .bk-filter-row, which clips only horizontally on touch so the vertical reach gets through. Fine-pointer paint and decorative pills are unchanged, and FilterRowProps is unchanged. The file viewer drops its 44px Preview/Raw overrides and gets a 20px coarse row gap. The Actions dismissal reasons take the kit pill geometry (29.5px) with bk-control bk-hit and a 16px coarse row gap; their focus ring is now outside (+2px), and their names and pressed state are unchanged. The design-kit record gains the narrow-pill ruling and a corrected rationale for the viewer gap.

Caller audit (inventory re-run at this head: git grep -n "<FilterRow\|<Segmented" -- packages)

Caller Finding Correction
file-viewer-frame.tsx Preview/Raw Raw paints 40px, so its reach would be clipped at the strip's end. Its 44px overrides drew the pill. Overrides removed. On touch Raw paints 44px wide. 20px coarse row gap as ruled. Every control on the line above is a 44px box today, which 12px already clears, so the gap guards against a later reaching control.
activity-page.tsx lens row Pills 64–88px wide. None needed: the probes show every pill and every control within 44px owns its edges.
Graph Direction (graph-controls.tsx:129) In 31px, Out 41px: In's left reach would be clipped and In/Out would overlap across the 6px gap. The 44px coarse minimum width (kit).
Graph Colour, Node size, Mode Widths ≥ 44px except as noted. The laptop column (overflow-y-auto, no top padding) does not clip the first row's vertical reach (probed). Already broken today: the 264px column cuts off "Maintenance" (~54px) and "Entity" (~3px). Filed as #4092. The scene expects exactly those two cut pills and holds them to their visible part.
Dismissal reasons (durable-actions.tsx) Raw chips with min-h-11. Kit pill + bk-control bk-hit + any-pointer-coarse:gap-y-4.
Kit stories (FilterRow, Keyboard, WeeklyReview, ScreenBody), focus-frames.visual.tsx Story pills ≥ 44px or static. None; the story and visual projects pass.

Why this shape

It follows the #3531 ruling recorded in docs/decisions/design-kit/components-and-interactions.md and the 2026-11-16 decision on #4086. A 44px minimum width on touch, rather than the record's 38px rule or per-caller fixes, removes sideways reach entirely: the end-of-strip clipping and the neighbour overlap both go away for every current and future caller (#3800's PR tabs included) without changing fine-pointer paint. The trade-off of overflow-x: clip: on touch, focusing a pill the strip has clipped no longer scrolls it into view. No current interactive row overflows except the #4092 column.

Proof

Real Chromium (pinned 1243) in the rail-fine, rail-coarse and rail-mixed projects, each a native pointer premise:

  • Kit filter-row-targets.visual.tsx (new). Failing first on main: In: carries the hit-area utility: expected false to be true, coarse widths 31,41,46, expected { x: 'hidden', y: 'hidden' } to deeply equal { x: 'clip', y: 'visible' }. After the change: coarse 5/5, fine 6/6, mixed 6/6. The tests probe 1px inside all four edges, click the extended top edge with a real mouse (fine and mixed lanes), check the inset focus ring, and check that static pills gain nothing.
  • App hit-reach.app.pointer.tsx (viewer toolbar with and without Share, graph Local and Clusters, at 320 and 1280). Failing first: tab "Preview": carries the hit-area utility / tab "In": …. After: 18/18 in each lane. At 320 the toolbar is asserted to wrap.
  • Actions navigation-reach.durable-actions.pointer.tsx (dismissal reasons wrapping at 320, lens row, at 320 and 1280). Failing first: button "Don't ask again": carries the hit-area utility, tab "needs you 2": …, and the row-14 focus offset. After: 118/118 in each lane.
  • Mutations (each restored):
    • Drop min-width: 44px → In: paints at least 44px wide … expected 31.
    • Drop bk-hit from pills → In: carries the hit-area utility and Out takes its own extended edge: … got 0 times.
    • Drop the dismissal row's any-pointer-coarse:gap-y-4 → button "Don't ask again": meets the touch floor … "bottom":"button \"Need more info\"" at 320 and 1280.
    • Drop the viewer's gap-y-5: no failure, as explained in the caller audit (no reaching control sits on the line above today).
  • Other suites:
    • Unchanged and passing on this host: unit and render (packages/ui-kit/tests, packages/ui-react/tests/render) 1862/1862; storybook FilterRow, Keyboard, WeeklyReview and ScreenBody stories 26/26; visual focus-frames 16/16; pointer navigation suites 258/258 in each lane; typecheck.
    • Not settled locally: the ui-react-layout Discovery screenshot cases mismatch on this host. The diff is font rendering across a header strip with no FilterRow in it, so the hosted pinned run is authoritative for those baselines.
  • Draft heavy feedback run 43888027367 at 219714eaa: every heavy job passed (layout 1–2, browser 2–3, captures, endurance, runtime, runtime_host, pack, unit) except browser (1). There the new kit probe also ran in the plain visual project, which has no pointer mode, and failed on its premise. It is now excluded from that project like native-buttons.
  • Contract: FilterRowProps and all exports are unchanged. This is rendering behaviour outside the package API's TypeScript surface (docs/integration-contract/package-api.md), so there is no contract entry. A patch changeset covers the published behaviour of brain-ui-kit and brain-ui-react.

Collisions (bun scripts/collisions.ts --json --pr 4096) at head 219714eaa: closure: #3054,#4096; closure: #3056,#4096; textual: #3059,#4096; closure: #3069,#4096; closure: #3581,#4096; closure: #3622,#4096; closure: #4002,#4096; closure: #4036,#4096; closure: #4051,#4096; closure: #4060,#4096; closure: #4068,#4096; closure: #4070,#4096; closure: #4071,#4096; closure: #4072,#4096; closure: #4073,#4096; closure: #4074,#4096; closure: #4075,#4096; closure: #4080,#4096; closure: #4093,#4096; closure: #4095,#4096. One textual collision: packages/ui-kit/vitest.config.ts with #3059, an evaluation-only draft marked DO NOT MERGE and idle since 2026-10-27. The rest are closure-category overlaps.

bun run check:pr --base origin/main
{"version":1,"kind":"brain-check-pr-receipt","head":"64a4638a92015f2806514f2626644eec0ac59526","base":"origin/main","mode":"focused","startedAt":"2026-11-16T18:22:12.051Z","finishedAt":"2026-11-16T18:23:22.561Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":13848.24588},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":113.16145699999834},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":74.99360800000068},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":21.50000700000237},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":56435.922915999996}]}

Checklist

  • Focused local preflight/behavioral receipts and complete selected hosted proof passed; actual head/base/job checkout evidence is in Proof.
  • Acceptance criteria from the issue are all met, or the gap is named below.
  • The PR and completed/advanced issues have verified release milestones under docs/process/github.md.
  • A changeset is included, or this changes nothing a consumer can see.
  • No personal data anywhere in the diff — the leakage gate covers the whole tree.
  • The integration contract index or relevant component is updated in this same commit, or nothing in the machine surface moved.
  • Docs under docs/ reflect the change, or nothing documented moved.
  • A fail-closed guard added or changed answers the proportionate-containment checklist in this body, or no guard changed.
  • Provider history stays append-only (docs/decisions/provider-history.md): the provider-history guard passes, or nothing on a turn's path changed.

Anything left open

🤖 Generated with Claude Code

schlessera and others added 4 commits November 16, 2026 14:08
Under a coarse pointer every pill with an onClick carries .bk-hit and
paints at least 44px wide, so it reaches 44px vertically and never
sideways. The strip clips horizontally only there, letting the vertical
reach through. Fine-pointer paint and the strip are unchanged, and
decorative pills never reach. The rail-lane browser test probes every
edge, clicks the extended edge with a real mouse, and keeps the inset
focus ring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… drawing it (#4086)

The file viewer drops its 44px overrides on the Preview/Raw pills, which
now reach through FilterRow's default, and widens its wrapped-row gap to
20px on touch. The Actions dismissal reasons take the kit pill geometry
(29.5px) with .bk-control.bk-hit and a 16px coarse row gap; their names
and pressed state are unchanged, and their focus ring now sits outside.

Pointer-lane scenes at 320 and 1280 probe the viewer toolbar, the graph
Local and Clusters controls, the Actions lens row and the dismiss
confirm. The design-kit record gains the 2026-11-16 ruling that narrow
pills paint 44px wide on touch, and corrects the viewer gap's rationale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera schlessera added this to the 0.45.0 milestone Nov 16, 2026
@schlessera schlessera added type: fix Something is broken and must behave the way it is documented. area: ui-react React chat/files/voice components, stores, WebSocket transport. area: ui-kit The presentational design kit: components, tokens, Storybook, visual baselines. labels Nov 16, 2026
@uploads-sh

uploads-sh Bot commented Nov 16, 2026

Copy link
Copy Markdown

No uploads on this PR yet

This PR changes UI files (packages/ui-kit/src/rows/FilterRow.tsx, packages/ui-kit/src/tokens.css, packages/ui-kit/tests/visual/filter-row-targets.visual.tsx and 4 more). Screenshots help reviewers see what changed.

  • From the CLI: uploads put before.png after.png --pr 4096
  • From an agent: ask it to attach screenshots with uploads.sh
  • By hand: drag images into the PR description and they're imported automatically
Tips for agents

Label each shot so reviewers know what they're seeing. Labels apply to every file in a call, so run one put per shot:

uploads put after.png --pr 4096 --meta path=/settings --state after --caption "Saved settings toast"
uploads put chat.png --pr 4096 --app ios --screen "Chat" --state after

No CLI? With the Uploads MCP, call sign_upload_url for files on disk (or put) with repo, pr: 4096 and the same screen, state and caption fields.

This comment updates with each upload, so you don't need to post the images yourself. A shot or two in the PR description is still welcome. Check what's attached with uploads list --pr 4096. More in the github-screenshots skill or the agent docs.

Workspace admins can turn this comment off in Settings → GitHub · docs

…l project (#4086)

It asserts a native pointer premise, so like native-buttons it runs only
in the rail projects; the visual project has no pointer mode and failed
it on the premise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera
schlessera marked this pull request as ready for review November 16, 2026 18:52
@schlessera
schlessera merged commit 8fd742d into main Nov 16, 2026
53 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui-kit The presentational design kit: components, tokens, Storybook, visual baselines. area: ui-react React chat/files/voice components, stores, WebSocket transport. type: fix Something is broken and must behave the way it is documented.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui-kit, ui-react: interactive FilterRow pills reach 44px by default, and the viewer and dismissal chips stop drawing a 44px pill

1 participant