Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit f5a01031f05c7bf914c070d2a8b2640ba7e1617c
parent 759d6cb59940dc4b8326133bbd18405540a0c7cc
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sat, 24 Oct 2026 05:14:31 -0400

umtool phone dock: aria-current only on a phone; its lit edge is data-lit

On the desk the dock is not drawn, and the rail's link is the one current
link to a place (board.spec and run-trace.spec find it by aria-current).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mumtool/app/globals.css | 4++--
Mumtool/components/shell/PhoneDock.tsx | 19++++++++++++++++---
2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/umtool/app/globals.css b/umtool/app/globals.css @@ -964,12 +964,12 @@ canvas.grabbable { color: var(--muted-2); text-decoration: none; } - .dock-item[aria-current] { + .dock-item[data-lit] { color: var(--text); font-weight: 600; } /* The lit edge, on its side: Signal along the top of the place you are in. */ - .dock-item[aria-current]::before { + .dock-item[data-lit]::before { content: ""; position: absolute; top: -1px; diff --git a/umtool/components/shell/PhoneDock.tsx b/umtool/components/shell/PhoneDock.tsx @@ -7,6 +7,7 @@ import { useHydrated } from "@/components/ui/use-hydrated"; import type { Theme } from "@/lib/theme"; import { cn } from "@/lib/utils"; import { JUMP_EVENT } from "./JumpPalette"; +import { usePhone } from "./phone"; import RailCount from "./RailCount"; import { Sheet } from "./Sheet"; import ThemeControl from "./ThemeControl"; @@ -20,7 +21,9 @@ import ThemeControl from "./ThemeControl"; // // Rendered by AppRail beside the rail; the desk never draws it (md:hidden) and // the rail is not drawn on a phone (app/globals.css, "phone: the shell"). Its -// counts are the rail's (RailCount), under their own attribute. +// counts are the rail's (RailCount), under their own attribute, and its +// `aria-current` is set on a phone only (the lit edge is `data-lit`): on the +// desk the rail's place is the one current link to it. // --------------------------------------------------------------------------- const PLACES = [ @@ -39,13 +42,22 @@ function current(served: Theme): Theme { export default function PhoneDock({ place, theme }: { place: string; theme: Theme }) { const hydrated = useHydrated(); + const phone = usePhone(); const [more, setMore] = useState(false); const moreLit = place === "settings" || place === "create"; return ( <> <nav aria-label="Places" data-phone-dock="" className="phone-dock md:hidden"> {PLACES.map((p) => ( - <Link key={p.id} href={p.href} prefetch={false} data-dock-place={p.id} aria-current={place === p.id ? "page" : undefined} className="dock-item"> + <Link + key={p.id} + href={p.href} + prefetch={false} + data-dock-place={p.id} + data-lit={place === p.id ? "" : undefined} + aria-current={phone && place === p.id ? "page" : undefined} + className="dock-item" + > <span>{p.label}</span> {p.count && <RailCount which={p.count} dock />} </Link> @@ -55,7 +67,8 @@ export default function PhoneDock({ place, theme }: { place: string; theme: Them data-dock-place="more" disabled={!hydrated} aria-expanded={more} - aria-current={moreLit ? "page" : undefined} + data-lit={moreLit ? "" : undefined} + aria-current={phone && moreLit ? "page" : undefined} className="dock-item" onClick={() => setMore(true)} >