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
- 99db79f0re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
- 30353f60tests: e2e-md-showcase Chrome range from LAYOUTS_GATE_CHROME_MD, default unchangedmre
- 16a7878cre-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
- 6af559e8docker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre
- 5599cf56deploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
- 0bcc6294Mission 011: e2e-197, brief, report, LOGmre
- 137303c5MainMenu marks the current page from the route (hybriel#197, server-rendered); current prop/item.current stay as fallback; tracker demo drops current; gate: SSR marker; docsmre
- 9325b403Re-vendor Hybriel to master 7f13a82f (hl:web batch 2: #190 #193 #197 #194 named regions); plugins whole, bin/hybriel static build (git-ignored)mre
- b31dc74dusage: calendar (theme 76f99f6-era ContentFirst, user menu, ☰ menu) and tracker (theme 76f99f6, modal + pagination current, own current marker until hybriel#197) rowsmre
- 8a3d5d40Mission 010: brief, report, LOG, STATUSmre
- a56abf1fSync components to components.hybriel 3794c59 (MdEditor real-key fixes); showcase real-key check on the md-editor pagemre
- 76f99f64E2E in lisbeth's Chrome for the menu's current page (mission 009): tests/e2e-menu-current.mjs, reportmre
- 159b1d53MainMenu/Sidebar: current page marked beyond colour, count badge, item current flag; gate 300/0 (mission 009)mre
- 0573eed3usage: notes + tickets on MdEditor (md-editor.js retired), gitoria on theme dbe3de7, tracker theme oldermre
- 78478f6eSync showcase to components.hybriel 1442e58: pick-mode page, comments attach, md-editor rows/files off; gates 285/0mre
- dbe3de79Display bugs from a real Chrome walk (mission 007): Settings page and in-shell doc reader instead of raw .md links, closed phone search hidden whatever a page says, /elements form rules scoped, three-pane danger contrast; display audit gate (132 -> 244 checks), walk + Settings e2e toolsmre
- 1875a051Theme: 44 px tap targets mobile first (layoutTap), 16 px fields, desktop denser only in @media 60rem; 390 px tap audit + gate checks (mission 006)mre
- 3d4f8e19Sync showcase to components.hybriel 9db927d: comments and files-upload pages, pagination onPage, md-editor readonly, gate 99 checksmre
- 64d635acmission brief 005mre
- 0d0fef25paths: projects moved into /media/STORAGE/projects/WorldAPI/mre