Skip to content

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

Closed

Description

@schlessera

Context

The maintainer ruled on #3531 (2026-11-08): every interactive FilterRow pill reaches 44px by default under any-pointer: coarse, with no opt-in prop. The viewer's Preview/Raw pills and the Actions dismissal-reason chips stop drawing a 44px pill. The ruling, the paint sizes and the spacing rules are recorded in docs/decisions/design-kit/components-and-interactions.md, "One hit-area utility reaches 44px past the paint (#3252)" and its 2026-11-08 follow-on for #3531. The design brief has the 320px and 1280px mocks, edge tables and rejected alternatives. Its geometry applies unchanged, except that reach is the default instead of a reach prop.

Verified at main 3b104890f:

  • (FilterRowProps, packages/ui-kit/src/rows/FilterRow.tsx:45-51) has no reach. (const row, packages/ui-kit/src/rows/FilterRow.tsx:68-74) clips the strip with overflow: hidden. The pill style (packages/ui-kit/src/rows/FilterRow.tsx:99-110) paints 4px 10px padding, 10.5px/1 type and a 1px border, about 20.5px tall.
  • (<div className=, packages/ui-react/src/components/files/file-viewer-frame.tsx:76-76) forces the Preview/Raw tabs to 44px boxes.
  • (function DismissConfirm, packages/ui-react/src/components/activity/durable-actions.tsx:453-485) draws raw aria-pressed buttons with bk-row min-h-11 (:478) in a flex flex-wrap gap-2 group.
  • .bk-hit lives in packages/ui-kit/src/tokens.css. The consumer probes are packages/ui-react/tests/browser/hit-reach.ts and hit-reach.app.pointer.tsx.

Interactive FilterRow callers to audit (inventory at 3b104890f)

Every one must meet the 44px floor and the neighbour rule before the default ships. Do not assume any already does.

Caller Pills Known risk
packages/ui-react/src/components/files/file-viewer-frame.tsx:77 Preview, Raw Raw is about 43px wide. Wrapped toolbar line above it (gap-y-3).
packages/ui-react/src/components/activity/activity-page.tsx:641 needs you N, running N, done N Neighbours inside space-y-6.
packages/ui-react/src/components/graph/graph-form.tsx:42 (Segmented), used at graph-controls-column.tsx:33 (Mode), graph-controls.tsx:89 (Colour), :129 (Direction: In / Out / Both), :194 (Node size) as listed "In" paints about 32px wide, under the 38px rule. The controls column is overflow-y-auto with no top padding, so the first row's vertical reach may clip. Stacked Fields sit gap-4 apart.
ui-kit stories: stories/rows/FilterRow.stories.tsx (all), stories/rules/Keyboard.stories.tsx:86, stories/screens/WeeklyReview.stories.tsx:101 story labels Story pills must meet the same rule, or be documented as fine-pointer demonstrations.
packages/ui-kit/tests/visual/focus-frames.visual.tsx:53 All, Ready Focus-frame baseline under coarse pointers.

Static rows (ScreenBody.stories.tsx:105, Keyboard.stories.tsx:226) have no onClick, so they gain no reach. Re-run the inventory (git grep -n "<FilterRow\|<Segmented" -- packages) at implementation time. #3800's GitHub PR tabs also reuse FilterRow and depend on this default.

Scope

  • ui-kit FilterRow: every pill with an onClick carries .bk-hit. A pill without one never does. Under a coarse pointer the strip clips only horizontally (overflow-x: clip; overflow-y: visible), so the vertical reach (about 11.75px a side) is not cut off. Height and fine-pointer paint are unchanged; only pills narrower than 44px widen, and only under a coarse pointer. Focus keeps bk-control-inset, because the strip still clips at its ends (ui-kit: fix focus frames clipped by rounded containers across the UI #1775). Under a coarse pointer every interactive pill paints at least 44px wide (centred label), so no pill has a horizontal reach: nothing is clipped at the strip ends and no reach crosses the 6px gap. Fine-pointer paint is unchanged. Document this on the component.
  • Every interactive caller in the inventory is corrected so it meets the 44px floor without overlap: narrow pills (minimum width or wider gap), clipping ancestors, and coarse-pointer row gaps for wrapped or stacked neighbours.
  • Viewer: drop the [&_[role=tab]]:min-h-[44px] min-w-[44px] overrides (file-viewer-frame.tsx:76) and add any-pointer-coarse:gap-y-5 to the toolbar's wrapped rows. Fine-pointer layout is unchanged.
  • Dismissal reasons: keep the raw aria-pressed buttons (raw-button: select). Use the kit pill geometry (6px 12px padding, 11.5px/1.35 type, radius 999, about 29.5px tall), swap bk-row min-h-11 for bk-control bk-hit, and add any-pointer-coarse:gap-y-4 on the group. Accessible names, aria-description, pressed state and colours stay as they are.
  • Update the design-kit record's caller notes if the audit changes any site, and assess the change under docs/integration-contract/package-api.md.

Out of scope

Acceptance criteria

  • Every interactive FilterRow pill carries .bk-hit and a static pill does not, proven in a kit browser test in the rail pointer lanes with an elementFromPoint probe 1px inside all four edges. Under a coarse pointer a pill narrower than 44px (for example In) paints 44px wide, keeps its height, and owns all four edges at the strip's start and end and beside a 6px neighbour. Under a fine pointer it keeps its paint.
  • Each caller in the inventory (re-run at implementation time) is listed in the PR with its finding and its correction, or the reason it needs none. The graph Direction row's "In" pill and the controls column's top clipping are resolved explicitly. The Mode row's pre-existing horizontal overflow in the 264px column is ui-react: the graph controls column cuts off the Mode row's Maintenance pill and the Colour row's Entity pill on laptop #4092, not this issue.
  • Real browser proof in hit-reach.app.pointer.tsx (fine, coarse and mixed lanes) at 320px and 1280px covers the viewer toolbar (markdown file, with and without Share), the dismiss confirm (wrapped to two or more rows at 320px), the activity lens row and the graph controls. Each 44px target reaches all four edges, and adjacent and stacked targets do not steal clicks. A real-mouse click on an extended edge activates the right pill.
  • Late and wrapped layouts are covered: the viewer toolbar wrapping at 320px, and the dismissal chips wrapping to multiple rows.
  • Keyboard behaviour is unchanged: roving tab stop, arrow activation, Enter/Space. Focus rings stay visible and unclipped (inset in the strip, outside on the chips). Dismissal chips keep aria-pressed and their accessible names.
  • Fine-pointer paint is unchanged: the existing visual and layout baselines hold, or any intended diff is reviewed.
  • Mutation receipt: drop .bk-hit from interactive pills, or remove one coarse row gap. The named probe fails on its edge assertion, then passes after restoring.
  • Contract: the PR states its assessment against docs/integration-contract/package-api.md. It adds any required entry, and the CONTRACT: prefix and contract label if an entry changes. It includes a changeset for the published @schlessera/brain-ui-kit behaviour change.

Verification

  • bun run test packages/ui-kit and bun run test packages/ui-react (render smoke and layout cases).
  • The pointer-lane browser projects for hit-reach.app.pointer.tsx and the kit FilterRow story probe, run in a real browser (with command-scoped sandbox escalation if needed), plus the failing-first and mutation receipts above.
  • bun run check:pr --base origin/main.

Contract impact

A public component's default behaviour changes: interactive FilterRow pills gain a coarse-pointer hit area and the strip's vertical overflow becomes visible under coarse pointers. No props change. Assess under docs/integration-contract/package-api.md and ship a changeset.

Refs #3531, #3252

2026-11-16: folded the maintainer decision (see comment): under a coarse pointer, interactive pills paint at least 44px wide instead of relying on the 38px rule; the kit proof is a rail-lane browser test; the Mode-row overflow found in the audit is #4092.

Activity

  1. added this to the 0.45.0 milestone on Nov 16, 2026
  2. added
    type: fixSomething is broken and must behave the way it is documented.
    area: ui-reactReact chat/files/voice components, stores, WebSocket transport.
    area: ui-kitThe presentational design kit: components, tokens, Storybook, visual baselines.
    priority: p1Scheduled into the current or next milestone.
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    on Nov 16, 2026
  3. self-assigned this
    on Nov 16, 2026
  4. schlessera commented on Nov 16, 2026

    @schlessera
    OwnerAuthor

    Claimed for implementation. Claim token: claim-4c48073a. Branch: fix/4086-filterrow-default-reach.

    No path collisions; closure-only category overlap with other open ui-react/ui-kit PRs.

  5. schlessera commented on Nov 16, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-11-16):

    1. Narrow pills. Under a coarse pointer, every interactive FilterRow pill paints at least 44px wide with its label centred. Measured at main 05bf0d6a0, three pills are narrower: viewer Raw (40px), graph Direction In (31px) and Out (41px). Their horizontal reach would be clipped at the strip ends, and In/Out would overlap across the 6px gap. With the minimum width no pill has a horizontal reach, so nothing is clipped and no neighbour is crossed, and the 38px rule is met automatically. Fine-pointer paint is unchanged. Rejected: a 38px minimum under all pointers (an end pill still falls up to 3px short of 44px, and fine-pointer paint changes) and per-caller fixes (every new narrow pill, such as ui-kit: GitHub component family (PR, issue, thread, review, commit, merge, results) with stories #3800's tabs, would hit the same problem again).
    2. Mode row overflow. The graph controls column cuts off about 54px of the Mode row's "Maintenance" pill on laptop today, and this change does not affect it. It is filed as ui-react: the graph controls column cuts off the Mode row's Maintenance pill and the Colour row's Entity pill on laptop #4092 and stays out of this issue.

    The body's scope and acceptance criteria now follow this. The design-kit record will get the minimum-width line in this issue's PR.

  6. schlessera commented on Nov 16, 2026

    @schlessera
    OwnerAuthor

    Delivered in #4096, squashed to main as 8fd742d (milestone 0.45.0). The squash's main run (43937869019) passed all 17 jobs, heavy browser and layout proof included.

    • FilterRow gives every interactive pill .bk-hit by default; under a coarse pointer a pill paints at least 44px wide, and the strip clips horizontally only (overflow-x: clip; overflow-y: visible), so the vertical reach survives. Fine pointers are unchanged.
    • The file viewer toolbar drops its 44px tab overrides for the kit default; dismissal reasons move to the kit pill geometry with bk-control bk-hit and a coarse-pointer row gap.
    • Probes: packages/ui-kit/tests/visual/filter-row-targets.visual.tsx (rail-fine/coarse/mixed), plus app-level reach probes for the viewer toolbar, graph controls, dismissal reasons and activity lens pills. Mutation receipts are in the PR.
    • The Mode row's horizontal clipping in the graph controls column stays with ui-react: the graph controls column cuts off the Mode row's Maintenance pill and the Colour row's Entity pill on laptop #4092.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-kitThe presentational design kit: components, tokens, Storybook, visual baselines.area: ui-reactReact chat/files/voice components, stores, WebSocket transport.priority: p1Scheduled into the current or next milestone.type: fixSomething is broken and must behave the way it is documented.

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions