Skip to content

test(ui): mechanics-regression gate — unscrollable sheets + swipe touch-action (#11853 sibling) - #11904

Merged
0xSolace merged 1 commit into
developfrom
sol/ui-mechanics-gate
Jul 3, 2026
Merged

test(ui): mechanics-regression gate — unscrollable sheets + swipe touch-action (#11853 sibling)#11904
0xSolace merged 1 commit into
developfrom
sol/ui-mechanics-gate

Conversation

@0xSolace

@0xSolace 0xSolace commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

What

Adds a mechanics-regression gate (packages/ui/src/mechanics-regression-gate.test.ts) — a static, no-browser vitest gate that locks down the two MECHANICS classes of UI bug that slipped past every existing detection layer plus manual QA.

The existing *-gate.test.ts files (no-backdrop-blur, no-focus-ring, no-widget-chrome, will-change) are all STYLE gates. The two bugs that shipped were mechanics bugs — the pixels looked correct, the interaction was dead:

  • (a) drawer-not-scrollable — a clamped-height (max-h-[..vh]) + flex-col + overflow-hidden sheet/drawer shell with no inner overflow-y-auto scroll body. Content taller than the clamp is dead-clipped and unreachable.
  • (b) broken-swipe — a useHorizontalPager surface with no explicit touch-action. The CSS default (auto) hands horizontal pans to the browser's own scroll/back gesture, which fires pointercancel instead of pointerup, so the flick silently never commits on real touch hardware. (Fixed on develop via touch-action: pan-y / touch-pan-y; this gate locks it so it can't regress.)

The gate

Scoped to the real surfaces (McpDetailDrawer, Launcher, HomeLauncherSurface) rather than a repo-wide regex — a targeted, low-false-positive tripwire beats a noise cannon. Two rules:

  • (a) a clamped drawer/sheet consumer must own a genuine scroll body: the flex-1 + min-h-0 + overflow-y-auto triad on the same element.
  • (b) any useHorizontalPager consumer must pin an explicit touch-action (pan-y/pan-x/none, class or inline style).

Comments are stripped before scanning, and the drawer triad is checked per-className-element (not per-file), so a comment that merely mentions touch-pan-y or an unrelated decoy scroller (McpDetailDrawer has a max-h-48 overflow-y-auto code block) can't mask a real regression. Four self-tests plant each bug shape — including the two exact false-negatives codex flagged — and assert the detector fires.

Proof

  • Green against develop tip (6 tests pass — adds no new red).
  • Fails on both planted real-bug shapes, in the HARD form: removing only the real drawer body scroll (leaving the decoy) → rule (a) fires; stripping the pager class leaving only the comment mention → rule (b) fires. Reverted → green.
  • Codex-reviewed (gpt-5.5): flagged 2 P2 false-negatives (comment-match + decoy-scroller); both fixed and now covered by dedicated self-tests. Biome clean.

Relationship to the in-flight UI-detection work

This is the MECHANICS gap — covered by none of:

Sibling of #11853 (full ui/app suites run in Client Tests but are red/unenforced). This new gate joins that same lane. Enforcement (branch protection on develop) is #11853's job — not duplicated here. The gate is green on develop so it doesn't add a new red; it only arms the tripwire.

Test-only. One new file. No product source touched; did not touch vite.config.*, index.html, client-base.ts, or bun.lock.

Refs #11853.

— [sol-orch]

Co-authored-by: wakesync shadow@shad0w.xyz

…ch-action (#11853 sibling)

The existing *-gate.test.ts files are all STYLE gates. Two production UI
bugs slipped past every one of them plus manual QA because they were
MECHANICS bugs (the pixels looked right, the interaction was dead):

  (a) drawer-not-scrollable: a clamped-height (max-h-[..vh]) + flex-col +
      overflow-hidden shell with no inner overflow-y-auto scroll body —
      taller content is dead-clipped and unreachable.
  (b) broken-swipe: a useHorizontalPager surface with no explicit
      touch-action — the browser default (auto) steals the horizontal pan
      and fires pointercancel, so the flick never commits on touch.

Adds a static (no-browser) vitest gate scoped to the real drawer/pager
surfaces (McpDetailDrawer, Launcher, HomeLauncherSurface). Comments are
stripped before scanning and the drawer scroll-body triad is checked
per-element (not per-file) so a comment mention or a decoy scroller can't
mask a regression. Self-tests plant each bug shape (incl. the exact
false-negatives codex flagged) and assert the detector fires.

Green against develop; fails on both planted real-bug shapes. This is the
MECHANICS gap not covered by #11868 (44px tap-target), #11877 (focus
order), or #11898 (test-red clearing). Enforcement is #11853's job.

— [sol-orch]

Co-authored-by: wakesync <shadow@shad0w.xyz>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8f25ba31-51fc-455e-8cc0-b214de01827b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sol/ui-mechanics-gate

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@claude

claude Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant