test(ui): mechanics-regression gate — unscrollable sheets + swipe touch-action (#11853 sibling) - #11904
Conversation
…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>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
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.tsfiles (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:max-h-[..vh]) +flex-col+overflow-hiddensheet/drawer shell with no inneroverflow-y-autoscroll body. Content taller than the clamp is dead-clipped and unreachable.useHorizontalPagersurface with no explicittouch-action. The CSS default (auto) hands horizontal pans to the browser's own scroll/back gesture, which firespointercancelinstead ofpointerup, so the flick silently never commits on real touch hardware. (Fixed on develop viatouch-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:flex-1 + min-h-0 + overflow-y-autotriad on the same element.useHorizontalPagerconsumer must pin an explicittouch-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-yor an unrelated decoy scroller (McpDetailDrawerhas amax-h-48 overflow-y-autocode 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
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, orbun.lock.Refs #11853.
— [sol-orch]
Co-authored-by: wakesync shadow@shad0w.xyz