Skip to content

[P3][test] No regression guard for pointer target sizes #713

Closed

Description

@EVWorth

#705 brought every interactive control up to 24×24 and verified it against the
running app. Nothing stops it regressing.

Why the obvious guards don't work

Three attempts, each failing differently:

A sweep in AppLayout.browser.test.tsx measured zero elements. That file
mocks TitleBar, StatusBar, Toolbar, Sidebar and MainPanel to stubs,
so there is nothing real to measure. It passed by finding nothing.

Moved to TitleBar.browser.test.tsx, it measured the right controls at the
wrong size
— 33px tall, against 20px in the real app. A component rendered
standalone is not under the layout constraints that squeeze it in place.

Geometry cannot be checked from source. Unlike contrast, which is
arithmetic over values in the repo (see theme-contrast.test.ts and
button-contrast.test.ts), a target's size is the product of the whole
cascade. Only a rendered layout knows it.

What would actually work

A browser test that renders the real layout — the full AppLayout with its
children unmocked — and sweeps it with elementFromPoint, which is how #705
was measured:

const reach = (dx, dy) => { /* walk out from the centre until the hit is not this element */ };
const width  = reach(-1, 0) + reach(1, 0) + 1;
const height = reach(0, -1) + reach(0, 1) + 1;

Hit-testing rather than getBoundingClientRect, because the splitters
deliberately keep a 4px line and widen only the area around them — reading the
box reports those as failures, and reading the CSS offsets reports them as
passing even when a neighbour paints over the widened area, which is a real
bug that happened and that only hit-testing caught.

The obstacle is the fixture: AppLayout unmocked pulls in Tauri APIs, the
connection stores and Monaco. That is the work — a fixture that stands the real
layout up in chromium. Probably shared with any future visual-regression
coverage, which has the same requirement.

Two properties it must have, both learned the hard way here:

  • Assert how much it swept. A sweep that finds nothing must fail, not pass.
  • Assert it can fail. Revert one min-h-6 and confirm it goes red before
    trusting it.

Until then #705's fixes are verified but unguarded.

Activity

  1. added
    audit
    severity/p3
    kind/test
    on Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cross-cuttingauditkind/testseverity/p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions