Skip to content

Edge collision ratchet: a browser sweep that fails when one control covers another (Feature #388) - #1157

Merged
grunion-ai merged 1 commit into
mainfrom
claude/collision-ratchet-1795195239
Nov 20, 2026
Merged

grunion-ai merged 1 commit into
mainfrom
claude/collision-ratchet-1795195239

Conversation

@grunion-ai

Copy link
Copy Markdown
Owner

Tracker: Feature #388 (https://weave.grunion.ai/w/weave/e/056ea404-eced-4023-a6df-65cb432a1737). Holds Issues #1861, #1875 and #1876.

What changed

  • test/lib/edge-collision.mjs: a page probe that reads every visible control (button, a[href], input, select, textarea, [role=button], focusable [tabindex]) and reports:
    • overlap: two controls whose visible boxes meet by more than 2 x 2 px, neither inside the other; elementFromPoint at the centre of the overlap names the one on top.
    • clipped: a control cut by an overflow hidden or clip box, or past the start of a scroll box that cannot scroll back to it.
    • off-screen: a control past the viewport's left or right edge, or past its bottom on a page that does not scroll.
  • Not collisions, each with a fixture case: nesting, controls under a modal (inert), a popover, menu or fixed sheet over the page, content that scrolls out from under a sticky or fixed control, and hidden, transparent or click-through controls. A floating fixed control (the Report a problem button) is compared against everything, sheets included.
  • test/edge-collision-browser.test.mjs: 14 probe fixtures, then one case per screen: workspace home, space, table, board, View panel, Share panel, record beside the table, record page, document, command menu. Each runs 1920, 1440, 1280, 1024, 960 and 768 px x 900 in Chromium and 390 x 844 in WebKit (iPhone 15 profile) as the phone format.
  • test/edge-collision-baseline.json: per platform, each entry names screen, width, theme, kind, both names and its Issue. test/edge-collision-core.test.mjs refuses an entry with no Issue or listed twice. The gate fails on an unlisted collision and on an entry that no longer reproduces.
  • DEVELOPMENT.md: the ledger row and an "Edge collision ratchet" section under the Collision loop. Changelog fragment changelog.d/edge-collision-ratchet-388.md.

Matrix cut

Light only. A theme changes no box, and test/theme-loop-guard.test.mjs refuses a theme loop around a case that reads only geometry (DEVELOPMENT.md, Theme loops). The key still carries the theme. Every screen and width runs: about 85 s locally for the whole file, so no split was needed.

Baseline (first run, darwin; linux seeded with the same and corrected from CI)

  • Issue #1861: Report a problem covers Clear all in the View panel, 1920 to 768 px (24 x 24 px).
  • Issue #1875 (new): Report a problem covers the right end of + New record in the table footer, 1920 to 768 px (8 x 4 px).
  • Issue #1876 (new): on a phone, each view's reorder grip covers the first 8 px of its name in the View menu (8 x 34 px).

The table-yield layout (table hides when the record, the View panel and the table cannot fit) is accepted as designed: a hidden table has no controls to collide.

Verification

  • npm test -- --targeted test/edge-collision-core.test.mjs: green, 9 cases.
  • npm test -- --targeted test/edge-collision-browser.test.mjs: green, 24 cases.
  • npm test -- --targeted over no-inline-comments, theme-loop-guard, changelog-fragments, doc-owners, temp-dirs, spawn-timeout, ci-test, docs-drift: green.

#388)

A browser sweep reads every visible control (button, a[href], input,
select, textarea, [role=button], focusable [tabindex]) on workspace home,
a space, the table, the board, the table with the View panel, the table
with the Share panel, a record beside the table, a record page, a document
and the command menu, at 1920, 1440, 1280, 1024, 960 and 768 px in
Chromium and 390 x 844 in WebKit as the phone format.

It reports two controls whose boxes meet by more than 2 x 2 px (neither
inside the other) with elementFromPoint saying which is on top, a control
cut by an overflow hidden box, and a control off the screen. Known findings
sit in test/edge-collision-baseline.json per platform, each naming its
Issue: #1861, #1875 and #1876. An entry with no Issue is refused, and an
entry that no longer reproduces fails, so the baseline only shrinks.

Light only: a theme moves no box, and test/theme-loop-guard.test.mjs
refuses a theme loop over a geometry-only case.

ponytail: content that scrolls out from under a sticky or fixed control is
skipped per scroll box, not per axis; a sticky-left cell under a fixed
control is still compared. Upgrade path: track sticky offsets per axis in
stickyRoot when a finding needs it.

Change-Id: I1131d1a1295311710ac49e81349be2cb3f1308ab
@grunion-ai
grunion-ai enabled auto-merge (squash) November 20, 2026 18:43
@grunion-ai
grunion-ai merged commit b930651 into main Nov 20, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant