Skip to content

Mobile audit + emulation check tool (dev only) - #33

Open
fromknowware wants to merge 4 commits into
mainfrom
mobile/audit-and-check
Open

fromknowware wants to merge 4 commits into
mainfrom
mobile/audit-and-check

Conversation

@fromknowware

@fromknowware fromknowware commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Read this first. Scope and results of the whole mobile effort: drafts/mobile/AUDIT.md: every issue (page, device width, what is wrong, severity, evidence screenshot, fix PR), the measurements before and after, and a list of what to check on a real phone.

The fix PRs (independent, each branched off main, none merged)

Area PR
Nav menu, dismissible dock bar, safe areas, footer #32
Home: wordmark, spine, marquee #34
The 81: touch graph, ELEMENTS per chapter, view tabs #35
Dossiers #36
Chapters: voice cards, causal links, gate #37
Buttons and form fields (44px, 16px) #38
Agents tables, stories #41
Type floor (11px → 12px labels) #42

Combined in one scratch branch: 140 page/device runs (20 pages × 7 devices), 0 failures (overflow, 44px targets, 16px fields, dock bar, console/CSP errors, axe in light/dark/warm). On main the same run had overflow on 2 pages at 320/360, about 250 tap targets under 44px per width (180 of them the nav, footer and dock), and about 770 text nodes under 12px.

What is in this PR

  • drafts/mobile/AUDIT.md + drafts/mobile/shots/audit/*.jpg: the audit (small JPEGs).
  • scripts/mobile-check.mjs + docs/mobile-check.md: the regression check. Loads each page at 320, 360, 375, 390, 430, 844×390 and 768×1024 under true device emulation and fails on: horizontal overflow (measured with overflow-x:hidden lifted), tap targets under 44px (listed), text fields under 16px, the dock covering content or its controls under 44px, console/CSP errors, axe violations in light/dark/warm. npm run mobile-check.
  • puppeteer-core as a devDependency only (no browser download; uses the installed Chrome). No CI change, no site dependency, no runtime code.
  • drafts/mobile/tools/: the screenshot helpers used for the before/after images.

Correction worth knowing

My first scan reported 40 dark/warm colour-contrast violations. They were an artefact: axe ran while the 0.7s theme transition was still animating colours. With transitions off there are zero violations on main; the tool now measures after the transition, and no contrast PR exists.

Notes

  • Why not --window-size=390,844: headless Chrome lays out at about 500px and crops, which fakes a cut-off. The tool uses Emulation.setDeviceMetricsOverride.
  • GitHub Actions (unit-and-build, integration) pass on every PR. Workers Builds: knowware-book fails on every PR and on main itself (pre-existing, unrelated).

Test plan

  • node scripts/mobile-check.mjs on main @ d61b634 (baseline) and on the combined branch (after)
  • npm test unaffected (no source changes in this PR)
  • Author: skim the audit table, then the checklist for your own phone at the end of the audit

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
knowware-book 0796e1d Oct 20 2026, 08:47 PM

iamkhayyam and others added 3 commits October 19, 2026 18:41
drafts/mobile/AUDIT.md lists every issue with page, widths, severity, evidence
and the PR that fixes it. scripts/mobile-check.mjs reloads each page under true
device emulation (puppeteer-core + system Chrome) and fails on horizontal
overflow, tap targets under 44px, text fields under 16px, a dock bar covering
content, console/CSP errors and axe violations in light, dark and warm.
Developer tool only: not wired into the build or CI.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…manual-check list

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fromknowware
fromknowware force-pushed the mobile/audit-and-check branch from 9708df8 to 7528844 Compare October 20, 2026 00:52
@fromknowware

Copy link
Copy Markdown
Owner Author

Status: #32 (nav and dock) is merged. All other mobile PRs are rebased onto the current main and mergeable; package.json/lockfile re-applied on the new base. Combined branch re-run on 20 pages × 7 devices: 0 failures after the share-block fix in #41. Merge order that needs no conflict resolution: #33, then any of the rest.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants