Archilyzer · Source

archilyzer

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

commit c2bc533abfdb7f617fc33f23f94dddf0912cdd45
parent ca58eef7d9d594239ddbfff93f3d86b840d6efc7
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri, 25 Sep 2026 22:11:57 -0400

plans: brand + themes — slice S2 as shipped (base × accent); CHANGELOGs

The S2 record under "As shipped":
- the token sheet (three bases, seven accents, validated charts);
- the runtime and pickers, and the layouts;
- the tests and the commit table;
- the gates: common 1,893, editor unit 78, scripts 162+1, mcp 219; three
  builds; export e2e 199, hub 12, homepage 24, editor 22;
- the dataviz validator results, including the all-pairs floor-band WARNs;
- what was found and left.

editor/CHANGELOG.md gets [Unreleased] bullets. export/CHANGELOG.md and
homepage/CHANGELOG.md get new [Unreleased] sections.

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

Diffstat:
Meditor/CHANGELOG.md | 1+
Mexport/CHANGELOG.md | 3+++
Mhomepage/CHANGELOG.md | 10++++++++++
Mplans/brand-and-themes.md | 184+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 198 insertions(+), 0 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## [Unreleased] +- **Every page now has a ground and an accent to choose, and the five theme families are gone.** The theme menu (the palette button beside the quick toggle, in the editor's sidebar and in the header of every published site, the hub and the homepage) has two groups. **Base** is System, Light, Sepia or Dark; Sepia is new, a warm paper ground for long reading. **Accent** is Signal, Brass, Vermilion, Violet, Sakura, Blue or Green, with the site's own tagged *default*; a site with a custom hex offers it first as *Site colour*. The quick toggle cycles System → Light → Sepia → Dark. A published site opens on the reader's system setting, in the accent its site form sets. The hub and the homepage open on Dark, in Signal, and the editor follows the system, in Signal. Each accent has a value for each ground that reads at 4.5:1, and a custom hex is darkened or lightened per ground to match. A reader's accent is remembered only while it differs from the site's: picking the site's own again forgets it, so the reader follows the site if its accent changes later. Base, Archive, Selenized, Swiss and Archilyzer are gone. A choice made before this update carries over once: light stays light (Archive light becomes Sepia), dark stays dark and system stays system; the family itself is dropped. Headings are Archivo, text is IBM Plex Sans and figures are IBM Plex Mono everywhere, with one corner radius. Chart colours are fixed per ground and never follow the accent; the third is a violet, well clear of the red that marks a recording as gone. The phone's browser bar takes the page's ground, not the accent. Needs a rebuild and deploy of every site, the hub and the homepage. - **A site's accent is one of seven named colours or a custom one, and a site can split its wordmark.** The site form's **Brand accent** is now a row of swatches: Signal (the family default), Brass, Vermilion, Violet, Sakura, Blue and Green, plus **Custom**, whose colour goes in the **Custom hex** field (typing there picks Custom). `site.json` stores the accent's id (`"accent": "brass"`) or the hex. Picking Signal stores no key, because no key means Signal. A custom colour is darkened or lightened for each reading theme until it reads at 4.5:1; the seven named colours already do. A new **Wordmark lead** field names the heavy first part of the header wordmark, e.g. `Jer` for Jeralyzer. The form refuses a lead that is not how the header title starts, and `site.json` keeps `wordmarkLead` only when it is. What other hubs read does not change: `/site.json`, the hub's `hub-sites.json` and the homepage summary still carry a hex, and an id goes out as its colour on dark. `SITE.md` lists both keys. The header, icons and theme picker that use them come with the rest of the brand work; until then a site with a named accent is tinted with that colour, as a custom hex is today. - **The hub and the homepage drop their subtitles, and both carry a Ko-fi link.** The headings are in Title Case on both pages: **Official Instances**, **Archives You Added** (hub) and **What It Does** (homepage). The line "The archives I run. Anyone can run their own." is gone from both, and the official-instance cards no longer show the site's description under its name; the four figures stay. The footer of the homepage and of the hub has a plain link reading "Ko-fi" to `https://ko-fi.com/archilyzer`. A published site's footer does not: an archive someone else hosts never carries it. Needs a rebuild and deploy of the hub and the homepage. - **A job that waited in a queue no longer ends `failed` after doing its work.** A sync, download or other job queued behind another on the same platform ran its final page refresh outside any request, where Next refuses it, so the job read `failed` and `pnpm ops … --wait` exited 1 even though the work was done (the teamrcn sync on 2026-09-25). The refresh is now skipped there with one warning in the server log; the pages re-read disk on their next load anyway. diff --git a/export/CHANGELOG.md b/export/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## [Unreleased] +- **A reader picks a ground and an accent; the five theme families are gone.** The header's theme menu has **Base** (System, Light, Sepia, Dark) and **Accent** (Signal, Brass, Vermilion, Violet, Sakura, Blue, Green, with the site's own tagged *default*, and *Site colour* first on a site with a custom hex). The toggle beside it cycles System → Light → Sepia → Dark; on a phone both lists are in the menu sheet. A site opens on the reader's system setting in the accent from its `site.json`, rendered as `<html data-accent>` so it is right before any script runs; the hub opens on Dark in Signal. A reader's accent is stored only while it differs from the site's. A stored theme from before carries over once (Archive light becomes Sepia) and the old keys are deleted. Type is Archivo, IBM Plex Sans and IBM Plex Mono; charts have fixed colours per ground; the browser bar follows the ground (a light/dark pair for a site, dark for the hub). + ## [0.8.7] - 2026-08-12 - **Every archive now says what built it, and stopped shipping its own copy of the source.** The footer carried a `code.tar.gz` link on every site — `create-archives.sh` wrote a tarball into `export/public/` and each deployed archive served its own duplicate of the whole workspace (verified live: `200 application/gzip` on jeralyzer). That link is **gone**, replaced by **"Built with [Archilyzer](https://archilyzer.pages.dev)"** beside the social links. The source is now published once, centrally, with a checksum and a commit — rather than N times, undated, with no way to tell two copies apart. The back-link is deliberately **ungated by instance mode** (a hub is Archilyzer too, and a credit that appeared on sites but not hubs would make them look like different software), **independent of any configured hub URL** (that is the operator's family link, a different relationship), and opens **in the same tab**, matching the header's hub link — only social icons open new ones. *"Built with"* sits outside the anchor so the accessible name is exactly `Archilyzer`. One knock-on: the **Downloads** eyebrow used to be unconditional because that link always followed it; it now appears only when the transcript-archive or offline link is actually there, instead of captioning empty space. - **`corpus.json` and `llms.txt` name the software that produced them.** Both the per-site and the hub builders stamp a `generator` string, and both `llms.txt` renderings end with a `Generated by …` line — so anything reading an archive machine-side can find the tool that built it. **The corpus spec version is deliberately unchanged at 3**, and a test asserts it: every prior bump announced a new *fetchable layer*, where a client that ignored it would miss retrievable data. An informational credit breaks no reader, so forcing every consumer to re-evaluate compatibility for a byline would be the wrong trade. The reasoning is recorded in the version-history comment rather than left for the next person to reconstruct. diff --git a/homepage/CHANGELOG.md b/homepage/CHANGELOG.md @@ -1,5 +1,15 @@ # Homepage Changelog +## [Unreleased] + +- **The homepage opens on the Dark ground in Signal, and a reader can pick another ground or accent.** + The theme menu has **Base** (System, Light, Sepia, Dark) and **Accent** (the seven named + accents, Signal tagged *default*); the toggle cycles System → Light → Sepia → Dark. The old + Archilyzer theme family is gone, and so are the other four: the dark ground is now the warm ink + the archives used. Type is Archivo, IBM Plex Sans and IBM Plex Mono. The chart's third colour + is a violet, well clear of the "gone" red. A stored theme from before carries over once. The + docs' *Operate* page describes the accent and the reader's menu. + ## 2026-08-12 - **This package is the project's site now.** It was a shelf of one operator's archives diff --git a/plans/brand-and-themes.md b/plans/brand-and-themes.md @@ -557,6 +557,190 @@ operator picks an accent or a lead. - The worktree is port block **#1** (editor 3101, test 3111, export 3110), not #2: `pnpm wt list` sorts, and `diet-series` is #2. +### Slice S2, as shipped — base × accent (2026-09-25) + +Branch `brand/themes` off S0's tip `02295a94`. S2 replaces the five theme families with two independent +reader choices: a **base** (Light / Sepia / Dark, plus System) and an **accent** (the seven named accents of +`lib/brand.ts`, defaulting to the site's own). No S1 file was touched: not the header, footer, mark, +wordmark, manifest, icons, service workers or the `icons` metadata, and not C2's hub search components. + +**`common/styles/tokens.css`.** +- The `dark` custom variant stays. Every `[data-theme=…]` block, the `.dark{}` token block and the per-family + font/radius rules are gone. +- `:root` carries `--radius: 0.375rem` and a default `--brand-mark` (Signal's on-dark `#5fa8a0`), so a page + with no `data-accent` (the editor) still has one. `.font-display { font-stretch: 112% }`. +- Three base blocks: `:root, html[data-base="light"]`, `html[data-base="sepia"]`, `html[data-base="dark"]`. + Each declares: + - all **49** colour tokens of `homepage/e2e/theme.spec.ts`'s list (the plan said 48; lines 64–112 are + 49) and `color-scheme`; + - `--swatch-<id>` for the seven accents on that ground and + `--swatch-custom: var(--accent-custom-<base>, var(--swatch-signal))`; + - `--brand: var(--swatch-signal)`, a `color-mix` `--brand-strong` (78 % toward black on light/sepia, + toward white on dark), `--brand-soft` (12 % / 16 %), `--brand-ink` (`#fff` / `#0c0a08`); + - a neutral `--primary` (`#202a31` / `#33281a` / `#efe7d8` on a ground-coloured foreground) and + `--ring: var(--brand)`. +- Then one `html[data-accent="<id>"]` rule per accent (`--brand: var(--swatch-<id>)`, `--brand-mark: <onDark>`) + and `html[data-accent="custom"]` (`--brand: var(--swatch-custom)`, + `--brand-mark: var(--accent-custom-dark, #5fa8a0)`), after the bases at the same specificity. +- **Light** is the old archilyzer light block. **Dark** is the archive ink block plus + `--destructive-soft`, `--state-gone: #d9644f` and `--state-gone-soft`; the gone red sits inside the + validator's dark lightness band. **Sepia** is new: the plan's five values + (the canvas holds no more), with status, panel and chart values from the archive paper block, darkened + for the ground. `themeTokens.test.ts` holds every text token (foreground, muted, destructive, success, + warning, info, state-gone) at ≥ 4.5:1 on each ground and card. +- **Charts** are fixed per base, one hue order everywhere (blue, green, violet, amber, magenta): + + | Base | chart-1..5 | surface | gone | + |---|---|---|---| + | Light | `#3a7de0 #2f8a57 #5e3aa8 #a8741a #c24a8a` | `#ffffff` | `#a8412d` | + | Sepia | `#3574d6 #2a7d4f #5e3aa8 #a8741a #bb4585` | `#faf4e6` | `#a3392a` | + | Dark | `#3561c8 #3fa577 #9a7ee6 #b98a2a #c24c8a` | `#16110a` | `#d9644f` | + + The dataviz skill's `validate_palette.js` ran on each base's surface: + - Adjacent pairs pass every check. Adjacent is the rule for stacks, bars and lines. + - All pairs also exit 0, but one non-adjacent pair per base sits in the CVD 6–8 **floor band** (WARN, + legal only with a legend or direct labels): green ↔ amber on light (6.2) and sepia (6.1), and green ↔ + magenta on dark (6.9). + - chart-3 against `--state-gone` (all pairs) passes every check on every base: normal ΔE 24.3 / 23.7 / + 22.9, and protan or deutan ΔE ≥ 21. + - chart-1 is a blue, ΔE 17.3 / 16.8 / 23.3 from Signal. + + Output: `$T/s2-dataviz.log`. + +**`common/styles/fonts.ts`.** Archivo (`wdth` axis, variable weight) as `--font-display`, IBM Plex Sans +400–700 normal + italic as `--font-sans`, IBM Plex Mono as `--font-mono`. Source Serif/Sans/Code and +JetBrains Mono are gone. The comments in all three `globals.css` files describe the bases and accents. + +**`common/components/themeConfig.ts`.** +- `BASE_KEY` (`ytdlp-tb:base`), `ACCENT_KEY` (an id), `LEGACY_THEME_KEY` and `LEGACY_MODE_KEY`. +- `ThemeBase`, `ResolvedBase`, `ThemeAccent` (an id or `"custom"`), `THEME_BASES`, `nextBase`, `resolveBase` + and `REQUIRED_TOKENS`. +- `accentOptions(siteAccent)`, which both pickers read. A custom-hex site gets "Site colour" first. +- The pure `migrateLegacy`, following the plan's table. +- `buildThemeScript({defaultBase})`, which runs in the plan's order and sets `data-theme-ready` last. It + guards every storage touch, so a throwing `localStorage` still paints the default base and sets the + marker. +- `themeConfig.test.ts` runs the string in `node:vm` over 7 legacy themes × 5 modes × 6 stored bases × + 3 defaults × OS light/dark (1,260 cases). It checks: + - the stored base, and that both legacy keys are deleted; + - `data-base`, `.dark` and `theme-color`; + - that the marker is the last mutation. + + It also covers the accent, a throwing storage and a throwing matchMedia. + +**`ThemeProvider`.** +- Props `{defaultBase = "system", siteAccent = DEFAULT_ACCENT}`. The context is exactly the plan's: + `{base, resolvedBase, isDark, accent, siteAccent, setBase, cycleBase, setAccent}`. +- A `useLayoutEffect` adopts the stored choice. It runs the same one-time migration, then re-asserts + `data-base`, `.dark`, `data-accent` and `theme-color`. Nothing is written before adoption. +- `systemDark` follows a live `matchMedia` listener. +- `setAccent(siteAccent)` removes the key. `"custom"` is never stored. + +**Consumers ported.** Everything else that read the old context (`theme`, `mode`, `setTheme`, `setMode`, +`cycleMode`, `THEME_FAMILIES`, `THEME_MODES`) moved over: +- `ThemeMenu`: + - `aria-label="Choose theme"`; + - a "Base" group of `menuitemradio`s: System, Light, Sepia, Dark; + - an "Accent" group: a swatch dot of `var(--swatch-<id>)`, the name, and a visible "default" tag. + + The tag is part of the item's accessible name ("Brass default"), so the specs match by prefix. +- `ThemeToggle`: "Switch to <next>", Monitor/Sun/BookOpen/Moon. `data-theme-mode` became + `data-theme-base`; nothing read it. +- `export/app/components/MobileMenu.tsx`: native radio groups "Base" and "Accent". +- `ui/sonner.tsx`: `theme={isDark ? "dark" : "light"}`. +- The three layouts. + +A grep for the old names finds only S1's `manifest.ts` (`parseAccent`, S1 replaces it) and +`editor/app/sites/actions.ts` (`parseAccent` of the custom hex, by design). + +**Layouts.** +- The export site renders `<html data-accent={resolveAccent(site.accent).id}>`, plus `customAccentVars` + inline for a custom hex. It opens on the system base. +- The hub opens dark in Signal. The homepage opens dark with `data-accent="signal"`. +- The editor layout is unchanged: system base, Signal from `:root`. +- `generateViewport`: a site gets the light/dark `BASE_GROUNDS` media pair; the hub and the homepage get + `BASE_GROUNDS.dark`. +- `FALLBACK_THEME_COLOR`, `HUB_THEME_COLOR`, the homepage `THEME_COLOR` and the hex-only `parseAccent` + read at `export/app/layout.tsx:64` are gone. +- `siteAccentVars` and its test are deleted. + +**Tests.** +- The export `theme.spec` is rewritten. `theme-family.spec` is deleted and `theme-accent.spec` is new. +- `site-branding` checks `data-accent="custom"`, the inline `--accent-custom-light` and a computed + `--brand` of `#cc3366` on light. +- In `responsive`, the "Archive" radio is now "Sepia". +- The homepage `theme.spec` and the editor `theme.spec`: see the commits. +- `themeTokens.test.ts` (12 tests) parses `tokens.css`. It checks completeness, and that the swatches and + `--brand-mark` equal `ACCENTS`, the accent rules follow the bases, and `customAccentVars`' names match. + +**Copy.** `homepage/content/docs/operate.md` describes the accent and the reader's menu. The hub's +AddArchive comment no longer points at the retired archilyzer block. `export/playwright.config.ts:29` only +describes the committed icons, which is S1's, so it was left. + +| sha | what | +|---|---| +| `7ba8258b` | `tokens.css`: three bases × seven accents, fixed validated charts; `fonts.ts`: Archivo / Plex Sans / Plex Mono; `globals.css` comments; `themeTokens.test.ts`; `REQUIRED_TOKENS` | +| `ef56f3cf` | `themeConfig.ts`: keys, types, `migrateLegacy`, `buildThemeScript`; the node:vm matrix test | +| `639fd1ff` | ThemeScript / ThemeProvider / ThemeMenu / ThemeToggle / sonner / MobileMenu; the export and homepage layouts (data-accent, defaults, `BASE_GROUNDS` chrome); the retired exports removed | +| `553733c1` | `siteAccentVars` and its test deleted | +| `93b963a0` | export specs: `theme` rewritten, `theme-accent` new, `theme-family` deleted, `site-branding`, `responsive` | +| `6d179081` | homepage `theme.spec`: dark + Signal, `REQUIRED_TOKENS` on all three bases | +| `b0fefda7` | editor `theme.spec`: seeds `BASE_KEY`; migration cases | +| `b82f8e02` | `operate.md` copy; AddArchive comment | +| `996d763d` | `tokens.css` chart comments: all pairs pass with one CVD floor-band pair per base (comments only) | + +**Gates.** +- tsc was clean before each code commit: six runs, with the three spec commits sharing one. A run on the + final tree also covers `b82f8e02`, which changed only markdown and a comment. +- Unit and script tests: + - common **1,893/1,893**: S0's 1,874, minus the `siteAccentVars` test, plus 12 token and 8 themeConfig + tests; + - editor unit **78/78**; + - `test:scripts` **162 + 1 skip**; + - mcp **219/219**. +- Builds, with the `export/public` links seeded, `sw.js` a plain copy, no dangling links, and + `homepage/public`'s four data entries copied from the primary: + - `pnpm --filter editor exec next build` ok (80 s); + - `pnpm --filter export exec next build` ok (50 s, the known Turbopack warning); + - `pnpm --filter homepage exec next build` ok (23 s). + - The built `<html>` carries `data-accent`, the site's two theme-color metas are + `#f3f6f7` / `#0c0a08`, and the homepage's is `#0c0a08`. +- e2e: + - export in full: **199 passed, 0 failed**, 8.1 min, after 44 s in the queue behind `brand-mark`; + - `e2e:hub`: **12 passed**, 23 s; + - homepage in full: **24 passed**, 56 s, with no skips because the data was copied; + - editor `theme.spec.ts sites-crud.spec.ts branding.spec.ts`: **22 passed**, 1.1 min. No other editor + spec mentions theme, `data-theme` or the theme keys. +- The primary's `export/public/sw.js` was untouched: 10,027 B, mtime 20:47:37, before and after. +- The dataviz validator exited 0 on every run listed above. The only WARNs are the three all-pairs + floor-band pairs. +- Numbers tools: none. +- Visual check: a brass site (`SITE_ID=shotsite`, a copy of the fixture with `"accent":"brass"`) was + built to `export/out` and served on `localhost:3310`. Shots: + - each base × {brass, violet} at 390 and 1280; + - the menu open on light and on dark; + - the phone sheet on sepia and dark. + + They are in `$T/s2-*.png`. Sepia reads as paper. The dark ink ground carries brass and violet cleanly. + Contrast, computed: sepia fg 12.2, muted 5.5 (5.9 on card), faint 3.6, brass-on-sepia 4.6, white on + brass 5.4; dark fg 16.1, muted 7.1, faint 3.5, brass 10.1, gone 5.5. + +**Found and left.** +- **chart-4 (amber) and chart-5 (magenta) sit near the gone red.** Normal ΔE to `--state-gone` is 11.8–14.5 + on the three bases, below the validator's floor of 15 for a pair. The gate the plan asked for is chart-3, + and it clears widely. Every warm hue flanks red, and gone never draws inside a chart. The homepage's five + official instances do reach slots 4 and 5. +- **No-JS readers get the light block.** The server renders no `data-base`, so a page no script has run on + shows the light base, as the old base family's light look did before. The hub and the homepage are + therefore light without JS. +- **theme-color after client navigation is not asserted.** Next may re-render its head metas on client + navigation; the provider re-asserts theme-color only on a theme change. +- **Two changelogs gained an `[Unreleased]` section:** `export/CHANGELOG.md` and `homepage/CHANGELOG.md` + had none. The export one shows under /sites "Release notes" and on every site's /changelog until it is + cut. +- **`export/out` holds the brass shot build**, not a gate build, and this worktree's `homepage/public` + holds copied data (gitignored). + ## Operator rollout (after merge) 1. Restart the live :3001 editor on the new `main`; it needs S0's form.