Skip to content

fix(audit): sweep both colour schemes, see clipped overflow, and stop the cookie banner covering the phone frame - #1014

Merged
thinkclay merged 2 commits into
mainfrom
fix/audit-harness-schemes
Oct 6, 2026
Merged

thinkclay merged 2 commits into
mainfrom
fix/audit-harness-schemes

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

The harness half of the release-5 visual sweep (#622). Running the sweep needs every route in light and dark, at 1440 and 390. Neither capture script could do all of that.

What was wrong

What changed

  • scripts/audit/lib/app-ready.mjs: one copy of the consent seed, the ready-wait, --scheme parsing and frame facts, so the two scripts can't drift again.
  • sweep-routes.mjs --scheme light|dark|both:
    • Sets both halves of the theme (Playwright colorScheme and the stored preference) and puts the scheme in each filename.
    • Expects light on the (public) group (LIGHT_ONLY_GROUP in dark-mode-flag.ts) and the requested theme everywhere else.
    • Checks the computed page ground as well as the data-theme stamp, since a stamp is not a themed tree.
    • Exits 1 on a mismatch.
  • New clipped fact: visible elements whose right edge passes the viewport, excluding ones inside a horizontal scroller (tab strips and boards are meant to scroll).
  • A not-ready page that logged ERR_CONNECTION_* now exits 97 (infra), and the final exit goes through finish(), which re-checks the server.
  • SWEEP_MODES=worker, for a seeded worker with no org.
  • Header prerequisites no longer ask for functions serve; the stack serves api itself.

Evidence

  • Clipped probe: on its first run it found a real glitch that hScroll cannot see. On /dashboard/notifications/settings (1440) the quiet-hours start field fills the card and pushes "to" and the end field past the edge: the input sits at x=1432–2448 in a 1440 viewport. That finding will be filed from the sweep.
  • Theme check: dark captures report data-theme="dark" and a dark ground, rgb(22, 17, 13), on every signed-in route tried.
  • Infra exit: the trial run's last capture died with ERR_CONNECTION_RESET and was reported as rendered unset. With this change that same case exits 97.
  • smoke-authed.mjs --scheme both: against a static export of this commit it ran 8/8 routes with themes as requested, exit 0, and no banner in the phone frames.
  • Static export: each capture takes about 3 s, against about 15 s on Metro, and nothing runs out of memory. pnpm --filter scaffald-app exec expo export --platform web, then expo serve, the same recipe as ci(e2e): run the office kanban suite nightly against a static web export, and prove its red path #811.

No app code changes.

🤖 Generated with Claude Code

… the cookie banner covering the phone frame

The visual sweep for release 5 needs every route in light and dark at 1440
and 390. sweep-routes.mjs walked every route but only in light, waited a
fixed 1.5 s, and judged phone overflow by document width alone.
smoke-authed.mjs had the scheme pass and #998's ready-wait, but never set
cookie consent, so the banner covered the bottom fifth of every phone shot.

- lib/app-ready.mjs: one copy of the cookie-consent seed, #998's ready-wait,
  scheme parsing, and frame facts. Both scripts use it.
- sweep-routes.mjs: --scheme light|dark|both, colorScheme plus the stored
  preference, and the scheme in each filename. It expects light on the
  (public) group (LIGHT_ONLY_GROUP) and the requested theme everywhere else,
  checks the computed page ground as well as the data-theme stamp, and fails
  the run on a mismatch.
- `clipped`: visible elements whose right edge passes the viewport outside a
  horizontal scroller. hScroll misses content cut off by an overflow:hidden
  ancestor. On its first run it found the quiet-hours row on
  /dashboard/notifications/settings pushing "to" and the end field off-card.
- A page that half-loads and logs ERR_CONNECTION_* before the theme stamps
  is now the dead dev server (exit 97, #680), not a theme failure. The final
  exit goes through finish(), which re-checks the server.
- SWEEP_MODES=worker, for a seeded worker with no org.
- smoke-authed.mjs: seeds consent. The dark-pass hint no longer tells you to
  set EXPO_PUBLIC_DARK_MODE, which #999 removed. Headers no longer ask for
  `functions serve`; the stack serves `api` itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@thinkclay thinkclay added DX redesign SCF prototype parity — the redesign roadmap (#622) labels Oct 6, 2026
The first full sweep flagged every Communities screen at 390: the folder-tab
strip measured 391px inside a horizontal scroller that overflowed by 1px, and
both the edge check and the scroller check used a 1px tolerance. Sub-pixel
rounding, not a cut. Any overflow-x: auto|scroll ancestor now exempts its
content, and the edge tolerance is 2px. Re-run: the four Communities false
positives are gone; EEO, Project hiring, HRIS, quiet hours and Connections'
Export CSV still flag, and each is a real cut in the capture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 6, 2026
@thinkclay

thinkclay commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Pushed f68e3d6: the first full sweep flagged every Communities screen at 390 because the folder-tab strip measured 391 px inside a scroller that overflowed by 1 px. Any overflow-x: auto|scroll ancestor now exempts its content, and the edge tolerance is 2 px. Re-run: those false positives are gone, and every remaining CLIPPED flag is a real cut in the capture.

That sweep (592 captures) is now the release-5 epic, #1036.

@thinkclay
thinkclay merged commit 17a0667 into main Oct 6, 2026
10 checks passed
@thinkclay
thinkclay deleted the fix/audit-harness-schemes branch October 6, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DX redesign SCF prototype parity — the redesign roadmap (#622)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant