layouts
All repositories: gitoria
5.0 KB
# Report 009 — menu marks the current page (worker D3)Branch w9-menu-current from 0573eed. Not merged, not deployed.## FoundPath matching already existed (exact or `href + '/'` prefix → `a.current` + `aria-current="page"`, others "false") and `current` already is the host's say. What was missing: the marker was accent text colour only (no non-colour marker) and the sidebar nav had only a background; no count; no per-item say.## Changed- `theme/shell/main-menu.hl`: marked link = accent text + surface background + a bar in the accent (`boxShadow inset`, left bar on the phone/sidebar, bottom bar in the header from 60rem; no border → check-theme stays 0). Items may carry `count` → `span.count` badge (accent bg, `--color-accent-text`), and `current = true` (overrides the path). Label stays plain text. Backwards compatible: label/href-only items behave as before (no badge, same match).- `theme/shell/app-sidebar.hl`: `nav a[aria-current="page"]` gets the same bar.- Showcase: tracker demo carries `count = 12` on Shows and flags Series `current = true` on the all-titles page (no path match). Docs `docs/layouts/main-menu.md`.- **Derive path: touched.** `build()` (the function behind `rows`, the hybriel#190 spot) now also computes `count`, `has` (a `View if` needs a row field, not an expression), and reads `it.current`. I added no null guard and did not work around #190; a patch that nulls `items` still hits `build` as before.- Contrast (computed in the gate from real computed styles): accent #569bd4 on surface rgb(35,40,45) ≈ 5.7:1 text and bar; badge text darker on accent ≥ 4.5. Other accents (palette light colours) are all lighter than blue-dark except red #f44747 (~4.6:1 on the surface) — not individually measured.## Gate (headless Chrome, ports 8760–8764)- New theme: tests/browser.mjs **300 passed, 0 failed** (285 + 15 new; display audit part of it, 0 issues; check-theme 0 problems).- Old theme (0573eed theme + the same new test file): 293/7. Failing on old: marker beyond colour (1280 header), sidebar nav marker, item.current override, count badge (2 checks), 390 sidebar marker, 390 badge. The "marker moves" click checks pass on old too (path matching already worked) — they only guard against regression.- New checks: real mouse clicks at 1280 (Components → click Shells → click Docs; page below a section; /read marks Docs; tracker: Series (host flag) → click Movies) and 390 (open sidebar, click Shells, reopen, marker moved; badge in the phone menu, tap ≥ 44).## NOT done- **E2E in lisbeth's real Chrome (9223) was NOT run** (quota stop). Only headless gate clicks. Do it before accepting.- Shots (headless, I cannot view PNGs): /media/STORAGE/claude-scratch/atlas/D3/shots/ — `gate-{1280,390}-menu-*.png` (new), `old-1280-menu-shells.png`, `old-390-menu-components.png` (old). Logs: D3/logs-new.txt, D3/logs-old.txt.- Other accents' contrast not measured one by one.## Apps that carry the theme (need a re-copy of theme/shell/main-menu.hl + app-sidebar.hl, Atlas does it)gitoria (theme dbe3de7), tickets (moved onto the theme in X2: can then drop "Inbox (n)" from the label → `count = n`, and pass `current`), notes (theme move still open per usage.md), calendar (soon). Tracker older theme. Old items keep working.## E2E in lisbeth's real Chrome (worker D4) — DONEtests/e2e-menu-current.mjs (CDP 9223 via tunnel, ONE existing tab picked from /json, real Input.dispatchMouseEvent clicks, run under the lisbeth.lock flock, tab left at about:blank, localStorage accent reset). App on a copy-free showcase (no data), port 8760 (new, 159b1d5) and 8761 (old, 0573eed).- **New code: 33 ok / 0 FAIL** at 1280 and 390 (phone: toggle opens the sidebar, taps in the main menu, reopen).- Marker moves with each click: 1280 Components → Shells → Docs → Components; /components/pagination marks Components (menu) and Pagination (sidebar); 390 Components → Shells → Docs; tracker Series → Movies at both widths. Always exactly one `aria-current="page"`.- Visible bar: box-shadow present; for all 8 accents (blue-dark 4.98, green-dark 7.29, yellow 10.52, orange 5.62, **red 4.13**, purple 5.34, blue-light 9.97, green-light 8.75) bar and text ≥ 3:1 on the surface, at 1280 and 390 (red is the lowest, passes ≥ 3). Accents set by real clicks on the swatches.- Tracker demo: `current = true` marks Series (no path match) at both widths; Shows carries badge 12 (label plain, text ≥ 4.5:1, tap height ≥ 44 at 390).- **Old code (0573eed)**: bar check FAILS (box-shadow none, bar 1.00:1), the run then stops at the missing badge/switcher path — the test can fail.- Nothing needed fixing; no theme source changed, so the gate stays 300/0 (not re-run; only the new tests/e2e file was added).- Correction to the earlier note: red is ~4.1:1 (not 4.6) on the surface, still ≥ 3.- Shots (I cannot view PNGs, so I did not look at them): /media/STORAGE/claude-scratch/atlas/D3/shots/e2e-new-{1280-1-components,1280-2-shells,1280-3-pagination,1280-4-tracker-badge,390-1-components,390-2-shells,390-3-docs-red-after-reset,390-4-tracker-badge,390-5-tracker-movies}.png and e2e-old-1280-1-components.png.
Branches
Latest commits
- 4099e64aMerge branch 'font-segoe-ui' into mainAtlas
- e14fb795|||PR Theme font: Segoe UI first (his choice 2026-11-19)Atlas
- 44071d2cMerge branch 'hl-standard-5' into mainAtlas
- 5ea64202|||PR Gate: count the new-tab check's console errors tooAtlas
- 2752ceddMerge branch 'hl-standard-4' into mainAtlas
- ac552b81|||PR Gate: keyboard (Tab/Enter/Space) and Back/Forward/reload/new-tab checks (HL-STANDARD F5, F21)Atlas
- 8cddcaa9Merge branch 'hl-standard-2' into mainAtlas
- 2b480a64|||PR Type the route parameter of main-menu build (HL-STANDARD L10)Atlas
- ab54a39dMerge branch 'hl-standard' into mainAtlas
- 04d36fcf|||PR Type function parameters and drop unneeded let (HL-STANDARD L2, L10)Atlas
- 220c8fa4Merge branch 'readme-audit' into mainAtlas
- b78fb85a|||PR README matches the codemre
- 9f351699Preserve comments and nest supported selectors without changing rendered outputmre
- 97110ad9WIP: nest accepted layout selectors; stopped at startup parse failuremre
- ce4a0baeKeep caller slot styles whole so minimal shell apps startmre
- 12cd3992Re-vendor complete Hybriel plugins and runtime to day44mre
- b05c20feBackup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
- 8d9ed0b8Re-vendor complete Hybriel plugins and runtime to day39mre
- ebd00b6cNest caller slot styles in three-panemre
- 009991efNest caller slot styles in list-firstmre