refactor/design #2

Merged
BlackHatMagic merged 7 commits from refactor/design into master 2026-10-14 09:38:04 +00:00

PR Type Selection

Select the type of change (check one):

  • 🎯 Feature - New capability or functionality
  • 🐛 Bug Fix - Fixing incorrect behavior
  • 🔧 Refactor - Code restructuring without behavior change
  • ✅ Test - Adding or updating tests
  • 📝 Documentation - Documentation updates only
  • 🏗️ Chore - Build process, dependencies, or maintenance

Summary

Adopt the shared BlackHatMagic design system (Main-Theme / feat/npm/DESIGN.md)
across lukeh.xyz: correct the semantic color tokens for all eleven themes,
self-host the three typefaces, and bring the header, pages, and rendered
artifacts in line with the spec. The audit also turned up several defects,
which are fixed here (theme flash, hover-only popovers, a missing page
heading, and stale copy).

N/A — no tracked issue. Design source: BlackHatMagic/Main-Theme,
feat/npm/DESIGN.md.

Intent/Motivation/Rationale

The site already used the Main-Theme palette names but had drifted from the
spec: wrong token values, missing roles, ad-hoc Tailwind colors/radii/shadows,
Google-hosted fonts, and hover-only popovers. Consolidating on the spec's
semantic roles lets the eleven themes drop in unchanged and keeps future
visual changes localized to static/css/main.css.

Scope

  • static/css/main.css — token layer + shared component styles
  • static/js/theme-init.js — shared pre-paint theme resolver (new)
  • package.json, bun.lock, build:assets — font/asset pipeline
  • src/App.svelte, src/lib/*.svelte, src/lib/stat-blocks/preview/stat-block.css
  • src/pages/**/*.html — inline theme script replaced by the shared resolver
  • tests/e2e/stat-blocks.spec.ts — nav assertion updated from hover to click

Updates/Changes

  • Before: tokens diverged from the spec (#1e66f5 vs #135cea,
    #ccd0da vs #c2c6d0, …) and omitted border-strong / error; the header
    was ~74px with a blurred shadow; popovers opened on hover; fonts came from
    Google; components mixed rounded-*, shadow-*, bg-blue-*, font-black.
  • After: all eleven palettes match the spec exactly, including the new
    roles; a 72px border-only header with click-based, keyboard-dismissible
    popovers; self-hosted Space Grotesk / Figtree / Noto Serif; square controls
    with hard offset shadows and semantic roles only.
  • Key improvements: theme switching supports system and follows OS
    changes; the pre-paint script no longer flashes dracula / strawberry-dark;
    reduced-motion is honored (typewriter, shimmer, spinner); prose links keep a
    visible underline; inputs use border-strong; the USTU page regained its
    h1; the stat block uses the artifact serif.

Checklist

  • No functional change intended
  • All existing tests pass unchanged
  • Docs / Comments updated to reflect new structure
  • Dead code removed
  • Behavior equivalence verified

Three boxes above are intentionally unchecked: the refactor carries a small
set of deliberate behavior changes (listed in Additional Notes), and one e2e
assertion was updated to match the new click-based navigation.

Additional Notes

Intentional behavior changes (required for spec conformance or bug fixes):

  • Projects / appearance popovers open on click and close on Escape, outside
    pointer-down, or focus-out (spec: "Open them on click (not on hover)").
  • Appearance picker gains System / Light / Dark; system is the default
    and tracks prefers-color-scheme.
  • Home's typewriter and the milestone chart honor prefers-reduced-motion.
  • Math dimension controls disable at the minimum instead of calling alert();
    its tabs follow the APG keyboard pattern.

Verification:

  • bun run check (tsc + eslint) — clean
  • bun test tests/stat-blocks.test.ts — 3/3
  • bunx playwright test — 6/6
  • Forgejo deploy run on refactor/design — success

Risks: the visual delta is broad by nature, but the token layer is centralized
so regressions are easy to isolate. No API, database, or dependency behavior
changed.

## PR Type Selection **Select the type of change (check one):** - [ ] 🎯 **Feature** - New capability or functionality - [ ] 🐛 **Bug Fix** - Fixing incorrect behavior - [x] 🔧 **Refactor** - Code restructuring without behavior change - [ ] ✅ **Test** - Adding or updating tests - [ ] 📝 **Documentation** - Documentation updates only - [ ] 🏗️ **Chore** - Build process, dependencies, or maintenance ## Summary Adopt the shared BlackHatMagic design system (`Main-Theme` / `feat/npm/DESIGN.md`) across lukeh.xyz: correct the semantic color tokens for all eleven themes, self-host the three typefaces, and bring the header, pages, and rendered artifacts in line with the spec. The audit also turned up several defects, which are fixed here (theme flash, hover-only popovers, a missing page heading, and stale copy). ## Related Issues N/A — no tracked issue. Design source: `BlackHatMagic/Main-Theme`, `feat/npm/DESIGN.md`. ## Intent/Motivation/Rationale The site already used the Main-Theme palette names but had drifted from the spec: wrong token values, missing roles, ad-hoc Tailwind colors/radii/shadows, Google-hosted fonts, and hover-only popovers. Consolidating on the spec's semantic roles lets the eleven themes drop in unchanged and keeps future visual changes localized to `static/css/main.css`. ## Scope - `static/css/main.css` — token layer + shared component styles - `static/js/theme-init.js` — shared pre-paint theme resolver (new) - `package.json`, `bun.lock`, `build:assets` — font/asset pipeline - `src/App.svelte`, `src/lib/*.svelte`, `src/lib/stat-blocks/preview/stat-block.css` - `src/pages/**/*.html` — inline theme script replaced by the shared resolver - `tests/e2e/stat-blocks.spec.ts` — nav assertion updated from hover to click ## Updates/Changes - **Before:** tokens diverged from the spec (`#1e66f5` vs `#135cea`, `#ccd0da` vs `#c2c6d0`, …) and omitted `border-strong` / `error`; the header was ~74px with a blurred shadow; popovers opened on hover; fonts came from Google; components mixed `rounded-*`, `shadow-*`, `bg-blue-*`, `font-black`. - **After:** all eleven palettes match the spec exactly, including the new roles; a 72px border-only header with click-based, keyboard-dismissible popovers; self-hosted Space Grotesk / Figtree / Noto Serif; square controls with hard offset shadows and semantic roles only. - **Key improvements:** theme switching supports `system` and follows OS changes; the pre-paint script no longer flashes `dracula` / `strawberry-dark`; reduced-motion is honored (typewriter, shimmer, spinner); prose links keep a visible underline; inputs use `border-strong`; the USTU page regained its `h1`; the stat block uses the artifact serif. ## Checklist - [ ] No functional change intended - [ ] All existing tests pass unchanged - [x] Docs / Comments updated to reflect new structure - [x] Dead code removed - [ ] Behavior equivalence verified Three boxes above are intentionally unchecked: the refactor carries a small set of deliberate behavior changes (listed in Additional Notes), and one e2e assertion was updated to match the new click-based navigation. ## Additional Notes Intentional behavior changes (required for spec conformance or bug fixes): - Projects / appearance popovers open on click and close on Escape, outside pointer-down, or focus-out (spec: "Open them on click (not on hover)"). - Appearance picker gains `System` / `Light` / `Dark`; `system` is the default and tracks `prefers-color-scheme`. - Home's typewriter and the milestone chart honor `prefers-reduced-motion`. - Math dimension controls disable at the minimum instead of calling `alert()`; its tabs follow the APG keyboard pattern. Verification: - `bun run check` (tsc + eslint) — clean - `bun test tests/stat-blocks.test.ts` — 3/3 - `bunx playwright test` — 6/6 - Forgejo deploy run on `refactor/design` — success Risks: the visual delta is broad by nature, but the token layer is centralized so regressions are easy to isolate. No API, database, or dependency behavior changed.
Adopt the semantic color roles from Main-Theme's DESIGN.md (including the
missing border-strong and danger roles) and the exact palette values for all
eleven themes. Self-host Space Grotesk, Figtree, and Noto Serif as variable
fonts, and centralize the pre-paint theme resolver in /js/theme-init.js so
every page shares one implementation.

The previous inline script omitted dracula and gave strawberry-dark the wrong
background, so those pages flashed the wrong color before hydration. The
resolver now also supports the system preference and follows OS changes.
Build the header as a 72px sticky bar with a wordmark, centered navigation,
and a right-hand tool cluster; drop the blurred shadow and the 38px controls.
Open the projects and appearance popovers on click with Escape, outside
pointer-down, and focus-out dismissal instead of hover, and add the System
mode plus per-theme swatch strips to the appearance picker.

The e2e navigation assertion is updated to click the trigger rather than
hover, since hover-only popovers are unavailable to touch and keyboard users.
refactor/pages: conform pages and artifacts to the design system
All checks were successful
/ deploy (push) Successful in 1m23s
6462413871
Replace ad-hoc Tailwind palette, radius, and shadow classes with the shared
roles: square controls, hard offset shadows, Space Grotesk/Figtree type, and
border-strong inputs. Fix prose links to keep a visible primary underline,
give every page a real heading, and correct stale copy that still described
the site as Alpine-based.

On the USTU-092 milestone, remove the chart gradient, glow, rounded panels,
blurred shadows, and 800/900 weights, and drive the data series from
theme-derived colors. The stat block artifact now uses Noto Serif and no
longer requests weights the font does not ship. Math controls gain disabled
minimum states instead of alert(), and its tabs follow the APG pattern.
BlackHatMagic left a comment

Pi code review

4 new actionable findings

  • [P2] Restrict top-level navigation styles to top-level controls — static/css/main.css:203
  • [P2] Keep vector-operation tabs reachable on narrow screens — static/css/main.css:530
  • [P2] Projects links inherit top-level navigation sizing and overflow — static/css/main.css:203
  • [P2] Vector-operation tabs are clipped on narrow screens — static/css/main.css:530

Reviewed head 6462413 against base 9f71625, including theme resolution, asset/deployment wiring, shared styles, page components, and navigation tests. Verification was read-only: builds, tests, and browser rendering were unavailable, and the external design specification could not be checked. Reviewed the design refactor at 6462413 against 9f71625, including theme initialization, asset delivery, navigation, math controls, and selected page components. The supplied diff was partial and repository inspection was budget-limited; no checks or browser rendering were run, and the external design specification was unavailable.

Change walkthrough
Area Files Changes
Deployment & tooling (2) package.json, bun.lock Adds font dependencies and copies theme scripts and font assets during builds. Locks the three new variable-font packages.
Other code (13) static/css/main.css, static/js/theme-init.js, src/App.svelte, src/lib/Nav.svelte (+9 more) Replaces theme tokens and shared component styles and declares self-hosted fonts. Adds a blocking resolver for saved and system appearance preferences. Uses the shared navigation component as the application header. Introduces click-based popovers and system-aware appearance selection.
Tests (1) tests/e2e/stat-blocks.spec.ts Changes the navigation assertion from hovering a link to clicking Projects.

Review effort: 4/5.

Static observations (not validation results)
Observation Detail
⚠️ Diff size 36 files, +1331/-517. Large diff; review coverage may be incomplete.
Binary changes No binary changes reported by this diff.
Credential patterns No matches after excluding known examples/placeholders. Added-line heuristics only; not a security audit.

Reviewed 6462413871ff708f2f788f138efe1ee1a83a4a9d with proxy/gpt-6.1-sol. Automated advisory review; no project commands or tests were executed.

<!-- forgejo-pi-review:1c2da074a726543fa306c94e9e32820292ef13225691ea2689c5e9f3e2dfcda0 --> ## Pi code review **4 new actionable findings** - **[P2] Restrict top-level navigation styles to top-level controls** — `static/css/main.css:203` - **[P2] Keep vector-operation tabs reachable on narrow screens** — `static/css/main.css:530` - **[P2] Projects links inherit top-level navigation sizing and overflow** — `static/css/main.css:203` - **[P2] Vector-operation tabs are clipped on narrow screens** — `static/css/main.css:530` Reviewed head 6462413 against base 9f71625, including theme resolution, asset/deployment wiring, shared styles, page components, and navigation tests. Verification was read-only: builds, tests, and browser rendering were unavailable, and the external design specification could not be checked. Reviewed the design refactor at 6462413 against 9f71625, including theme initialization, asset delivery, navigation, math controls, and selected page components. The supplied diff was partial and repository inspection was budget-limited; no checks or browser rendering were run, and the external design specification was unavailable. <details> <summary>Change walkthrough</summary> | Area | Files | Changes | | --- | --- | --- | | Deployment & tooling (2) | `package.json`, `bun.lock` | Adds font dependencies and copies theme scripts and font assets during builds. Locks the three new variable-font packages. | | Other code (13) | `static/css/main.css`, `static/js/theme-init.js`, `src/App.svelte`, `src/lib/Nav.svelte` (+9 more) | Replaces theme tokens and shared component styles and declares self-hosted fonts. Adds a blocking resolver for saved and system appearance preferences. Uses the shared navigation component as the application header. Introduces click-based popovers and system-aware appearance selection. | | Tests (1) | `tests/e2e/stat-blocks.spec.ts` | Changes the navigation assertion from hovering a link to clicking Projects. | Review effort: **4/5**. </details> <details> <summary>Static observations (not validation results)</summary> | Observation | Detail | | --- | --- | | ⚠️ Diff size | 36 files, +1331/-517. Large diff; review coverage may be incomplete. | | Binary changes | No binary changes reported by this diff. | | Credential patterns | No matches after excluding known examples/placeholders. Added-line heuristics only; not a security audit. | </details> --- Reviewed `6462413871ff708f2f788f138efe1ee1a83a4a9d` with `proxy/gpt-6.1-sol`. Automated advisory review; no project commands or tests were executed.
@ -97,0 +200,4 @@
min-width: 0;
}
.site-nav__links > li { position: relative; }
.site-nav__links a,
Author
Owner

[P2] Restrict top-level navigation styles to top-level controls

Quality regression: the Projects dropdown now lives inside .site-nav__links, so this descendant selector also styles every project card. Its higher specificity overrides .site-nav__project { display: block }, placing each title and description beside one another in a fixed-height, non-wrapping flex row. The resulting oversized grid columns push project entries outside the dropdown and viewport. Restrict these navigation-control selectors to direct children of the top-level list items.

Trigger: Open Projects on any page using the shared header, particularly at a desktop viewport around 1024px wide.

Impact: Project descriptions overflow instead of wrapping, and links in the second dropdown column can be pushed off-screen, obstructing navigation to featured projects.

Evidence: src/lib/Nav.svelte:150-178 nests the dropdown and all six project anchors under .site-nav__links; at base, the dropdown was a sibling of that list. static/css/main.css:203-220 applies display: inline-flex, height: 40px, and white-space: nowrap to all descendant anchors. This selector outranks the later .site-nav__project block rule. The dropdown uses two 1fr grid columns with content-based minimum sizes, while body clips horizontal overflow; the responsive rules do not remove the inherited non-wrapping flex layout.

**[P2] Restrict top-level navigation styles to top-level controls** Quality regression: the Projects dropdown now lives inside `.site-nav__links`, so this descendant selector also styles every project card. Its higher specificity overrides `.site-nav__project { display: block }`, placing each title and description beside one another in a fixed-height, non-wrapping flex row. The resulting oversized grid columns push project entries outside the dropdown and viewport. Restrict these navigation-control selectors to direct children of the top-level list items. **Trigger:** Open Projects on any page using the shared header, particularly at a desktop viewport around 1024px wide. **Impact:** Project descriptions overflow instead of wrapping, and links in the second dropdown column can be pushed off-screen, obstructing navigation to featured projects. **Evidence:** src/lib/Nav.svelte:150-178 nests the dropdown and all six project anchors under `.site-nav__links`; at base, the dropdown was a sibling of that list. static/css/main.css:203-220 applies `display: inline-flex`, `height: 40px`, and `white-space: nowrap` to all descendant anchors. This selector outranks the later `.site-nav__project` block rule. The dropdown uses two `1fr` grid columns with content-based minimum sizes, while `body` clips horizontal overflow; the responsive rules do not remove the inherited non-wrapping flex layout.
Author
Owner

[P2] Projects links inherit top-level navigation sizing and overflow

[Quality] Moving the Projects dropdown inside .site-nav__links makes every project link match the top-level navigation rule. Its higher specificity overrides .site-nav__project's block layout with inline-flex, a fixed 40px height, and nowrap text, putting each title and description alongside one another instead of stacking and wrapping them.

Trigger: Open Projects on any page using Nav.svelte, particularly on a phone or a desktop viewport narrower than the resulting unwrapped dropdown content.

Impact: Project entries overflow their dropdown columns and can extend beyond the clipped viewport, making navigation labels unreadable and some links unavailable to pointer users.

Evidence: Current Nav.svelte nests .site-nav__dropdown and its .site-nav__project anchors inside the Projects li under ul.site-nav__links; the base version placed the dropdown outside that ul. static/css/main.css:203 applies display:inline-flex, height:40px, and white-space:nowrap to all descendant anchors. This selector is more specific than .site-nav__project's display:block rule, and neither the two-column dropdown grid nor the mobile one-column override resets those inherited link styles. body retains overflow-x:clip.

**[P2] Projects links inherit top-level navigation sizing and overflow** [Quality] Moving the Projects dropdown inside .site-nav__links makes every project link match the top-level navigation rule. Its higher specificity overrides .site-nav__project's block layout with inline-flex, a fixed 40px height, and nowrap text, putting each title and description alongside one another instead of stacking and wrapping them. **Trigger:** Open Projects on any page using Nav.svelte, particularly on a phone or a desktop viewport narrower than the resulting unwrapped dropdown content. **Impact:** Project entries overflow their dropdown columns and can extend beyond the clipped viewport, making navigation labels unreadable and some links unavailable to pointer users. **Evidence:** Current Nav.svelte nests .site-nav__dropdown and its .site-nav__project anchors inside the Projects li under ul.site-nav__links; the base version placed the dropdown outside that ul. static/css/main.css:203 applies display:inline-flex, height:40px, and white-space:nowrap to all descendant anchors. This selector is more specific than .site-nav__project's display:block rule, and neither the two-column dropdown grid nor the mobile one-column override resets those inherited link styles. body retains overflow-x:clip.
@ -154,0 +527,4 @@
.social-links a:hover { border-color: var(--border); background: var(--muted); }
/* ---------- Math tools ---------- */
.math-page .math-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
Author
Owner

[P2] Keep vector-operation tabs reachable on narrow screens

Quality regression: all eight vector-operation tabs are now placed in one horizontal flex row without wrapping or horizontal scrolling. Their combined minimum widths exceed a phone viewport, leaving later calculator tabs outside the visible page. Allow the tab list to wrap or provide an accessible horizontal scrolling layout.

Trigger: Visit /projects/math at a narrow viewport such as 375px wide and try to choose a later operation using touch.

Impact: Phone users cannot reach operations such as Cross Product, Triple Scalar Product, and Vector Projection through the visible tab controls.

Evidence: src/lib/Math.svelte:143-147 renders all eight operation buttons in .math-tabs--sub. static/css/main.css:530-543 makes the list a non-wrapping flex row with padded buttons and default content-based minimum widths. The page and panel constrain the available width, body uses overflow-x: clip, and neither responsive media query adds wrapping or scrolling for this list. The base implementation displayed these operation buttons vertically in a single-column inline grid.

**[P2] Keep vector-operation tabs reachable on narrow screens** Quality regression: all eight vector-operation tabs are now placed in one horizontal flex row without wrapping or horizontal scrolling. Their combined minimum widths exceed a phone viewport, leaving later calculator tabs outside the visible page. Allow the tab list to wrap or provide an accessible horizontal scrolling layout. **Trigger:** Visit `/projects/math` at a narrow viewport such as 375px wide and try to choose a later operation using touch. **Impact:** Phone users cannot reach operations such as Cross Product, Triple Scalar Product, and Vector Projection through the visible tab controls. **Evidence:** src/lib/Math.svelte:143-147 renders all eight operation buttons in `.math-tabs--sub`. static/css/main.css:530-543 makes the list a non-wrapping flex row with padded buttons and default content-based minimum widths. The page and panel constrain the available width, `body` uses `overflow-x: clip`, and neither responsive media query adds wrapping or scrolling for this list. The base implementation displayed these operation buttons vertically in a single-column inline grid.
Author
Owner

[P2] Vector-operation tabs are clipped on narrow screens

[Quality] The eight vector-operation tabs now occupy a single horizontal flex row without wrapping or horizontal scrolling. Their combined minimum content widths exceed a phone viewport, so later operations extend off-screen.

Trigger: Visit /projects/math on a narrow viewport such as 375px and try to select a later operation, such as Cross Product, Triple Scalar Product, or Vector Projection.

Impact: Touch and pointer users cannot reach calculator operations whose tabs are outside the viewport.

Evidence: Math.svelte renders all eight operations in .math-tabs.math-tabs--sub. static/css/main.css:530 sets .math-tabs to display:flex with no flex-wrap or overflow handling; the buttons have horizontal padding, and the enclosing panel further reduces available width. Neither responsive media query changes this layout, while body uses overflow-x:clip. The base Math.svelte displayed the operation buttons in a vertical inline-grid, so the operation selector did not require this wide horizontal row.

**[P2] Vector-operation tabs are clipped on narrow screens** [Quality] The eight vector-operation tabs now occupy a single horizontal flex row without wrapping or horizontal scrolling. Their combined minimum content widths exceed a phone viewport, so later operations extend off-screen. **Trigger:** Visit /projects/math on a narrow viewport such as 375px and try to select a later operation, such as Cross Product, Triple Scalar Product, or Vector Projection. **Impact:** Touch and pointer users cannot reach calculator operations whose tabs are outside the viewport. **Evidence:** Math.svelte renders all eight operations in .math-tabs.math-tabs--sub. static/css/main.css:530 sets .math-tabs to display:flex with no flex-wrap or overflow handling; the buttons have horizontal padding, and the enclosing panel further reduces available width. Neither responsive media query changes this layout, while body uses overflow-x:clip. The base Math.svelte displayed the operation buttons in a vertical inline-grid, so the operation selector did not require this wide horizontal row.
fix/design: address review findings for nav dropdown and math tabs
All checks were successful
/ deploy (push) Successful in 1m24s
9af4da5068
The review bot flagged two P2 regressions from the header rewrite:

- The top-level nav link rule matched the project cards nested inside the
  Projects dropdown, forcing them to inline-flex/40px/nowrap and overflowing
  the dropdown. Scope those selectors to direct children of the top-level
  list items.
- The eight vector-operation tabs could not wrap on narrow screens, leaving
  later tabs off-screen. Let the tab list wrap.

Also switch the popover enter animation from transform to the independent
translate property, so it no longer clobbers the Projects dropdown's
translateX(-50%) centering and push it past the viewport edge.
BlackHatMagic left a comment

Pi code review

1 new actionable finding

  • [P2] Mobile Projects menu expands inside a narrow flex item — src/lib/Nav.svelte:159
Earlier findings: 4 rechecked
  • Resolved: Keep vector-operation tabs reachable on narrow screens (static/css/main.css:530, first reported in review #46) — Current static/css/main.css sets flex-wrap: wrap on .math-page .math-tabs. This applies to the eight operation buttons rendered inside .math-tabs--sub in src/lib/Math.svelte, allowing later operations to wrap rather than extend beyond the clipped viewport.
  • Resolved: Restrict top-level navigation styles to top-level controls (static/css/main.css:203, first reported in review #46) — Current static/css/main.css restricts inline-flex, fixed-height, and nowrap navigation styling to .site-nav__links > li > a and > button. The nested project anchors in src/lib/Nav.svelte no longer match these rules, so .site-nav__project retains its block layout and its title and description can stack and wrap.
  • Resolved: Projects links inherit top-level navigation sizing and overflow (static/css/main.css:203, first reported in review #46) — The current top-level navigation selectors use direct-child combinators, excluding the project anchors nested inside .site-nav__dropdown. The remaining narrow-screen descendant rule only adjusts font size and padding; it does not reintroduce inline-flex, a fixed height, or nowrap on project cards.
  • Resolved: Vector-operation tabs are clipped on narrow screens (static/css/main.css:530, first reported in review #46) — Current static/css/main.css explicitly enables flex-wrap: wrap for .math-page .math-tabs, including the vector-operation list in src/lib/Math.svelte. The previously reported single-row clipping mechanism is therefore removed.

Reviewed 9af4da5 against 9f71625 across the theme and asset pipeline, navigation, page layouts, calculators, and artifact styling; no new evidence-supported findings were identified, and all four prior reports are fixed in current code. Verification was read-only: builds, tests, and browser rendering were not run, and the external Main-Theme specification was unavailable. Reviewed the supplied patch and surrounding navigation, theme, asset-build, math, contact, and stat-block code, comparing relevant behavior with the pinned base. No checks were run; repository-read limits prevented complete coverage, and the external design specification was unavailable.

Change walkthrough
Area Files Changes
Deployment & tooling (2) package.json, bun.lock Adds self-hosted font dependencies and copies theme scripts and font assets. Locks the three new variable-font packages.
Other code (13) static/css/main.css, static/js/theme-init.js, src/App.svelte, src/lib/Nav.svelte (+9 more) Replaces theme tokens and shared styles, including fonts and responsive navigation. Adds a shared pre-paint resolver for saved appearance preferences. Removes Google-hosted font loading. Introduces click-operated popovers and system-aware appearance selection.
Tests (1) tests/e2e/stat-blocks.spec.ts Updates the Projects navigation assertion to open the menu by clicking.

Review effort: 4/5.

Static observations (not validation results)
Observation Detail
⚠️ Diff size 36 files, +1331/-517. Large diff; review coverage may be incomplete.
Binary changes No binary changes reported by this diff.
Credential patterns No matches after excluding known examples/placeholders. Added-line heuristics only; not a security audit.

Reviewed 9af4da5068ea7ad87d0e07e2d36cf78cb7d72cbb with proxy/gpt-6.1-sol. Automated advisory review; no project commands or tests were executed.

<!-- forgejo-pi-review:ffab3847bc2c5470f3ade6901cf33b8cf8a52032f72d16006407305fac2b5cb0 --> ## Pi code review **1 new actionable finding** - **[P2] Mobile Projects menu expands inside a narrow flex item** — `src/lib/Nav.svelte:159` <details> <summary>Earlier findings: 4 rechecked</summary> - **Resolved:** Keep vector-operation tabs reachable on narrow screens (`static/css/main.css:530`, first reported in review #46) — Current static/css/main.css sets flex-wrap: wrap on .math-page .math-tabs. This applies to the eight operation buttons rendered inside .math-tabs--sub in src/lib/Math.svelte, allowing later operations to wrap rather than extend beyond the clipped viewport. - **Resolved:** Restrict top-level navigation styles to top-level controls (`static/css/main.css:203`, first reported in review #46) — Current static/css/main.css restricts inline-flex, fixed-height, and nowrap navigation styling to .site-nav__links &gt; li &gt; a and &gt; button. The nested project anchors in src/lib/Nav.svelte no longer match these rules, so .site-nav__project retains its block layout and its title and description can stack and wrap. - **Resolved:** Projects links inherit top-level navigation sizing and overflow (`static/css/main.css:203`, first reported in review #46) — The current top-level navigation selectors use direct-child combinators, excluding the project anchors nested inside .site-nav__dropdown. The remaining narrow-screen descendant rule only adjusts font size and padding; it does not reintroduce inline-flex, a fixed height, or nowrap on project cards. - **Resolved:** Vector-operation tabs are clipped on narrow screens (`static/css/main.css:530`, first reported in review #46) — Current static/css/main.css explicitly enables flex-wrap: wrap for .math-page .math-tabs, including the vector-operation list in src/lib/Math.svelte. The previously reported single-row clipping mechanism is therefore removed. </details> Reviewed 9af4da5 against 9f71625 across the theme and asset pipeline, navigation, page layouts, calculators, and artifact styling; no new evidence-supported findings were identified, and all four prior reports are fixed in current code. Verification was read-only: builds, tests, and browser rendering were not run, and the external Main-Theme specification was unavailable. Reviewed the supplied patch and surrounding navigation, theme, asset-build, math, contact, and stat-block code, comparing relevant behavior with the pinned base. No checks were run; repository-read limits prevented complete coverage, and the external design specification was unavailable. <details> <summary>Change walkthrough</summary> | Area | Files | Changes | | --- | --- | --- | | Deployment & tooling (2) | `package.json`, `bun.lock` | Adds self-hosted font dependencies and copies theme scripts and font assets. Locks the three new variable-font packages. | | Other code (13) | `static/css/main.css`, `static/js/theme-init.js`, `src/App.svelte`, `src/lib/Nav.svelte` (+9 more) | Replaces theme tokens and shared styles, including fonts and responsive navigation. Adds a shared pre-paint resolver for saved appearance preferences. Removes Google-hosted font loading. Introduces click-operated popovers and system-aware appearance selection. | | Tests (1) | `tests/e2e/stat-blocks.spec.ts` | Updates the Projects navigation assertion to open the menu by clicking. | Review effort: **4/5**. </details> <details> <summary>Static observations (not validation results)</summary> | Observation | Detail | | --- | --- | | ⚠️ Diff size | 36 files, +1331/-517. Large diff; review coverage may be incomplete. | | Binary changes | No binary changes reported by this diff. | | Credential patterns | No matches after excluding known examples/placeholders. Added-line heuristics only; not a security audit. | </details> --- Reviewed `9af4da5068ea7ad87d0e07e2d36cf78cb7d72cbb` with `proxy/gpt-6.1-sol`. Automated advisory review; no project commands or tests were executed.
@ -121,0 +156,4 @@
<HugeiconsIcon class={`chevron${dropdownOpen ? ' is-open' : ''}`} icon={ArrowDown01Icon} size={14} strokeWidth={1.8} aria-hidden="true" />
</button>
{#if dropdownOpen}
<div class="popover site-nav__dropdown">
Author
Owner

[P2] Mobile Projects menu expands inside a narrow flex item

[Quality] The dropdown now lives inside the Projects list item, but the mobile stylesheet changes it to position: static; width: 100%. That percentage is relative to the list item, not the navigation or viewport. On narrow phones, the six descriptive links consequently wrap into a very tall column inside the sticky header instead of using the available screen width.

Trigger: Open Projects on a narrow mobile viewport, such as 320 × 568, where the stylesheet's max-width: 820px rules apply.

Impact: The expanded header obscures the page and places lower project destinations below the viewport, requiring whole-page scrolling to reach links that previously fit substantially better in the viewport-width dropdown.

Evidence: src/lib/Nav.svelte:153–159 nests the dropdown in a <li> alongside Home, Blog, and Contact. static/css/main.css keeps .site-nav__links as a horizontal flex container with centered cross-axis alignment, while its mobile rule makes .site-nav__dropdown static and 100% wide; neither the dropdown nor the sticky header has a height limit or internal scrolling. At base, the mobile dropdown remained absolutely positioned and used width: calc(100vw - 32px) below 520px, so its width was not constrained by the Projects flex item.

**[P2] Mobile Projects menu expands inside a narrow flex item** [Quality] The dropdown now lives inside the Projects list item, but the mobile stylesheet changes it to `position: static; width: 100%`. That percentage is relative to the list item, not the navigation or viewport. On narrow phones, the six descriptive links consequently wrap into a very tall column inside the sticky header instead of using the available screen width. **Trigger:** Open Projects on a narrow mobile viewport, such as 320 × 568, where the stylesheet's max-width: 820px rules apply. **Impact:** The expanded header obscures the page and places lower project destinations below the viewport, requiring whole-page scrolling to reach links that previously fit substantially better in the viewport-width dropdown. **Evidence:** src/lib/Nav.svelte:153–159 nests the dropdown in a `<li>` alongside Home, Blog, and Contact. static/css/main.css keeps `.site-nav__links` as a horizontal flex container with centered cross-axis alignment, while its mobile rule makes `.site-nav__dropdown` static and 100% wide; neither the dropdown nor the sticky header has a height limit or internal scrolling. At base, the mobile dropdown remained absolutely positioned and used `width: calc(100vw - 32px)` below 520px, so its width was not constrained by the Projects flex item.
fix/nav: span the mobile Projects dropdown across the header
All checks were successful
/ deploy (push) Successful in 1m15s
2d90ae8d43
The mobile rule made the dropdown static with width:100%, so its width came
from the narrow Projects list item and the six project cards wrapped into a
tall column inside the sticky header. Anchor it to the header on <=820px
(position:absolute; left/right:0) so it uses the screen width instead.
BlackHatMagic left a comment

Pi code review

0 new actionable findings

No new actionable findings. Previously reported issues, if any, are tracked below.

Earlier findings: 1 rechecked
  • Resolved: Mobile Projects menu expands inside a narrow flex item (src/lib/Nav.svelte:159, first reported in review #47) — At head, static/css/main.css:591–611 replaces the mobile static dropdown layout: navigation list items become position: static, while the dropdown is absolutely positioned with top: 100%, left: 0, right: 0, width: auto, and transform: none. Its containing block is now the positioned .site-header rather than the narrow Projects list item, removing the reported width constraint and in-flow header expansion. This was verified by code inspection, not browser execution.

Reviewed head 2d90ae8 against base 9f71625, covering theme resolution, asset delivery, navigation, shared styling, and interactive pages; no new evidence-supported bugs were found. The previous mobile dropdown-width defect is fixed, but browser behavior and checks were not exercised, and the external DESIGN.md was unavailable for exact specification comparison. Reviewed the supplied diff and surrounding theme, navigation, asset-build, page, and demo code at the pinned head/base; no evidence-supported actionable bugs were identified. Builds, tests, and browser rendering were unavailable, and the complete commit diff and external design specification were not provided.

Change walkthrough
Area Files Changes
Other code (12) static/css/main.css, static/js/theme-init.js, src/App.svelte, src/lib/Nav.svelte (+8 more) Centralizes semantic palettes, self-hosted fonts, shared controls, responsive layout, and reduced-motion styles. Adds a pre-paint resolver for saved palettes and system color preference. Removes Google-hosted font loading. Introduces click-operated popovers and system-aware appearance preferences.
Deployment & tooling (2) package.json, bun.lock Adds font dependencies and copies theme scripts and font assets into build output. Locks the three new variable-font packages.
Tests (1) tests/e2e/stat-blocks.spec.ts Updates the navigation assertion to open Projects by clicking.

Review effort: 4/5.

Static observations (not validation results)
Observation Detail
⚠️ Diff size 36 files, +1346/-517. Large diff; review coverage may be incomplete.
Binary changes No binary changes reported by this diff.
Credential patterns No matches after excluding known examples/placeholders. Added-line heuristics only; not a security audit.

Reviewed 2d90ae8d43fb9920c00197deced8cdd565c7f1af with proxy/gpt-6.1-sol. Automated advisory review; no project commands or tests were executed.

<!-- forgejo-pi-review:506f6b8f315fcf311686e671a396633880540915beb25b99442c224ad1c99fef --> ## Pi code review **0 new actionable findings** No new actionable findings. Previously reported issues, if any, are tracked below. <details> <summary>Earlier findings: 1 rechecked</summary> - **Resolved:** Mobile Projects menu expands inside a narrow flex item (`src/lib/Nav.svelte:159`, first reported in review #47) — At head, static/css/main.css:591–611 replaces the mobile static dropdown layout: navigation list items become position: static, while the dropdown is absolutely positioned with top: 100%, left: 0, right: 0, width: auto, and transform: none. Its containing block is now the positioned .site-header rather than the narrow Projects list item, removing the reported width constraint and in-flow header expansion. This was verified by code inspection, not browser execution. </details> Reviewed head 2d90ae8 against base 9f71625, covering theme resolution, asset delivery, navigation, shared styling, and interactive pages; no new evidence-supported bugs were found. The previous mobile dropdown-width defect is fixed, but browser behavior and checks were not exercised, and the external DESIGN.md was unavailable for exact specification comparison. Reviewed the supplied diff and surrounding theme, navigation, asset-build, page, and demo code at the pinned head/base; no evidence-supported actionable bugs were identified. Builds, tests, and browser rendering were unavailable, and the complete commit diff and external design specification were not provided. <details> <summary>Change walkthrough</summary> | Area | Files | Changes | | --- | --- | --- | | Other code (12) | `static/css/main.css`, `static/js/theme-init.js`, `src/App.svelte`, `src/lib/Nav.svelte` (+8 more) | Centralizes semantic palettes, self-hosted fonts, shared controls, responsive layout, and reduced-motion styles. Adds a pre-paint resolver for saved palettes and system color preference. Removes Google-hosted font loading. Introduces click-operated popovers and system-aware appearance preferences. | | Deployment & tooling (2) | `package.json`, `bun.lock` | Adds font dependencies and copies theme scripts and font assets into build output. Locks the three new variable-font packages. | | Tests (1) | `tests/e2e/stat-blocks.spec.ts` | Updates the navigation assertion to open Projects by clicking. | Review effort: **4/5**. </details> <details> <summary>Static observations (not validation results)</summary> | Observation | Detail | | --- | --- | | ⚠️ Diff size | 36 files, +1346/-517. Large diff; review coverage may be incomplete. | | Binary changes | No binary changes reported by this diff. | | Credential patterns | No matches after excluding known examples/placeholders. Added-line heuristics only; not a security audit. | </details> --- Reviewed `2d90ae8d43fb9920c00197deced8cdd565c7f1af` with `proxy/gpt-6.1-sol`. Automated advisory review; no project commands or tests were executed.
feat/themes: add the Alucard light theme
All checks were successful
/ deploy (push) Successful in 1m16s
9855881a98
Add the design system's new Alucard palette (light counterpart to Dracula)
to the shared tokens, the pre-paint resolver, and the appearance picker.
Ordered after Rose Pine Dawn to match the design repo's theme table.
BlackHatMagic left a comment

Pi code review

1 new actionable finding

  • [P2] Landscape navigation hides lower project links — static/css/main.css:612

Reviewed the supplied base-to-head changes, including theme initialization, shared styles, navigation, page components, asset packaging, and existing test coverage. Review was read-only; builds, tests, and browser rendering were unavailable, and the external Main-Theme specification could not be independently verified. Reviewed the design-system refactor at the supplied head against the supplied base, including theme resolution, navigation, asset delivery, calculator interactions, and stat-block styling; no evidence-supported bugs were identified. Verification was limited to read-only source inspection: no checks or browser tests were run, and the external Main-Theme specification was unavailable.

Change walkthrough
Area Files Changes
Other code (12) static/css/main.css, static/js/theme-init.js, src/App.svelte, src/lib/Nav.svelte (+8 more) Centralizes semantic palettes, self-hosted font declarations, shared controls, responsive layout, and reduced-motion styles. Adds pre-paint resolution of saved appearance preferences and system color mode. Removes Google-hosted font loading. Reworks the header with click-operated popovers, dismissal handlers, and system-aware appearance selection.
Deployment & tooling (2) package.json, bun.lock Adds font dependencies and copies theme scripts and font assets into the deployment output. Locks the three new variable-font packages.
Tests (1) tests/e2e/stat-blocks.spec.ts Updates the navigation assertion to open Projects by clicking its button.

Review effort: 4/5.

Static observations (not validation results)
Observation Detail
⚠️ Diff size 36 files, +1349/-517. Large diff; review coverage may be incomplete.
Binary changes No binary changes reported by this diff.
Credential patterns No matches after excluding known examples/placeholders. Added-line heuristics only; not a security audit.

Reviewed 9855881a98c833868964c8c5a4b00976f9b284fc with proxy/gpt-6.1-sol. Automated advisory review; no project commands or tests were executed.

<!-- forgejo-pi-review:7118336f6b6834ee33020898f08282a32cb168ac7184910e3d81a013880cf77b --> ## Pi code review **1 new actionable finding** - **[P2] Landscape navigation hides lower project links** — `static/css/main.css:612` Reviewed the supplied base-to-head changes, including theme initialization, shared styles, navigation, page components, asset packaging, and existing test coverage. Review was read-only; builds, tests, and browser rendering were unavailable, and the external Main-Theme specification could not be independently verified. Reviewed the design-system refactor at the supplied head against the supplied base, including theme resolution, navigation, asset delivery, calculator interactions, and stat-block styling; no evidence-supported bugs were identified. Verification was limited to read-only source inspection: no checks or browser tests were run, and the external Main-Theme specification was unavailable. <details> <summary>Change walkthrough</summary> | Area | Files | Changes | | --- | --- | --- | | Other code (12) | `static/css/main.css`, `static/js/theme-init.js`, `src/App.svelte`, `src/lib/Nav.svelte` (+8 more) | Centralizes semantic palettes, self-hosted font declarations, shared controls, responsive layout, and reduced-motion styles. Adds pre-paint resolution of saved appearance preferences and system color mode. Removes Google-hosted font loading. Reworks the header with click-operated popovers, dismissal handlers, and system-aware appearance selection. | | Deployment & tooling (2) | `package.json`, `bun.lock` | Adds font dependencies and copies theme scripts and font assets into the deployment output. Locks the three new variable-font packages. | | Tests (1) | `tests/e2e/stat-blocks.spec.ts` | Updates the navigation assertion to open Projects by clicking its button. | Review effort: **4/5**. </details> <details> <summary>Static observations (not validation results)</summary> | Observation | Detail | | --- | --- | | ⚠️ Diff size | 36 files, +1349/-517. Large diff; review coverage may be incomplete. | | Binary changes | No binary changes reported by this diff. | | Credential patterns | No matches after excluding known examples/placeholders. Added-line heuristics only; not a security audit. | </details> --- Reviewed `9855881a98c833868964c8c5a4b00976f9b284fc` with `proxy/gpt-6.1-sol`. Automated advisory review; no project commands or tests were executed.
@ -156,0 +609,4 @@
box-shadow: none;
padding: 8px var(--gutter);
}
.site-nav__dropdown-inner { grid-template-columns: 1fr; }
Author
Owner

[P2] Landscape navigation hides lower project links

Quality regression: the responsive breakpoint now stacks all six project links below a two-row sticky header without constraining or scrolling the popover. In a short landscape viewport, the lower links extend below the visible screen; scrolling the page leaves the header and its popover pinned in place. Keep the dropdown within the available viewport height and allow it to scroll.

Trigger: Open Projects in a viewport around 800 × 430 CSS pixels, such as a landscape mobile browser or a short desktop window.

Impact: Pointer and touch users cannot reach the lower project-navigation entries, including View All, through the open menu.

Evidence: static/css/main.css:593 makes the header wrap into two rows below 820px, while lines 599–612 anchor the absolute dropdown below that sticky header and change its grid to one column. Nav.svelte renders six links with descriptions; their padding and text heights exceed the remaining viewport height, and the dropdown styles provide neither a height limit nor overflow scrolling. At the base commit, an 800px-wide viewport retained the two-column dropdown, so these entries occupied only three rows.

**[P2] Landscape navigation hides lower project links** Quality regression: the responsive breakpoint now stacks all six project links below a two-row sticky header without constraining or scrolling the popover. In a short landscape viewport, the lower links extend below the visible screen; scrolling the page leaves the header and its popover pinned in place. Keep the dropdown within the available viewport height and allow it to scroll. **Trigger:** Open Projects in a viewport around 800 × 430 CSS pixels, such as a landscape mobile browser or a short desktop window. **Impact:** Pointer and touch users cannot reach the lower project-navigation entries, including View All, through the open menu. **Evidence:** static/css/main.css:593 makes the header wrap into two rows below 820px, while lines 599–612 anchor the absolute dropdown below that sticky header and change its grid to one column. Nav.svelte renders six links with descriptions; their padding and text heights exceed the remaining viewport height, and the dropdown styles provide neither a height limit nor overflow scrolling. At the base commit, an 800px-wide viewport retained the two-column dropdown, so these entries occupied only three rows.
fix/nav: keep the mobile Projects dropdown within the viewport
All checks were successful
/ deploy (push) Successful in 1m26s
4c0e098e6c
In a short landscape viewport the one-column dropdown under the two-row
sticky header extended past the screen with no way to reach the lower links.
Cap it at the space below the header and let it scroll.
BlackHatMagic left a comment

Pi code review

0 new actionable findings

No new actionable findings. Previously reported issues, if any, are tracked below.

Earlier findings: 1 rechecked
  • Resolved: Landscape navigation hides lower project links (static/css/main.css:612, first reported in review #49) — Current static/css/main.css constrains .site-nav__dropdown below the 820px breakpoint with max-height: calc(100dvh - 100%) and overflow-y: auto. The dropdown remains positioned below the sticky header, but its six project links in src/lib/Nav.svelte can now scroll within the remaining viewport instead of extending into an unreachable pinned region; browser verification was not available.

Reviewed head 4c0e098 against base 9f71625, including the design refactor, theme initialization, asset pipeline, affected components, and surrounding callers; no evidence-supported bugs meeting the reporting threshold were found. This was a read-only review: builds, tests, and browser checks were not run, and exact conformance to the external Main-Theme specification could not be verified. Reviewed the supplied diff and relevant theme, navigation, build, math, and demo code against the pinned base; no new actionable findings were identified. This was a static, access-budget-limited review: no checks or browser tests were run, and the external design specification was unavailable.

Change walkthrough
Area Files Changes
Other code (13) static/css/main.css, static/js/theme-init.js, src/App.svelte, src/lib/Nav.svelte (+9 more) Centralizes semantic palettes, self-hosted fonts, component styles, and responsive navigation. Adds a blocking pre-paint resolver for saved palettes and system appearance. Removes Google-hosted font loading. Replaces hover navigation with dismissible click popovers and system-aware appearance controls.
Deployment & tooling (2) package.json, bun.lock Adds font dependencies and copies theme scripts and font assets into deployment output. Locks the three new variable-font packages.
Tests (1) tests/e2e/stat-blocks.spec.ts Updates the project-navigation assertion to open the menu by clicking.

Review effort: 3/5.

Static observations (not validation results)
Observation Detail
⚠️ Diff size 36 files, +1354/-517. Large diff; review coverage may be incomplete.
Binary changes No binary changes reported by this diff.
Credential patterns No matches after excluding known examples/placeholders. Added-line heuristics only; not a security audit.

Reviewed 4c0e098e6cbd8f5b2d9721e63e0e65ec824fd9ad with proxy/gpt-6.1-sol. Automated advisory review; no project commands or tests were executed.

<!-- forgejo-pi-review:c33892cb5524ecc320a49e9e1541dbd7427d4c19705f65c586fda71750caf3dd --> ## Pi code review **0 new actionable findings** No new actionable findings. Previously reported issues, if any, are tracked below. <details> <summary>Earlier findings: 1 rechecked</summary> - **Resolved:** Landscape navigation hides lower project links (`static/css/main.css:612`, first reported in review #49) — Current static/css/main.css constrains .site-nav__dropdown below the 820px breakpoint with max-height: calc(100dvh - 100%) and overflow-y: auto. The dropdown remains positioned below the sticky header, but its six project links in src/lib/Nav.svelte can now scroll within the remaining viewport instead of extending into an unreachable pinned region; browser verification was not available. </details> Reviewed head 4c0e098 against base 9f71625, including the design refactor, theme initialization, asset pipeline, affected components, and surrounding callers; no evidence-supported bugs meeting the reporting threshold were found. This was a read-only review: builds, tests, and browser checks were not run, and exact conformance to the external Main-Theme specification could not be verified. Reviewed the supplied diff and relevant theme, navigation, build, math, and demo code against the pinned base; no new actionable findings were identified. This was a static, access-budget-limited review: no checks or browser tests were run, and the external design specification was unavailable. <details> <summary>Change walkthrough</summary> | Area | Files | Changes | | --- | --- | --- | | Other code (13) | `static/css/main.css`, `static/js/theme-init.js`, `src/App.svelte`, `src/lib/Nav.svelte` (+9 more) | Centralizes semantic palettes, self-hosted fonts, component styles, and responsive navigation. Adds a blocking pre-paint resolver for saved palettes and system appearance. Removes Google-hosted font loading. Replaces hover navigation with dismissible click popovers and system-aware appearance controls. | | Deployment & tooling (2) | `package.json`, `bun.lock` | Adds font dependencies and copies theme scripts and font assets into deployment output. Locks the three new variable-font packages. | | Tests (1) | `tests/e2e/stat-blocks.spec.ts` | Updates the project-navigation assertion to open the menu by clicking. | Review effort: **3/5**. </details> <details> <summary>Static observations (not validation results)</summary> | Observation | Detail | | --- | --- | | ⚠️ Diff size | 36 files, +1354/-517. Large diff; review coverage may be incomplete. | | Binary changes | No binary changes reported by this diff. | | Credential patterns | No matches after excluding known examples/placeholders. Added-line heuristics only; not a security audit. | </details> --- Reviewed `4c0e098e6cbd8f5b2d9721e63e0e65ec824fd9ad` with `proxy/gpt-6.1-sol`. Automated advisory review; no project commands or tests were executed.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
BlackHatMagic/Lukeh.xyz!2
No description provided.