From 61535aba58a5c05e481ebd3919c4b9b769c05b2c Mon Sep 17 00:00:00 2001 From: Z8MB1E Date: Mon, 12 Oct 2026 20:17:27 -0400 Subject: [PATCH] test(audit): correct mobile viewport emulation and grid heuristic The harness was measuring against a viewport Chromium had already widened: with isMobile true it grows the layout viewport to fit overflowing content, so scrollWidth > innerWidth could never fire and real overflows were masked. hasTouch alone gives (pointer: coarse) while keeping the 390px viewport fixed, which is what surfaced the remaining resources overflow. - grid class: flag only grids that overflow a non-scrolling container; drop the narrow-track rule (it flagged intentional icon columns) and skip min-w-max boards, which scroll by design - structures detail now resolves from game-structures (the page's collection), so the previous phantom 404 is gone - refreshed baseline: overflow, grid and hoverOnly all at zero --- .gitignore | 3 + tests/audit/mobile-audit-report.json | 331 +++++++++------------------ tests/audit/mobile-audit-report.md | 187 +++++---------- tests/audit/mobile-audit.ts | 40 +++- 4 files changed, 193 insertions(+), 368 deletions(-) diff --git a/.gitignore b/.gitignore index 87083c93..480e1d6c 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,6 @@ yarn-debug.log* yarn-error.log* .yarn/install-state.gz .zinc + +# Transient targeted-audit output (baseline report is committed) +tests/audit/mobile-audit-filtered.* diff --git a/tests/audit/mobile-audit-report.json b/tests/audit/mobile-audit-report.json index a3e7ecf4..31856aa8 100644 --- a/tests/audit/mobile-audit-report.json +++ b/tests/audit/mobile-audit-report.json @@ -1,5 +1,5 @@ { - "generatedAt": "2026-10-12T22:36:25.240Z", + "generatedAt": "2026-10-13T00:15:39.122Z", "baseUrl": "http://localhost:3000", "viewport": { "width": 390, @@ -10,24 +10,12 @@ "summary": { "tapTargetMarginal": { "routes": 67, - "findings": 508 + "findings": 516 }, "tapTarget": { "routes": 42, "findings": 159 }, - "overflow": { - "routes": 6, - "findings": 24 - }, - "hoverOnly": { - "routes": 1, - "findings": 1 - }, - "grid": { - "routes": 3, - "findings": 4 - }, "hiddenMobile": { "routes": 1, "findings": 1 @@ -163,7 +151,7 @@ { "kind": "tapTarget", "detail": "45x16px \"Banking\"", - "selector": "div.flex.basis-full.items-center > a.text-xs.text-muted-foreground.transition-colors" + "selector": "div.flex.min-w-0.basis-full > a.text-xs.text-muted-foreground.transition-colors" }, { "kind": "tapTargetMarginal", @@ -173,12 +161,12 @@ { "kind": "tapTarget", "detail": "44x16px \"View all\"", - "selector": "div.flex.basis-full.items-center > a.text-xs.text-muted-foreground.transition-colors" + "selector": "div.flex.min-w-0.basis-full > a.text-xs.text-muted-foreground.transition-colors" }, { "kind": "tapTarget", "detail": "44x16px \"View all\"", - "selector": "div.flex.basis-full.items-center > a.text-xs.text-muted-foreground.hover:text-primary" + "selector": "div.flex.min-w-0.basis-full > a.text-xs.text-muted-foreground.hover:text-primary" } ] }, @@ -595,6 +583,11 @@ "kind": "tapTargetMarginal", "detail": "111x32px \"Design a ribbon\"", "selector": "div.flex.flex-wrap.items-center > a.inline-flex.items-center.justify-center" + }, + { + "kind": "tapTargetMarginal", + "detail": "316x30px \"Award this\"", + "selector": "div.relative.z-10.mt-auto > button.items-center.justify-center.whitespace-nowrap" } ] }, @@ -604,15 +597,6 @@ "status": "ok", "httpStatus": 200, "issues": [ - { - "kind": "overflow", - "detail": "document scrollWidth 420px > 390px" - }, - { - "kind": "overflow", - "detail": "crosses edge by 30px", - "selector": "div.flex.items-center.gap-2 > button.text-zinc-500.hover:text-red-400.text-sm" - }, { "kind": "tapTargetMarginal", "detail": "28x28px \"Toggle Sidebar\"", @@ -639,19 +623,19 @@ "selector": "div.flex.items-center.justify-between > button.text-[11px].px-2.py-0.5" }, { - "kind": "tapTarget", - "detail": "6x28px", - "selector": "div.flex.items-center.gap-2 > input.size-7.rounded.cursor-pointer" + "kind": "tapTargetMarginal", + "detail": "28x28px", + "selector": "div.flex.flex-wrap.items-center > input.size-7.rounded.cursor-pointer" }, { "kind": "tapTarget", - "detail": "129x4px", + "detail": "148x4px", "selector": "div.flex.items-center.gap-1.5 > input.flex-1.h-1.accent-zinc-400" }, { "kind": "tapTarget", "detail": "48x20px \"\\u00D7\"", - "selector": "div.flex.items-center.gap-2 > button.text-zinc-500.hover:text-red-400.text-sm" + "selector": "div.flex.flex-wrap.items-center > button.text-zinc-500.hover:text-red-400.text-sm" }, { "kind": "tapTargetMarginal", @@ -705,6 +689,11 @@ "kind": "tapTargetMarginal", "detail": "111x32px \"Design a ribbon\"", "selector": "div.flex.flex-wrap.items-center > a.inline-flex.items-center.justify-center" + }, + { + "kind": "tapTargetMarginal", + "detail": "316x30px \"Award this\"", + "selector": "div.relative.z-10.mt-auto > button.items-center.justify-center.whitespace-nowrap" } ] }, @@ -825,20 +814,6 @@ "status": "ok", "httpStatus": 200, "issues": [ - { - "kind": "overflow", - "detail": "document scrollWidth 510px > 390px" - }, - { - "kind": "overflow", - "detail": "crosses edge by 120px", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_1l5esnf939etb_-trigger-unassigned.inline-flex.items-center.justify-center" - }, - { - "kind": "overflow", - "detail": "crosses edge by 108px", - "selector": "button#radix-_R_1l5esnf939etb_-trigger-unassigned.inline-flex.items-center.justify-center > div.inline-flex.items-center.rounded-md" - }, { "kind": "tapTargetMarginal", "detail": "28x28px \"Toggle Sidebar\"", @@ -857,27 +832,27 @@ { "kind": "tapTargetMarginal", "detail": "65x28px \"All17\"", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_1l5esnf939etb_-trigger-all.inline-flex.items-center.justify-center" + "selector": "div.inline-flex.items-center.overflow-x-auto > button#radix-_R_1l5esnf939etb_-trigger-all.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "84x28px \"Open14\"", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_1l5esnf939etb_-trigger-open.inline-flex.items-center.justify-center" + "selector": "div.inline-flex.items-center.overflow-x-auto > button#radix-_R_1l5esnf939etb_-trigger-open.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "107x28px \"Resolved2\"", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_1l5esnf939etb_-trigger-resolved.inline-flex.items-center.justify-center" + "selector": "div.inline-flex.items-center.overflow-x-auto > button#radix-_R_1l5esnf939etb_-trigger-resolved.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "89x28px \"Closed1\"", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_1l5esnf939etb_-trigger-closed.inline-flex.items-center.justify-center" + "selector": "div.inline-flex.items-center.overflow-x-auto > button#radix-_R_1l5esnf939etb_-trigger-closed.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "125x28px \"Unassigned5\"", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_1l5esnf939etb_-trigger-unassigned.inline-flex.items-center.justify-center" + "selector": "div.inline-flex.items-center.overflow-x-auto > button#radix-_R_1l5esnf939etb_-trigger-unassigned.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", @@ -892,7 +867,7 @@ { "kind": "tapTargetMarginal", "detail": "58x32px \"0upvotes\"", - "selector": "div.flex.basis-full.justify-between > button.inline-flex.items-center.justify-center" + "selector": "div.flex.min-w-0.basis-full > button.inline-flex.items-center.justify-center" }, { "kind": "tapTarget", @@ -902,7 +877,7 @@ { "kind": "tapTargetMarginal", "detail": "58x32px \"2upvotes\"", - "selector": "div.flex.basis-full.justify-between > button.inline-flex.items-center.justify-center" + "selector": "div.flex.min-w-0.basis-full > button.inline-flex.items-center.justify-center" }, { "kind": "tapTarget", @@ -927,7 +902,7 @@ { "kind": "tapTargetMarginal", "detail": "55x32px \"1upvote\"", - "selector": "div.flex.basis-full.justify-between > button.inline-flex.items-center.justify-center" + "selector": "div.flex.min-w-0.basis-full > button.inline-flex.items-center.justify-center" }, { "kind": "tapTarget", @@ -990,11 +965,6 @@ "status": "ok", "httpStatus": 200, "issues": [ - { - "kind": "hoverOnly", - "detail": "affordance only visible on hover", - "selector": "article.group.relative.overflow-hidden > footer.absolute.inset-x-0.bottom-0" - }, { "kind": "tapTargetMarginal", "detail": "28x28px \"Toggle Sidebar\"", @@ -1172,7 +1142,7 @@ { "kind": "tapTargetMarginal", "detail": "103x32px \"Schedule\"", - "selector": "div.flex.basis-full.items-center > button.inline-flex.items-center.justify-center" + "selector": "div.flex.min-w-0.basis-full > button.inline-flex.items-center.justify-center" } ] }, @@ -1205,16 +1175,6 @@ "status": "ok", "httpStatus": 200, "issues": [ - { - "kind": "grid", - "detail": "3-track grid, track under 60px (252px wide)", - "selector": "button.group.flex.min-h-20 > span.grid.min-w-0.grid-cols-[2rem_minmax(0,1fr)_auto]" - }, - { - "kind": "grid", - "detail": "3-track grid, track under 60px (226px wide)", - "selector": "button.group.flex.min-h-20 > span.grid.min-w-0.grid-cols-[2rem_minmax(0,1fr)_auto]" - }, { "kind": "hiddenMobile", "detail": "hidden on mobile (md:/lg: reveal)", @@ -1258,17 +1218,17 @@ { "kind": "tapTargetMarginal", "detail": "114x38px \"WARDROBE\"", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_55esnf939etb_-trigger-wardrobe.inline-flex.items-center.justify-center" + "selector": "div.inline-flex.max-w-full.items-center > button#radix-_R_55esnf939etb_-trigger-wardrobe.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "110x38px \"INVENTORY\"", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_55esnf939etb_-trigger-inventory.inline-flex.items-center.justify-center" + "selector": "div.inline-flex.max-w-full.items-center > button#radix-_R_55esnf939etb_-trigger-inventory.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "106x38px \"LOADOUTS\"", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_55esnf939etb_-trigger-loadouts.inline-flex.items-center.justify-center" + "selector": "div.inline-flex.max-w-full.items-center > button#radix-_R_55esnf939etb_-trigger-loadouts.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", @@ -1500,25 +1460,6 @@ "status": "ok", "httpStatus": 200, "issues": [ - { - "kind": "overflow", - "detail": "document scrollWidth 424px > 390px" - }, - { - "kind": "overflow", - "detail": "crosses edge by 34px", - "selector": "div.group/item.[a]:hover:bg-accent/50.focus-visible:border-ring > div.flex.basis-full.items-center" - }, - { - "kind": "overflow", - "detail": "crosses edge by 34px", - "selector": "div.flex.basis-full.items-center > div.flex.items-center.gap-2" - }, - { - "kind": "overflow", - "detail": "crosses edge by 34px", - "selector": "div.flex.items-center.gap-2 > span.text-[10px].font-semibold.uppercase" - }, { "kind": "tapTargetMarginal", "detail": "28x28px \"Toggle Sidebar\"", @@ -1986,30 +1927,6 @@ "status": "ok", "httpStatus": 200, "issues": [ - { - "kind": "overflow", - "detail": "document scrollWidth 639px > 390px" - }, - { - "kind": "overflow", - "detail": "crosses edge by 1291px", - "selector": "div.overflow-x-auto.pb-2 > div.flex.flex-col.items-center" - }, - { - "kind": "overflow", - "detail": "crosses edge by 1291px", - "selector": "div.flex.flex-col.items-center > div.flex.flex-col.items-center" - }, - { - "kind": "overflow", - "detail": "crosses edge by 1291px", - "selector": "div.flex.flex-col.items-center > div.flex.items-start" - }, - { - "kind": "overflow", - "detail": "crosses edge by 1291px", - "selector": "div.flex.items-start > div.org-tree-child.px-3" - }, { "kind": "tapTargetMarginal", "detail": "28x28px \"Toggle Sidebar\"", @@ -2048,27 +1965,27 @@ { "kind": "tapTargetMarginal", "detail": "115x38px \"Org Chart\"", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_55esnf939etb_-trigger-org.inline-flex.items-center.justify-center" + "selector": "div.inline-flex.max-w-full.items-center > button#radix-_R_55esnf939etb_-trigger-org.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "151x38px \"By Assignment\"", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_55esnf939etb_-trigger-assignment.inline-flex.items-center.justify-center" + "selector": "div.inline-flex.max-w-full.items-center > button#radix-_R_55esnf939etb_-trigger-assignment.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "106x38px \"By Rank\"", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_55esnf939etb_-trigger-rank.inline-flex.items-center.justify-center" + "selector": "div.inline-flex.max-w-full.items-center > button#radix-_R_55esnf939etb_-trigger-rank.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "74x38px \"A-Z\"", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_55esnf939etb_-trigger-alpha.inline-flex.items-center.justify-center" + "selector": "div.inline-flex.max-w-full.items-center > button#radix-_R_55esnf939etb_-trigger-alpha.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "157x38px \"Years of Service\"", - "selector": "div.inline-flex.items-center.text-muted-foreground > button#radix-_R_55esnf939etb_-trigger-seniority.inline-flex.items-center.justify-center" + "selector": "div.inline-flex.max-w-full.items-center > button#radix-_R_55esnf939etb_-trigger-seniority.inline-flex.items-center.justify-center" } ] }, @@ -2385,12 +2302,12 @@ }, { "kind": "tapTargetMarginal", - "detail": "350x36px", + "detail": "350x36px \"Meta\"", "selector": "div.flex.flex-col.gap-1.5 > button#wiki-category.flex.h-9.w-full" }, { "kind": "tapTarget", - "detail": "1x1px", + "detail": "1x1px \"CampaignWorldLoreCharactersPlo\"", "selector": "div.flex.flex-col.gap-1.5 > select" }, { @@ -2517,6 +2434,16 @@ "kind": "tapTargetMarginal", "detail": "113x36px \"Create page\"", "selector": "div.flex.flex-wrap.justify-end > button.inline-flex.items-center.justify-center" + }, + { + "kind": "tapTargetMarginal", + "detail": "340x36px \"I understand\"", + "selector": "div.flex.flex-col-reverse.sm:flex-row > button.inline-flex.items-center.justify-center" + }, + { + "kind": "tapTarget", + "detail": "16x16px \"Close\"", + "selector": "div#radix-_R_3aatpesnf939etb_.fixed.left-[50%].top-[50%] > button.absolute.right-4.top-4" } ] }, @@ -2526,30 +2453,6 @@ "status": "ok", "httpStatus": 200, "issues": [ - { - "kind": "overflow", - "detail": "document scrollWidth 401px > 390px" - }, - { - "kind": "overflow", - "detail": "crosses edge by 11px", - "selector": "div.grid.min-w-0.gap-6 > section.min-w-0" - }, - { - "kind": "overflow", - "detail": "crosses edge by 11px", - "selector": "section.min-w-0 > div.border.bg-card.text-card-foreground" - }, - { - "kind": "overflow", - "detail": "crosses edge by 11px", - "selector": "div.grid.min-w-0.gap-6 > div.border.bg-card.text-card-foreground" - }, - { - "kind": "overflow", - "detail": "crosses edge by 10px", - "selector": "div.border.bg-card.text-card-foreground > div.flex.space-y-1.5.flex-row" - }, { "kind": "tapTargetMarginal", "detail": "28x28px \"Toggle Sidebar\"", @@ -2574,11 +2477,6 @@ "kind": "tapTargetMarginal", "detail": "138x36px \"Create table\"", "selector": "div.flex.shrink-0.gap-2 > button.inline-flex.items-center.justify-center" - }, - { - "kind": "tapTargetMarginal", - "detail": "127x36px \"Create a table\"", - "selector": "div.flex.flex-col.items-center > button.inline-flex.items-center.justify-center" } ] }, @@ -2588,11 +2486,6 @@ "status": "ok", "httpStatus": 200, "issues": [ - { - "kind": "grid", - "detail": "11-track grid, track under 60px (319px wide)", - "selector": "div.flex.min-w-0.items-start > div.grid.min-w-max.gap-1" - }, { "kind": "tapTargetMarginal", "detail": "28x28px \"Toggle Sidebar\"", @@ -2689,11 +2582,6 @@ "status": "ok", "httpStatus": 200, "issues": [ - { - "kind": "grid", - "detail": "10-track grid, track under 60px (298px wide)", - "selector": "div.flex.min-w-0.max-w-full > div.grid.min-w-max.grid-cols-[repeat(var(--board-cols),var(--cell-size))]" - }, { "kind": "tapTargetMarginal", "detail": "28x28px \"Toggle Sidebar\"", @@ -3205,30 +3093,6 @@ "status": "ok", "httpStatus": 200, "issues": [ - { - "kind": "overflow", - "detail": "document scrollWidth 507px > 390px" - }, - { - "kind": "overflow", - "detail": "crosses edge by 117px", - "selector": "div.w-full.max-w-[420px].rounded-xl > table.w-full.text-sm" - }, - { - "kind": "overflow", - "detail": "crosses edge by 117px", - "selector": "table.w-full.text-sm > thead" - }, - { - "kind": "overflow", - "detail": "crosses edge by 117px", - "selector": "thead > tr.text-left.text-xs.uppercase" - }, - { - "kind": "overflow", - "detail": "crosses edge by 117px", - "selector": "tr.text-left.text-xs.uppercase > th.px-4.py-2.text-right" - }, { "kind": "tapTargetMarginal", "detail": "28x28px \"Toggle Sidebar\"", @@ -3280,32 +3144,32 @@ { "kind": "tapTargetMarginal", "detail": "149x28px \"Flight Simulator\"", - "selector": "div.items-center.text-muted-foreground.h-9 > button#radix-_r_8_-trigger-flappy.inline-flex.items-center.justify-center" + "selector": "div.max-w-full.items-center.overflow-x-auto > button#radix-_r_8_-trigger-flappy.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "176x28px \"Minefield Clearance\"", - "selector": "div.items-center.text-muted-foreground.h-9 > button#radix-_r_8_-trigger-eod.inline-flex.items-center.justify-center" + "selector": "div.max-w-full.items-center.overflow-x-auto > button#radix-_r_8_-trigger-eod.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "128x28px \"Radio Traffic\"", - "selector": "div.items-center.text-muted-foreground.h-9 > button#radix-_r_8_-trigger-radio.inline-flex.items-center.justify-center" + "selector": "div.max-w-full.items-center.overflow-x-auto > button#radix-_r_8_-trigger-radio.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "177x28px \"Qualification Course\"", - "selector": "div.items-center.text-muted-foreground.h-9 > button#radix-_r_8_-trigger-qualification.inline-flex.items-center.justify-center" + "selector": "div.max-w-full.items-center.overflow-x-auto > button#radix-_r_8_-trigger-qualification.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "140x28px \"OPORD Recall\"", - "selector": "div.items-center.text-muted-foreground.h-9 > button#radix-_r_8_-trigger-opord.inline-flex.items-center.justify-center" + "selector": "div.max-w-full.items-center.overflow-x-auto > button#radix-_r_8_-trigger-opord.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "120x28px \"Call for Fire\"", - "selector": "div.items-center.text-muted-foreground.h-9 > button#radix-_r_8_-trigger-callForFire.inline-flex.items-center.justify-center" + "selector": "div.max-w-full.items-center.overflow-x-auto > button#radix-_r_8_-trigger-callForFire.inline-flex.items-center.justify-center" } ] }, @@ -3487,22 +3351,22 @@ { "kind": "tapTargetMarginal", "detail": "77x24px \"Top Score\"", - "selector": "div#radio-traffic-leaderboard-tabs.items-center.justify-center.text-muted-foreground > button#radix-_R_16qatpesnf939etb_-trigger-score.inline-flex.items-center.justify-center" + "selector": "div#radio-traffic-leaderboard-tabs.max-w-full.items-center.justify-center > button#radix-_R_16qatpesnf939etb_-trigger-score.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "77x24px \"Top Accuracy\"", - "selector": "div#radio-traffic-leaderboard-tabs.items-center.justify-center.text-muted-foreground > button#radix-_R_16qatpesnf939etb_-trigger-accuracy.inline-flex.items-center.justify-center" + "selector": "div#radio-traffic-leaderboard-tabs.max-w-full.items-center.justify-center > button#radix-_R_16qatpesnf939etb_-trigger-accuracy.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "77x24px \"Most Correct\"", - "selector": "div#radio-traffic-leaderboard-tabs.items-center.justify-center.text-muted-foreground > button#radix-_R_16qatpesnf939etb_-trigger-messages.inline-flex.items-center.justify-center" + "selector": "div#radio-traffic-leaderboard-tabs.max-w-full.items-center.justify-center > button#radix-_R_16qatpesnf939etb_-trigger-messages.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", "detail": "77x24px \"Fastest Sprint\"", - "selector": "div#radio-traffic-leaderboard-tabs.items-center.justify-center.text-muted-foreground > button#radix-_R_16qatpesnf939etb_-trigger-time.inline-flex.items-center.justify-center" + "selector": "div#radio-traffic-leaderboard-tabs.max-w-full.items-center.justify-center > button#radix-_R_16qatpesnf939etb_-trigger-time.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", @@ -3649,7 +3513,7 @@ { "kind": "tapTargetMarginal", "detail": "70x32px \"Edit\"", - "selector": "div.flex.basis-full.items-center > button.inline-flex.items-center.justify-center" + "selector": "div.flex.min-w-0.basis-full > button.inline-flex.items-center.justify-center" }, { "kind": "tapTargetMarginal", @@ -3849,12 +3713,52 @@ ] }, { - "route": "/logistics/structures/17", - "url": "http://localhost:3000/logistics/structures/17", - "status": "skipped", - "httpStatus": 404, - "note": "HTTP 404", - "issues": [] + "route": "/logistics/structures/1", + "url": "http://localhost:3000/logistics/structures/1", + "status": "ok", + "httpStatus": 200, + "issues": [ + { + "kind": "tapTargetMarginal", + "detail": "28x28px \"Toggle Sidebar\"", + "selector": "header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center" + }, + { + "kind": "tapTargetMarginal", + "detail": "36x36px \"No unread notifications\"", + "selector": "div.ml-auto.flex.items-center > button#radix-_R_2gp39etb_.inline-flex.items-center.justify-center" + }, + { + "kind": "tapTarget", + "detail": "138x20px \"Back to Structures\"", + "selector": "header.relative.flex.flex-col > a.relative.z-10.text-sm" + }, + { + "kind": "tapTargetMarginal", + "detail": "102x32px \"Manage\"", + "selector": "div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center" + }, + { + "kind": "tapTargetMarginal", + "detail": "48x32px \"Fire\"", + "selector": "div.flex.items-center.gap-3 > button.inline-flex.items-center.justify-center" + }, + { + "kind": "tapTargetMarginal", + "detail": "132x32px \"Auto-Arrange\"", + "selector": "div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center" + }, + { + "kind": "tapTargetMarginal", + "detail": "40x32px", + "selector": "div.flex.items-center.gap-1 > button.inline-flex.items-center.justify-center" + }, + { + "kind": "tapTargetMarginal", + "detail": "42x32px", + "selector": "div.flex.items-center.gap-1 > button.inline-flex.items-center.justify-center" + } + ] }, { "route": "/logistics/banking/30", @@ -3920,25 +3824,10 @@ { "route": "/logistics/vehicles/1902", "url": "http://localhost:3000/logistics/vehicles/1902", - "status": "ok", - "httpStatus": 200, - "issues": [ - { - "kind": "tapTargetMarginal", - "detail": "28x28px \"Toggle Sidebar\"", - "selector": "header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center" - }, - { - "kind": "tapTargetMarginal", - "detail": "36x36px \"No unread notifications\"", - "selector": "div.ml-auto.flex.items-center > button#radix-_R_2gp39etb_.inline-flex.items-center.justify-center" - }, - { - "kind": "tapTarget", - "detail": "125x20px \"Back to Vehicles\"", - "selector": "div.p-5.flex.flex-col > a.text-sm.text-muted-foreground.hover:text-primary" - } - ] + "status": "skipped", + "httpStatus": 404, + "note": "HTTP 404", + "issues": [] }, { "route": "/wiki/welcome-to-the-unit", diff --git a/tests/audit/mobile-audit-report.md b/tests/audit/mobile-audit-report.md index 58c157f0..fc8f9888 100644 --- a/tests/audit/mobile-audit-report.md +++ b/tests/audit/mobile-audit-report.md @@ -1,32 +1,29 @@ -# Mobile audit (390x844) - 2026-10-12T22:36:25.241Z +# Mobile audit (390x844) - 2026-10-13T00:15:39.125Z Base: http://localhost:3000 | routes audited: 78 (ok: 67) | Pattern class | Routes affected | Findings | |---|---|---| -| tapTargetMarginal | 67 | 508 | +| tapTargetMarginal | 67 | 516 | | tapTarget | 42 | 159 | -| overflow | 6 | 24 | -| hoverOnly | 1 | 1 | -| grid | 3 | 4 | | hiddenMobile | 1 | 1 | ## tapTargetMarginal: pattern clusters | Selector shape | Findings | Routes | Example | |---|---|---|---| -| `button.inline-flex.items-center.justify-center` | 342 | 67 | 28x28px "Toggle Sidebar" | +| `button.inline-flex.items-center.justify-center` | 347 | 67 | 28x28px "Toggle Sidebar" | | `input.flex.h-9.w-full` | 15 | 9 | 300x36px | | `a.inline-flex.items-center.justify-center` | 7 | 6 | 111x32px "Design a ribbon" | | `button.rounded-md.px-2.5.py-1` | 12 | 6 | 82x24px "This period" | | `button.flex.h-9.items-center` | 8 | 4 | 160x36px "All rarities" | | `button.flex.items-center.justify-between` | 6 | 3 | 176x32px "All targets" | +| `button.items-center.justify-center.whitespace-nowrap` | 2 | 2 | 316x30px "Award this" | | `input.flex.h-9.rounded-md` | 3 | 2 | 144x36px "From date" | -| `button.flex.h-9.w-full` | 3 | 2 | 350x36px | +| `button.flex.h-9.w-full` | 3 | 2 | 350x36px "Meta" | | `a.group.flex.items-center` | 1 | 1 | 316x38px "DO_NOT_USE's AccountPersonal a" | | `button.text-[11px].px-2.py-0.5` | 1 | 1 | 82x38px "+ Add Stripe" | -| `button.flex.w-full.items-center` | 1 | 1 | 332x32px "SELECT LOADOUT" | -| `button.text-xs.px-2.5.py-1` | 3 | 1 | 73x26px "Logistics" | +| `input.size-7.rounded.cursor-pointer` | 1 | 1 | 28x28px | ## tapTarget: pattern clusters @@ -36,45 +33,14 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) | `a.flex.w-fit.items-center` | 10 | 10 | 42x20px "Wiki" | | `a.ml-auto.pr-1.text-xs` | 6 | 6 | 60x16px "All boards" | | `button.peer.group/switch.inline-flex` | 61 | 4 | 32x18px "Show callsign instead of displ" | -| `a.text-sm.text-muted-foreground.hover:text-primary` | 4 | 4 | 50x20px "Back" | | `button.aspect-square.size-4.shrink-0` | 8 | 3 | 16x16px | +| `a.text-sm.text-muted-foreground.hover:text-primary` | 3 | 3 | 50x20px "Back" | | `button.grid.place-content-center.peer` | 3 | 2 | 16x16px | | `a.text-sm.font-medium.after:absolute` | 16 | 2 | 91x18px "Edward Finch" | | `a.shrink-0.text-xs.text-muted-foreground` | 2 | 1 | 90x16px "View full record" | | `a.text-xs.text-muted-foreground.transition-colors` | 2 | 1 | 45x16px "Banking" | | `a.text-xs.text-muted-foreground.hover:text-primary` | 1 | 1 | 44x16px "View all" | -| `input.size-7.rounded.cursor-pointer` | 1 | 1 | 6x28px | - -## overflow: pattern clusters - -| Selector shape | Findings | Routes | Example | -|---|---|---|---| -| `(document)` | 6 | 6 | document scrollWidth 420px > 390px | -| `button.text-zinc-500.hover:text-red-400.text-sm` | 1 | 1 | crosses edge by 30px | -| `button.inline-flex.items-center.justify-center` | 1 | 1 | crosses edge by 120px | -| `div.inline-flex.items-center.rounded-md` | 1 | 1 | crosses edge by 108px | -| `div.flex.basis-full.items-center` | 1 | 1 | crosses edge by 34px | -| `div.flex.items-center.gap-2` | 1 | 1 | crosses edge by 34px | -| `span.text-[10px].font-semibold.uppercase` | 1 | 1 | crosses edge by 34px | -| `div.flex.flex-col.items-center` | 2 | 1 | crosses edge by 1291px | -| `div.flex.items-start` | 1 | 1 | crosses edge by 1291px | -| `div.org-tree-child.px-3` | 1 | 1 | crosses edge by 1291px | -| `section.min-w-0` | 1 | 1 | crosses edge by 11px | -| `div.border.bg-card.text-card-foreground` | 2 | 1 | crosses edge by 11px | - -## hoverOnly: pattern clusters - -| Selector shape | Findings | Routes | Example | -|---|---|---|---| -| `footer.absolute.inset-x-0.bottom-0` | 1 | 1 | affordance only visible on hover | - -## grid: pattern clusters - -| Selector shape | Findings | Routes | Example | -|---|---|---|---| -| `span.grid.min-w-0.grid-cols-[2rem_minmax(0,1fr)_auto]` | 2 | 1 | 3-track grid, track under 60px (252px wide) | -| `div.grid.min-w-max.gap-1` | 1 | 1 | 11-track grid, track under 60px (319px wide) | -| `div.grid.min-w-max.grid-cols-[repeat(var(--board-cols),var(-` | 1 | 1 | 10-track grid, track under 60px (298px wide) | +| `input.flex-1.h-1.accent-zinc-400` | 1 | 1 | 148x4px | ## hiddenMobile: pattern clusters @@ -117,12 +83,14 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 48x32px "Skip" `div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center` - 50x32px "Next" `div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center` - 111x32px "Design a ribbon" `div.flex.flex-wrap.items-center > a.inline-flex.items-center.justify-center` +- 316x30px "Award this" `div.relative.z-10.mt-auto > button.items-center.justify-center.whitespace-nowrap` ### /awards/design - 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` - 36x36px "No unread notifications" `div.ml-auto.flex.items-center > button#radix-_R_2gp39etb_.inline-flex.items-center.justify-center` - 300x36px `div.flex.flex-col.gap-1.5 > input#ribbon-name.flex.h-9.w-full` - 82x38px "+ Add Stripe" `div.flex.items-center.justify-between > button.text-[11px].px-2.py-0.5` +- 28x28px `div.flex.flex-wrap.items-center > input.size-7.rounded.cursor-pointer` - 149x36px "Submit for review" `div.flex.flex-wrap.items-center > button.inline-flex.items-center.justify-center` ### /awards/review @@ -133,6 +101,7 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 48x32px "Skip" `div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center` - 50x32px "Next" `div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center` - 111x32px "Design a ribbon" `div.flex.flex-wrap.items-center > a.inline-flex.items-center.justify-center` +- 316x30px "Award this" `div.relative.z-10.mt-auto > button.items-center.justify-center.whitespace-nowrap` ### /contributions - 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` @@ -153,11 +122,11 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` - 36x36px "No unread notifications" `div.ml-auto.flex.items-center > button#radix-_R_2gp39etb_.inline-flex.items-center.justify-center` - 110x32px "New ticket" `div.flex.flex-wrap.items-end > button.inline-flex.items-center.justify-center` -- 65x28px "All17" `div.inline-flex.items-center.text-muted-foreground > button#radix-_R_1l5esnf939etb_-trigger-all.inline-flex.items-center.justify-center` -- 84x28px "Open14" `div.inline-flex.items-center.text-muted-foreground > button#radix-_R_1l5esnf939etb_-trigger-open.inline-flex.items-center.justify-center` -- 107x28px "Resolved2" `div.inline-flex.items-center.text-muted-foreground > button#radix-_R_1l5esnf939etb_-trigger-resolved.inline-flex.items-center.justify-center` -- 89x28px "Closed1" `div.inline-flex.items-center.text-muted-foreground > button#radix-_R_1l5esnf939etb_-trigger-closed.inline-flex.items-center.justify-center` -- 125x28px "Unassigned5" `div.inline-flex.items-center.text-muted-foreground > button#radix-_R_1l5esnf939etb_-trigger-unassigned.inline-flex.items-center.justify-center` +- 65x28px "All17" `div.inline-flex.items-center.overflow-x-auto > button#radix-_R_1l5esnf939etb_-trigger-all.inline-flex.items-center.justify-center` +- 84x28px "Open14" `div.inline-flex.items-center.overflow-x-auto > button#radix-_R_1l5esnf939etb_-trigger-open.inline-flex.items-center.justify-center` +- 107x28px "Resolved2" `div.inline-flex.items-center.overflow-x-auto > button#radix-_R_1l5esnf939etb_-trigger-resolved.inline-flex.items-center.justify-center` +- 89x28px "Closed1" `div.inline-flex.items-center.overflow-x-auto > button#radix-_R_1l5esnf939etb_-trigger-closed.inline-flex.items-center.justify-center` +- 125x28px "Unassigned5" `div.inline-flex.items-center.overflow-x-auto > button#radix-_R_1l5esnf939etb_-trigger-unassigned.inline-flex.items-center.justify-center` - ...and 4 more ### /intelligence @@ -191,7 +160,7 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 24x24px "Close tour" `div.mb-2.flex.items-start > button.inline-flex.items-center.justify-center` - 48x32px "Skip" `div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center` - 53x32px "Done" `div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center` -- 103x32px "Schedule" `div.flex.basis-full.items-center > button.inline-flex.items-center.justify-center` +- 103x32px "Schedule" `div.flex.min-w-0.basis-full > button.inline-flex.items-center.justify-center` ### /journals - 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` @@ -205,8 +174,8 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 24x24px "Close tour" `div.mb-2.flex.items-start > button.inline-flex.items-center.justify-center` - 48x32px "Skip" `div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center` - 53x32px "Done" `div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center` -- 114x38px "WARDROBE" `div.inline-flex.items-center.text-muted-foreground > button#radix-_R_55esnf939etb_-trigger-wardrobe.inline-flex.items-center.justify-center` -- 110x38px "INVENTORY" `div.inline-flex.items-center.text-muted-foreground > button#radix-_R_55esnf939etb_-trigger-inventory.inline-flex.items-center.justify-center` +- 114x38px "WARDROBE" `div.inline-flex.max-w-full.items-center > button#radix-_R_55esnf939etb_-trigger-wardrobe.inline-flex.items-center.justify-center` +- 110x38px "INVENTORY" `div.inline-flex.max-w-full.items-center > button#radix-_R_55esnf939etb_-trigger-inventory.inline-flex.items-center.justify-center` - ...and 8 more ### /logistics @@ -343,8 +312,8 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 24x24px "Close tour" `div.mb-2.flex.items-start > button.inline-flex.items-center.justify-center` - 48x32px "Skip" `div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center` - 53x32px "Done" `div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center` -- 115x38px "Org Chart" `div.inline-flex.items-center.text-muted-foreground > button#radix-_R_55esnf939etb_-trigger-org.inline-flex.items-center.justify-center` -- 151x38px "By Assignment" `div.inline-flex.items-center.text-muted-foreground > button#radix-_R_55esnf939etb_-trigger-assignment.inline-flex.items-center.justify-center` +- 115x38px "Org Chart" `div.inline-flex.max-w-full.items-center > button#radix-_R_55esnf939etb_-trigger-org.inline-flex.items-center.justify-center` +- 151x38px "By Assignment" `div.inline-flex.max-w-full.items-center > button#radix-_R_55esnf939etb_-trigger-assignment.inline-flex.items-center.justify-center` - ...and 3 more ### /story @@ -386,12 +355,12 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` - 36x36px "No unread notifications" `div.ml-auto.flex.items-center > button#radix-_R_2gp39etb_.inline-flex.items-center.justify-center` - 350x36px `div.flex.flex-col.gap-1.5 > input#wiki-title.flex.h-9.w-full` -- 350x36px `div.flex.flex-col.gap-1.5 > button#wiki-category.flex.h-9.w-full` +- 350x36px "Meta" `div.flex.flex-col.gap-1.5 > button#wiki-category.flex.h-9.w-full` - 350x36px `div.flex.flex-col.gap-1.5 > input#wiki-tags.flex.h-9.w-full` - 350x36px `div.flex.flex-col.gap-1.5 > input#wiki-summary.flex.h-9.w-full` - 127x32px "Insert wikilink" `div.flex.flex-wrap.items-center > button.inline-flex.items-center.justify-center` - 32x32px "Bold" `div.flex.flex-wrap.items-center > button.inline-flex.items-center.justify-center` -- ...and 21 more +- ...and 22 more ### /minigames/blackjack - 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` @@ -399,7 +368,6 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 117x32px "House rules" `div.flex.flex-wrap.items-center > button.inline-flex.items-center.justify-center` - 36x36px "Refresh blackjack tables" `div.flex.shrink-0.gap-2 > button.inline-flex.items-center.justify-center` - 138x36px "Create table" `div.flex.shrink-0.gap-2 > button.inline-flex.items-center.justify-center` -- 127x36px "Create a table" `div.flex.flex-col.items-center > button.inline-flex.items-center.justify-center` ### /minigames/call-for-fire - 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` @@ -443,11 +411,11 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` - 36x36px "No unread notifications" `div.ml-auto.flex.items-center > button#radix-_R_2gp39etb_.inline-flex.items-center.justify-center` - 350x36px "Current period · Oct 12 to Oct" `div.flex.flex-wrap.items-center > button.flex.h-9.items-center` -- 149x28px "Flight Simulator" `div.items-center.text-muted-foreground.h-9 > button#radix-_r_8_-trigger-flappy.inline-flex.items-center.justify-center` -- 176x28px "Minefield Clearance" `div.items-center.text-muted-foreground.h-9 > button#radix-_r_8_-trigger-eod.inline-flex.items-center.justify-center` -- 128x28px "Radio Traffic" `div.items-center.text-muted-foreground.h-9 > button#radix-_r_8_-trigger-radio.inline-flex.items-center.justify-center` -- 177x28px "Qualification Course" `div.items-center.text-muted-foreground.h-9 > button#radix-_r_8_-trigger-qualification.inline-flex.items-center.justify-center` -- 140x28px "OPORD Recall" `div.items-center.text-muted-foreground.h-9 > button#radix-_r_8_-trigger-opord.inline-flex.items-center.justify-center` +- 149x28px "Flight Simulator" `div.max-w-full.items-center.overflow-x-auto > button#radix-_r_8_-trigger-flappy.inline-flex.items-center.justify-center` +- 176x28px "Minefield Clearance" `div.max-w-full.items-center.overflow-x-auto > button#radix-_r_8_-trigger-eod.inline-flex.items-center.justify-center` +- 128x28px "Radio Traffic" `div.max-w-full.items-center.overflow-x-auto > button#radix-_r_8_-trigger-radio.inline-flex.items-center.justify-center` +- 177x28px "Qualification Course" `div.max-w-full.items-center.overflow-x-auto > button#radix-_r_8_-trigger-qualification.inline-flex.items-center.justify-center` +- 140x28px "OPORD Recall" `div.max-w-full.items-center.overflow-x-auto > button#radix-_r_8_-trigger-opord.inline-flex.items-center.justify-center` - ...and 1 more ### /minigames/opord @@ -477,9 +445,9 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 154x32px "Sprint · 10 messages" `div.mt-3.grid.grid-cols-2 > button.inline-flex.items-center.justify-center` - 154x32px "Watch · 60 seconds" `div.mt-3.grid.grid-cols-2 > button.inline-flex.items-center.justify-center` - 130x36px "Start intercept" `div.flex.flex-col.items-center > button.inline-flex.items-center.justify-center` -- 77x24px "Top Score" `div#radio-traffic-leaderboard-tabs.items-center.justify-center.text-muted-foreground > button#radix-_R_16qatpesnf939etb_-trigger-score.inline-flex.items-center.justify-center` -- 77x24px "Top Accuracy" `div#radio-traffic-leaderboard-tabs.items-center.justify-center.text-muted-foreground > button#radix-_R_16qatpesnf939etb_-trigger-accuracy.inline-flex.items-center.justify-center` -- 77x24px "Most Correct" `div#radio-traffic-leaderboard-tabs.items-center.justify-center.text-muted-foreground > button#radix-_R_16qatpesnf939etb_-trigger-messages.inline-flex.items-center.justify-center` +- 77x24px "Top Score" `div#radio-traffic-leaderboard-tabs.max-w-full.items-center.justify-center > button#radix-_R_16qatpesnf939etb_-trigger-score.inline-flex.items-center.justify-center` +- 77x24px "Top Accuracy" `div#radio-traffic-leaderboard-tabs.max-w-full.items-center.justify-center > button#radix-_R_16qatpesnf939etb_-trigger-accuracy.inline-flex.items-center.justify-center` +- 77x24px "Most Correct" `div#radio-traffic-leaderboard-tabs.max-w-full.items-center.justify-center > button#radix-_R_16qatpesnf939etb_-trigger-messages.inline-flex.items-center.justify-center` - ...and 3 more ### /minigames/radio/custom @@ -505,7 +473,7 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) ### /profile/dev - 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` - 36x36px "No unread notifications" `div.ml-auto.flex.items-center > button#radix-_R_2gp39etb_.inline-flex.items-center.justify-center` -- 70x32px "Edit" `div.flex.basis-full.items-center > button.inline-flex.items-center.justify-center` +- 70x32px "Edit" `div.flex.min-w-0.basis-full > button.inline-flex.items-center.justify-center` - 122x32px "Grant Award" `div.flex.flex-wrap.items-center > button.inline-flex.items-center.justify-center` - 159x32px "Request promotion" `div.flex.items-center.justify-between > button.inline-flex.items-center.justify-center` @@ -539,6 +507,15 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 54x32px "Zones" `div.flex.flex-wrap.items-center > button.inline-flex.items-center.justify-center` - ...and 5 more +### /logistics/structures/1 +- 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` +- 36x36px "No unread notifications" `div.ml-auto.flex.items-center > button#radix-_R_2gp39etb_.inline-flex.items-center.justify-center` +- 102x32px "Manage" `div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center` +- 48x32px "Fire" `div.flex.items-center.gap-3 > button.inline-flex.items-center.justify-center` +- 132x32px "Auto-Arrange" `div.flex.items-center.gap-2 > button.inline-flex.items-center.justify-center` +- 40x32px `div.flex.items-center.gap-1 > button.inline-flex.items-center.justify-center` +- 42x32px `div.flex.items-center.gap-1 > button.inline-flex.items-center.justify-center` + ### /logistics/banking/30 - 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` - 36x36px "No unread notifications" `div.ml-auto.flex.items-center > button#radix-_r_20_.inline-flex.items-center.justify-center` @@ -550,10 +527,6 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` - 36x36px "No unread notifications" `div.ml-auto.flex.items-center > button#radix-_R_2gp39etb_.inline-flex.items-center.justify-center` -### /logistics/vehicles/1902 -- 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` -- 36x36px "No unread notifications" `div.ml-auto.flex.items-center > button#radix-_R_2gp39etb_.inline-flex.items-center.justify-center` - ### /wiki/welcome-to-the-unit - 28x28px "Toggle Sidebar" `header.flex.h-16.shrink-0 > button.inline-flex.items-center.justify-center` - 36x36px "No unread notifications" `div.ml-auto.flex.items-center > button#radix-_R_2gp39etb_.inline-flex.items-center.justify-center` @@ -583,9 +556,9 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 155x16px "Skip all tours on this device" `div.mt-2.border-t.border-border/60 > button.inline-flex.items-center.justify-center` - 90x16px "View full record" `div.flex.items-center.justify-between > a.shrink-0.text-xs.text-muted-foreground` - 44x16px "View all" `div.flex.items-center.justify-between > a.shrink-0.text-xs.text-muted-foreground` -- 45x16px "Banking" `div.flex.basis-full.items-center > a.text-xs.text-muted-foreground.transition-colors` -- 44x16px "View all" `div.flex.basis-full.items-center > a.text-xs.text-muted-foreground.transition-colors` -- 44x16px "View all" `div.flex.basis-full.items-center > a.text-xs.text-muted-foreground.hover:text-primary` +- 45x16px "Banking" `div.flex.min-w-0.basis-full > a.text-xs.text-muted-foreground.transition-colors` +- 44x16px "View all" `div.flex.min-w-0.basis-full > a.text-xs.text-muted-foreground.transition-colors` +- 44x16px "View all" `div.flex.min-w-0.basis-full > a.text-xs.text-muted-foreground.hover:text-primary` ### /account - 32x18px "Show callsign instead of displ" `label.font-medium.peer-disabled:cursor-not-allowed.peer-disabled:opacity-70 > button#showCallsign.peer.group/switch.inline-flex` @@ -603,9 +576,8 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) ### /awards/design - 16x16px `div.flex.items-start.gap-3 > button#ribbon-mirrored.grid.place-content-center.peer` -- 6x28px `div.flex.items-center.gap-2 > input.size-7.rounded.cursor-pointer` -- 129x4px `div.flex.items-center.gap-1.5 > input.flex-1.h-1.accent-zinc-400` -- 48x20px "\u00D7" `div.flex.items-center.gap-2 > button.text-zinc-500.hover:text-red-400.text-sm` +- 148x4px `div.flex.items-center.gap-1.5 > input.flex-1.h-1.accent-zinc-400` +- 48x20px "\u00D7" `div.flex.flex-wrap.items-center > button.text-zinc-500.hover:text-red-400.text-sm` ### /awards/review - 155x16px "Skip all tours on this device" `div.mt-2.border-t.border-border/60 > button.inline-flex.items-center.justify-center` @@ -679,7 +651,8 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) ### /wiki/new - 42x20px "Wiki" `div.flex.flex-col.gap-3 > a.flex.w-fit.items-center` -- 1x1px `div.flex.flex-col.gap-1.5 > select` +- 1x1px "CampaignWorldLoreCharactersPlo" `div.flex.flex-col.gap-1.5 > select` +- 16x16px "Close" `div#radix-_R_3aatpesnf939etb_.fixed.left-[50%].top-[50%] > button.absolute.right-4.top-4` ### /minigames/call-for-fire - 60x16px "All boards" `div.flex.items-center.gap-1 > a.ml-auto.pr-1.text-xs` @@ -729,15 +702,15 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) ### /voiceover/2 - 127x20px "Voiceover scripts" `div.flex.min-w-0.flex-col > a.flex.w-fit.items-center` +### /logistics/structures/1 +- 138x20px "Back to Structures" `header.relative.flex.flex-col > a.relative.z-10.text-sm` + ### /logistics/banking/30 - 123x20px "Back to Banking" `div.flex.flex-col.gap-6 > a.text-sm.text-muted-foreground.hover:text-primary` ### /logistics/resources/89 - 138x20px "Back to Resources" `div.p-5.flex.flex-col > a.text-sm.text-muted-foreground.hover:text-primary` -### /logistics/vehicles/1902 -- 125x20px "Back to Vehicles" `div.p-5.flex.flex-col > a.text-sm.text-muted-foreground.hover:text-primary` - ### /wiki/welcome-to-the-unit - 42x20px "Wiki" `div.flex.flex-col.gap-3 > a.flex.w-fit.items-center` - 61x19px "The Map" `li > a.font-medium.text-primary.underline` @@ -764,64 +737,6 @@ Base: http://localhost:3000 | routes audited: 78 (ok: 67) - 55x18px "Banking" `div.min-w-0 > a.text-sm.font-medium.after:absolute` -## overflow - -### /awards/design -- document scrollWidth 420px > 390px -- crosses edge by 30px `div.flex.items-center.gap-2 > button.text-zinc-500.hover:text-red-400.text-sm` - -### /helpdesk -- document scrollWidth 510px > 390px -- crosses edge by 120px `div.inline-flex.items-center.text-muted-foreground > button#radix-_R_1l5esnf939etb_-trigger-unassigned.inline-flex.items-center.justify-center` -- crosses edge by 108px `button#radix-_R_1l5esnf939etb_-trigger-unassigned.inline-flex.items-center.justify-center > div.inline-flex.items-center.rounded-md` - -### /logistics/resources -- document scrollWidth 424px > 390px -- crosses edge by 34px `div.group/item.[a]:hover:bg-accent/50.focus-visible:border-ring > div.flex.basis-full.items-center` -- crosses edge by 34px `div.flex.basis-full.items-center > div.flex.items-center.gap-2` -- crosses edge by 34px `div.flex.items-center.gap-2 > span.text-[10px].font-semibold.uppercase` - -### /roster -- document scrollWidth 639px > 390px -- crosses edge by 1291px `div.overflow-x-auto.pb-2 > div.flex.flex-col.items-center` -- crosses edge by 1291px `div.flex.flex-col.items-center > div.flex.flex-col.items-center` -- crosses edge by 1291px `div.flex.flex-col.items-center > div.flex.items-start` -- crosses edge by 1291px `div.flex.items-start > div.org-tree-child.px-3` - -### /minigames/blackjack -- document scrollWidth 401px > 390px -- crosses edge by 11px `div.grid.min-w-0.gap-6 > section.min-w-0` -- crosses edge by 11px `section.min-w-0 > div.border.bg-card.text-card-foreground` -- crosses edge by 11px `div.grid.min-w-0.gap-6 > div.border.bg-card.text-card-foreground` -- crosses edge by 10px `div.border.bg-card.text-card-foreground > div.flex.space-y-1.5.flex-row` - -### /minigames/flappy -- document scrollWidth 507px > 390px -- crosses edge by 117px `div.w-full.max-w-[420px].rounded-xl > table.w-full.text-sm` -- crosses edge by 117px `table.w-full.text-sm > thead` -- crosses edge by 117px `thead > tr.text-left.text-xs.uppercase` -- crosses edge by 117px `tr.text-left.text-xs.uppercase > th.px-4.py-2.text-right` - - -## hoverOnly - -### /intelligence/campaigns -- affordance only visible on hover `article.group.relative.overflow-hidden > footer.absolute.inset-x-0.bottom-0` - - -## grid - -### /locker -- 3-track grid, track under 60px (252px wide) `button.group.flex.min-h-20 > span.grid.min-w-0.grid-cols-[2rem_minmax(0,1fr)_auto]` -- 3-track grid, track under 60px (226px wide) `button.group.flex.min-h-20 > span.grid.min-w-0.grid-cols-[2rem_minmax(0,1fr)_auto]` - -### /minigames/call-for-fire -- 11-track grid, track under 60px (319px wide) `div.flex.min-w-0.items-start > div.grid.min-w-max.gap-1` - -### /minigames/eod -- 10-track grid, track under 60px (298px wide) `div.flex.min-w-0.max-w-full > div.grid.min-w-max.grid-cols-[repeat(var(--board-cols),var(--cell-size))]` - - ## hiddenMobile ### /locker diff --git a/tests/audit/mobile-audit.ts b/tests/audit/mobile-audit.ts index b613135b..f5c39309 100644 --- a/tests/audit/mobile-audit.ts +++ b/tests/audit/mobile-audit.ts @@ -84,7 +84,7 @@ const DYNAMIC_ROUTES: { template: string; collection: string | null; field: stri { template: "/map/[id]", collection: "maps", field: "id" }, { template: "/personnel/contacts/[id]", collection: "contacts", field: "id" }, { template: "/logistics/supply-boxes/[id]", collection: "supply-boxes", field: "id" }, - { template: "/logistics/structures/[id]", collection: "structures", field: "id" }, + { template: "/logistics/structures/[id]", collection: "game-structures", field: "id" }, { template: "/logistics/banking/[id]", collection: "bank-accounts", field: "id" }, { template: "/logistics/resources/[id]", collection: "resources", field: "id" }, { template: "/logistics/shipments/[id]", collection: "shipments", field: "id" }, @@ -163,22 +163,30 @@ async function collectIssues(): Promise { } } - // 3. Cramped multi-track grids + // 3. Grids that overflow a container which cannot scroll. Wide-by-design + // layouts (min-w-max boards) and grids inside scroll containers are + // intentional, and narrow icon tracks are not cramped layouts. + const hasScrollAncestor = (el: Element): boolean => { + let node = el.parentElement; + while (node && node !== document.body) { + if (/(auto|scroll)/.test(getComputedStyle(node).overflowX)) return true; + node = node.parentElement; + } + return false; + }; for (const el of Array.from(document.querySelectorAll("*"))) { const style = getComputedStyle(el); if (style.display !== "grid") continue; const tracks = style.gridTemplateColumns.split(" ").filter(Boolean); if (tracks.length < 2) continue; - const widths = tracks.map((t) => parseFloat(t) || 0); - const narrow = widths.some((w) => w < 60); - const overflowing = el.scrollWidth > el.clientWidth + 1; - const pxSum = widths.reduce((a, b) => a + b, 0); - if ((tracks.length >= 2 && narrow) || overflowing || pxSum > el.clientWidth + 1) { - const rect = el.getBoundingClientRect(); - if (rect.width < 40) continue; + const rect = el.getBoundingClientRect(); + if (rect.width < 40) continue; + if (style.minWidth === "max-content" || hasScrollAncestor(el)) continue; + const overflowing = el.scrollWidth > el.clientWidth + 1 || rect.right > vw + 4; + if (overflowing) { issues.push({ kind: "grid", - detail: `${tracks.length}-track grid${narrow ? ", track under 60px" : ""}${overflowing ? ", content overflows" : ""} (${Math.round(rect.width)}px wide)`, + detail: `${tracks.length}-track grid overflows its container (${Math.round(rect.width)}px wide)`, selector: path(el), }); } @@ -269,7 +277,17 @@ async function main() { executablePath: process.env.E2E_BROWSER_PATH || undefined, headless: true, }); - const context = await browser.newContext({ viewport: VIEWPORT }); + const context = await browser.newContext({ + viewport: VIEWPORT, + // hasTouch gives (pointer: coarse) so touch-only affordances are judged as + // a phone user sees them. isMobile must stay FALSE: it makes Chromium + // widen the layout viewport to fit overflowing content, which hides the + // very overflows this audit exists to catch (innerWidth silently becomes + // the content width, so scrollWidth > innerWidth never fires). + hasTouch: true, + isMobile: false, + deviceScaleFactor: 2, + }); // Authenticate via REST so gated routes render the app shell instead of the // landing page. Playwright's request context is flaky under Bun, so use the