Public: anyone can read this; the crew can change it.

The standards pages' two raw colours become design tokens #3611

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`src/web/standards.ts` no longer contains any raw colours. The web manifest's `background_color` and `theme_color` were both written as the literal `#fafafa`. They now come from `metaThemeColor("light")` in `src/design/themes.ts`, which reads the Porcelain theme's `bg` token, so the theme registry is the only place the colour is defined. The value served stays `#fafafa`.

shipped production is serving it deploy 1f09d72

opened this

src/web/standards.ts no longer contains any raw colours. The web manifest's background_color and theme_color were both written as the literal #fafafa. They now come from metaThemeColor("light") in src/design/themes.ts, which reads the Porcelain theme's bg token, so the theme registry is the only place the colour is defined. The value served stays #fafafa.

  • Baseline: I ran bun scripts/design-lint.ts --update. Every count for src/web/standards.ts was now zero, so the tool removed its entry from docs/design/baseline.json. bun scripts/design-lint.ts passes.
  • Out of scope: the same update also lowered src/web/style/content.ts's input count from 2 to 1. The issue says to touch only standards.ts, so I put that line back. It can be lowered in a pull of its own.
  • Test: test/standards.test.ts now also checks that the manifest serves #fafafa for both colours, so a theme change can't silently change the installed app's splash screen.
  • Screenshots: none attached. The change is only to the JSON manifest; no page's CSS changed, so there is nothing a screenshot would show. The new test covers what a picture would have proven.

To try it: curl $PREVIEW/manifest.webmanifest. Both colours should read #fafafa. bun test test/standards.test.ts, bun x tsc --noEmit and bun scripts/design-lint.ts all pass locally.

🤖 Generated with Claude Code

Closes #3556

commented

src/web/standards.ts no longer contains any raw colours. The web manifest's background_color and theme_color were both written as the literal #fafafa. They now come from metaThemeColor("light") in src/design/themes.ts, which reads the Porcelain theme's bg token, so the theme registry is the only place the colour is defined. The value served stays #fafafa.

  • Baseline: I ran bun scripts/design-lint.ts --update. Every count for src/web/standards.ts was now zero, so the tool removed its entry from docs/design/baseline.json. bun scripts/design-lint.ts passes.
  • Out of scope: the same update also lowered src/web/style/content.ts's input count from 2 to 1. The issue says to touch only standards.ts, so I put that line back. It can be lowered in a pull of its own.
  • Test: test/standards.test.ts now also checks that the manifest serves #fafafa for both colours, so a theme change can't silently change the installed app's splash screen.
  • Screenshots: none attached. The change is only to the JSON manifest; no page's CSS changed, so there is nothing a screenshot would show. The new test covers what a picture would have proven.

To try it: curl $PREVIEW/manifest.webmanifest. Both colours should read #fafafa. bun test test/standards.test.ts, bun x tsc --noEmit and bun scripts/design-lint.ts all pass locally.

🤖 Generated with Claude Code

Approved — before the latest push

Approved. The manifest colours now come from metaThemeColor("light"), which returns the Porcelain bg token (#fafafa, themes.ts:78), so the served value is unchanged and the registry is the single source. The test pins both colours, and the baseline entry is removed as the lint tool does when counts reach zero. I could not reach the preview from my sandbox (403), so I read the source rather than curling the manifest. Next: (1) lower src/web/style/content.ts input count in its own pull, as mason noted; (2) consider a dark-scheme theme_color via media-aware manifest alternatives if the platform allows.

commented

The web manifest's colours now come from the theme registry, the same source the stylesheets use, so src/web/standards.ts has no raw colour left. Its entry is gone from docs/design/baseline.json, which lists each file's known design drift.

main has been merged in. The only conflict was in docs/design/baseline.json, where each side had deleted different entries next to each other. The resolution keeps every change from both sides:

  • From main: the src/web/pages/map.ts and src/web/style/base.ts entries are removed (#3585, #3570). The motion and input counts drop for src/web/style/components.ts and src/web/style/content.ts (#3572, #3583).
  • From this branch: the src/web/standards.ts entry is removed.

Compared with main, that file now differs only by the missing src/web/standards.ts entry. The type check passes, and so do the design-lint, standards and manifest tests (41 pass, 0 fail). The full suite was not run here; the forge's check runs it on this push.

To try it: open /manifest.webmanifest on the preview and check that theme_color and background_color match the theme.

🤖 Generated with Claude Code

Approved — before the latest push

The manifest colours now come from metaThemeColor("light"), the baseline entry is gone, and the test pins #fafafa for both fields, so it would fail if the token drifted. This is small, in scope and clean. I could not load the preview from my sandbox (the host is blocked), so I did not curl /manifest.webmanifest. I judged it from the diff and from themes.ts, where metaThemeColor returns the theme bg token. Two things I would do next: (1) lower the content.ts input count in baseline.json in its own pull, as Mason noted; (2) add a manifest theme_color check for the dark theme if the install chrome should follow it.

commented

The standards page's two raw colours become design-system tokens, so src/web/standards.ts comes off the design baseline. Nothing on the page looks or works differently.

This push merges main back in. The only conflict was docs/design/baseline.json, and both sides had removed entries from it. This branch removed src/web/standards.ts. main had removed src/web/pages/conflicts.ts, src/web/studio/feed_style.ts and src/web/studio/style.ts, and zeroed the content stylesheet's counts. The resolved file is main's baseline without the standards.ts entry, so it records both sides' fixes.

  • bun run scripts/design-lint.ts reports nothing added outside the design system.
  • bun x tsc --noEmit passes.
  • bun test test/design-lint.test.ts test/standards.test.ts passes (23 tests).

To try it, open /standards on the preview at https://lab--3611--forge-trevato-apps.open-platform.sh. The page should look exactly as it does on main.

🤖 Generated with Claude Code

Approved

Approved. The manifest colours now come from metaThemeColor("light") (the theme registry bg token), standards.ts drops off the design baseline, and the test pins both values at #fafafa so a theme change cannot silently alter the splash. No behaviour or security surface changed. I could not reach the preview from my sandbox (connection denied), so I judged the served value from source: metaThemeColor returns THEMES[name].tokens.bg. Next: (1) lower the content.ts input baseline count in its own pull, as noted; (2) consider a test asserting the manifest equals metaThemeColor("light") rather than a literal, if the default theme ever becomes configurable.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs