From 9dbf0792adaa8023ce3595fba83ab7b85428f28a Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 05:48:41 +0000 Subject: [PATCH 1/3] tokens(publisher): formalize font, type-scale and spacing tokens for the UI refresh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The publisher redesign wireframes specify a flat, dark, sans-chrome / mono-data console. Colors, radii, and the accent-opacity ramp already exist as tokens and match the wireframe; the font-family, type-scale, and spacing scales were only ever inline fallbacks. Formalize them in the hand-maintained composite block of the token generator so the restyle PRs can reference var(--font-mono), var(--text-md), var(--space-lg), etc. consistently: - --font-sans / --font-mono (system stacks, zero web-font fetch) - --text-2xs … --text-3xl (dense, rem-based, base 0.75rem) - --space-2xs … --space-2xl + --space-edge (dense, rem-based) Additive: the only prior consumer, var(--font-mono, monospace), now resolves to the real stack instead of the bare fallback. tokens.css is regenerated on build (npm run tokens). Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0127MmwB678BaV8Pfg1KG18E Signed-off-by: Claude --- tokens/multi-mode-css.mjs | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/tokens/multi-mode-css.mjs b/tokens/multi-mode-css.mjs index 1b29d359c..bb4b1d3b9 100644 --- a/tokens/multi-mode-css.mjs +++ b/tokens/multi-mode-css.mjs @@ -198,11 +198,30 @@ export default { lines.push(' /* ── Composite (hand-maintained) ───────────────────────────────── */'); lines.push(' --glass-border: 1px solid var(--color-surface-border-subtle);'); lines.push(''); - lines.push(' /* ── Spacing (reserved for future use) ──────────────────────────── */'); - lines.push(' /* --space-xs: 4px; */'); - lines.push(' /* --space-sm: 8px; */'); - lines.push(' /* --space-md: 12px; */'); - lines.push(' /* --space-lg: 16px; */'); + lines.push(' /* ── Typography (publisher redesign — sans chrome, mono data) ───── */'); + lines.push(" --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;"); + lines.push(" --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;"); + lines.push(''); + lines.push(' /* Type scale — dense, rem-based (base 0.75rem). */'); + lines.push(' --text-2xs: 0.6rem;'); + lines.push(' --text-xs: 0.65rem;'); + lines.push(' --text-sm: 0.7rem;'); + lines.push(' --text-base: 0.75rem;'); + lines.push(' --text-md: 0.8rem;'); + lines.push(' --text-lg: 0.875rem;'); + lines.push(' --text-xl: 1rem;'); + lines.push(' --text-2xl: 1.4rem;'); + lines.push(' --text-3xl: 2rem;'); + lines.push(''); + lines.push(' /* ── Spacing — dense, rem-based ─────────────────────────────────── */'); + lines.push(' --space-2xs: 0.2rem;'); + lines.push(' --space-xs: 0.25rem;'); + lines.push(' --space-sm: 0.4rem;'); + lines.push(' --space-md: 0.5rem;'); + lines.push(' --space-lg: 0.75rem;'); + lines.push(' --space-xl: 1rem;'); + lines.push(' --space-2xl: 1.5rem;'); + lines.push(' --space-edge: 0.75rem;'); lines.push(''); lines.push(' /* ── Safe Area (runtime-only — env() values) ────────────────────── */'); lines.push(' --safe-top: env(safe-area-inset-top, 0px);'); From 79472ec6a2709fedd1af0b84b403e82a73984f0c Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 06:13:22 +0000 Subject: [PATCH 2/3] feat(publisher): grouped left-sidebar app-shell (UI refresh) Replace the horizontal glass topbar with the wireframe's left-rail sidebar: a 212px flat rail down the inline-start edge with the brand + back-to-Terraviz, section links clustered into labelled groups (Catalog / Current events / Insights / Settings) with mono uppercase eyebrows, and an account footer (Profile + Sign out) pinned to the block-end. Active links carry an accent inline-start border + tint. - components/sidebar.ts replaces components/topbar.ts (same router wiring, SPA-intercept, aria-current, route-change listener; grouped nav + admin-gated visibility + account footer). teardownSidebar for tests. 18 unit tests port + extend the topbar suite. - index.ts boots renderSidebar; .publisher-portal becomes a two-column flex shell (rail + scrollable content column). - publisher.css: flat rail surfaces (--color-surface-alt + subtle border, no glass), grouped nav, sans chrome / mono group eyebrows, and a mobile fallback that stacks the rail into a horizontal top strip. - i18n: publisher.nav.group.{catalog,events,insights,settings}. - scenes/smoke: shell selector .publisher-topbar -> .publisher-sidebar. - CLAUDE.md module-map row updated. Colors/type/spacing all reference the design tokens formalized in the prior commit. tsc + 477 publisher tests + doc-coverage + locales green. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0127MmwB678BaV8Pfg1KG18E Signed-off-by: Claude --- CLAUDE.md | 2 +- locales/en.json | 4 + scripts/screenshots/scenes.ts | 2 +- scripts/screenshots/smoke.ts | 14 +- src/styles/publisher.css | 183 +++++++++--- .../{topbar.test.ts => sidebar.test.ts} | 129 +++++---- src/ui/publisher/components/sidebar.ts | 262 ++++++++++++++++++ src/ui/publisher/components/topbar.ts | 194 ------------- src/ui/publisher/index.ts | 24 +- 9 files changed, 501 insertions(+), 313 deletions(-) rename src/ui/publisher/components/{topbar.test.ts => sidebar.test.ts} (64%) create mode 100644 src/ui/publisher/components/sidebar.ts delete mode 100644 src/ui/publisher/components/topbar.ts diff --git a/CLAUDE.md b/CLAUDE.md index 9ef31b61f..087073a54 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -218,7 +218,7 @@ npm run screenshots:smoke # gating interaction tests (search, Orbit, nav) | `src/ui/publisher/components/asset-uploader.ts` | Asset uploader component (Phase 3pd image-sequence pipeline) | | `src/ui/publisher/components/chip-input.ts` | Chip-input control — entries become removable chips as the user types | | `src/ui/publisher/components/markdown-toolbar.ts` | GitHub-issue-style markdown toolbar over a `