gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit0bbfc5530bbfc553main-menu: format Style with nested rules and bare mediamre0bbfc553/reports/009-menu-current.md

5.0 KB

  1. # Report 009 — menu marks the current page (worker D3)
  2. Branch w9-menu-current from 0573eed. Not merged, not deployed.
  3. ## Found
  4. Path 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.
  5. ## Changed
  6. - `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).
  7. - `theme/shell/app-sidebar.hl`: `nav a[aria-current="page"]` gets the same bar.
  8. - 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`.
  9. - **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.
  10. - 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.
  11. ## Gate (headless Chrome, ports 8760–8764)
  12. - New theme: tests/browser.mjs **300 passed, 0 failed** (285 + 15 new; display audit part of it, 0 issues; check-theme 0 problems).
  13. - 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.
  14. - 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).
  15. ## NOT done
  16. - **E2E in lisbeth's real Chrome (9223) was NOT run** (quota stop). Only headless gate clicks. Do it before accepting.
  17. - 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.
  18. - Other accents' contrast not measured one by one.
  19. ## Apps that carry the theme (need a re-copy of theme/shell/main-menu.hl + app-sidebar.hl, Atlas does it)
  20. 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.
  21. ## E2E in lisbeth's real Chrome (worker D4) — DONE
  22. tests/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).
  23. - **New code: 33 ok / 0 FAIL** at 1280 and 390 (phone: toggle opens the sidebar, taps in the main menu, reopen).
  24. - 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"`.
  25. - 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.
  26. - 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).
  27. - **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.
  28. - Nothing needed fixing; no theme source changed, so the gate stays 300/0 (not re-run; only the new tests/e2e file was added).
  29. - Correction to the earlier note: red is ~4.1:1 (not 4.6) on the surface, still ≥ 3.
  30. - 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

  • 0bbfc553main-menu: format Style with nested rules and bare mediamre
  • 7755199dlist-first: format Style with nested rules and bare mediamre
  • 35199303content-first: format Style with nested rules and bare mediamre
  • 00f6e698app-sidebar: format Style with nested rules and bare mediamre
  • bb2f29c9app-header: format Style with nested rules and bare mediamre
  • 3aca2d7fSync components from 8176eb1 with reviewed nested stylesmre
  • 87e4003dRe-vendor layouts to Hybriel set day35mre
  • d8628cfflayouts: a startup error prints its message before exit 1 (hybriel#247)mre
  • 180fd76elayouts: MdEditor from components 59704ce (text on the clipboard always pastes, a file manager copy still attaches; pipe rows; empty Table-button table; tickets#49, notes#5)mre
  • a3eda8afRe-vendor Hybriel master 7a684920 (binary 74ab3715): plugins whole, startup fault exits 1; files-upload gate 340/0mre
  • 025d5880WIP re-vendor Hybriel set-day27b (a9712e61, master f5ff97bf): plugins whole, startup fault exits 1; NOT deployable: files-upload emit refused (see .scratch/rv27-upload)mre
  • 42183a71Merge sb3-standby: layouts deploys through its standbymre
  • 408de1f2layouts: no jobs switch needed in the standbymre
  • 0b85f57elayouts: a standby container (port 45019, profile standby); deploy hands over through standby-swap.sh without a gapmre
  • 31e40b8bMerge dm3-media: range handling in the layouts media routemre
  • 856dcacbLayouts media route: read suffix ranges and ignore range lists and garbage, like the components route (the layouts copy still answered 416 for the last bytes)mre
  • ad5056eaMerge dm3-sync: components re-sync to c2834ddmre
  • 740e2abeRe-sync the components copy to c2834dd: media player fixes (state after a queue pick, cover-less audio, accessibility labels)mre
  • 7fe103bbMerge mp-player: the media player showcase pagemre
  • 7db43c4eMedia route: serve the showcase's media from committed files (storage/ is not in git)mre