Skip to content

fix(audit): wait for the theme stamp and the loading overlay before capturing - #998

Merged
thinkclay merged 1 commit into
mainfrom
fix/smoke-wait-for-render
Oct 6, 2026
Merged

thinkclay merged 1 commit into
mainfrom
fix/smoke-wait-for-render

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Re-landed from #971, which is closed: its seed and trigger commits were superseded by #972 (same 017_seed-application-submitted-at.sql, same seeds/** trigger), and the remaining commit conflicted with the three api-tests.yml changes that landed alongside. This is that remaining commit, cherry-picked onto main unchanged.

What it fixes

smoke-authed.mjs waited for networkidle + 5 s and then screenshotted — but it read <html data-theme> for its theme assertion after the screenshots. On a cold Metro bundle the first dark run (#833) produced a white "Loading…" overlay on one route and a half-themed frame on another, while the assertion said dark for every route and the pass exited 0. A green pass with a wrong picture is exactly what that assertion was added to prevent.

It now waits (up to 45 s) for data-theme to be stamped and for the overlay text to be gone, settles 2.5 s, and says so per route if it gives up.

Verified

Re-running the dark pass with this in place produced a frame pixel-identical to the "half-themed" one — which is how #970 was confirmed as a real bug rather than a race. pnpm prepush green with the gated suites live: 163 passed, 0 failed.

🤖 Generated with Claude Code

…apturing

`networkidle` is not "rendered". After the network goes quiet the app still has
its own gates: the theme resolves from storage and InnerProvider stamps
<html data-theme>, and the protected layout holds a "Loading..." overlay until
the session and prerequisites settle. On a cold Metro bundle both outlast the
fixed 5s wait the smoke used.

The first dark run (#833) showed what that costs: one route captured a white
"Loading..." overlay, and another a half-themed frame — while the data-theme
assertion, read AFTER the screenshots, said "dark" for every route and the pass
exited 0. A green pass with a wrong picture is the exact failure the assertion
was added to prevent.

Now waits (up to 45s) for data-theme to be stamped and for the overlay text to
be gone, then settles 2.5s, and says so per route if it gave up.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
(cherry picked from commit d735ac4)
@thinkclay
thinkclay merged commit 2e0d9c7 into main Oct 6, 2026
10 checks passed
@thinkclay
thinkclay deleted the fix/smoke-wait-for-render branch October 6, 2026 06:03
thinkclay added a commit that referenced this pull request Oct 6, 2026
… the cookie banner covering the phone frame (#1014)

* fix(audit): sweep both colour schemes, see clipped overflow, and stop 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]>

* fix(audit): a tab strip 1px wider than the phone is not clipped content

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]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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