Skip to content

refactor: website token alignment + design-tokens light palette refresh#321

Merged
blove merged 11 commits into
mainfrom
website-token-alignment
May 15, 2026
Merged

refactor: website token alignment + design-tokens light palette refresh#321
blove merged 11 commits into
mainfrom
website-token-alignment

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 15, 2026

Summary

Third (final) PR in the cockpit dark mode + style alignment series (spec: `docs/superpowers/specs/2026-05-15-website-token-alignment-design.md`, plan: `docs/superpowers/plans/2026-05-15-website-token-alignment.md`).

  • Refresh `@ngaf/design-tokens` light palette to absorb `@ngaf/chat` library's polished consumer aesthetic. Surfaces flip from cool off-white (`#fafbfc`) to pure white (`rgb(255, 255, 255)`); text primary from blue-tinted (`#1a1a2e`) to near-black (`rgb(28, 28, 28)`); borders to neutral grays. Shadows shift from cool `rgba(15, 23, 41, *)` to neutral `rgba(0, 0, 0, *)`. Chat lib's own tokens stay independent (decision C from brainstorming); embedded chat in cockpit visually unifies because design-tokens absorbed chat lib's values.
  • Website migration: drop the hand-maintained `@theme` block in `global.css`. New build-time generator (`libs/design-tokens/scripts/generate-theme-css.ts`) reads TS constants and emits `libs/design-tokens/src/lib/theme.css`. Website imports the generated file via `@import "@ngaf/design-tokens/theme.css"`. Single source of truth; no drift. A drift-guard Vitest test re-runs the generator and asserts the committed file matches.
  • Cockpit: no source changes. `cssVars(theme)` picks up the new light values automatically. Dark palette unchanged. The cockpit dark-mode e2e light assertion updated to `rgb(255, 255, 255)`.

PR 1 (cockpit polish, #307) and PR 2 (chat lib polish, #313) shipped earlier in the sequence. This closes the visual-consistency gap.

Test plan

  • design-tokens, ui-react, chat, cockpit lint + test — green
  • `pnpm nx e2e cockpit` — green (6/6 local)
  • `pnpm nx build website` — green
  • `pnpm nx build cockpit-chat-timeline-angular` — green
  • CI verifies website lint + the full check stack
  • Manual chrome MCP smoke: cockpit light mode + website light mode after merge

Note

Two pre-existing local-failure flags surfaced during this PR's check stack (`website:lint` on the tracked `apps/website/public/demo/main.js` artifact, `example-layouts:test` Nx executor disagreement). Verified these fail on baseline too, not introduced here.

🤖 Generated with Claude Code

blove and others added 11 commits May 15, 2026 09:22
Third (final) PR in the cockpit dark mode + style alignment series.

- Refresh @ngaf/design-tokens light palette to chat lib aesthetic
  (pure-white surfaces, near-black text, neutral grays). Chat lib stays
  independent (decision C); embedded chat in cockpit visually unifies
  because design-tokens absorbed chat lib's values.
- Migrate apps/website from hand-maintained @theme block to build-time
  CSS generation from @ngaf/design-tokens TS constants. Single source
  of truth; no drift.
- Document the runtime-vs-build-time naming asymmetry (cockpit uses
  bg-[var(--ds-canvas)]; website uses bg-canvas).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 15, 2026 5:32pm

Request Review

@blove blove merged commit 64c95bd into main May 15, 2026
16 checks passed
blove added a commit that referenced this pull request May 15, 2026
…s) (#333)

* docs: dark palette alignment design

Sibling of #321 (light palette refresh). Aligns design-tokens dark
palette to chat lib's neutral-dark aesthetic (rgb(17,17,17) canvas,
rgb(28,28,28) surface, etc.) instead of the original brand-blue
undertone shipped in #298. Embedded chat in cockpit dark mode now
visually unifies with cockpit chrome.

Reverses decision D from the original cockpit dark mode brainstorming
in favor of design-system cohesion. Accent family stays unchanged
(brand identity preserved).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat(design-tokens): align dark palette to neutral grays

Reverses #298's brand-blue undertone in dark mode in favor of cohesion
with the @ngaf/chat lib's neutral-dark aesthetic. Embedded chat surfaces
in cockpit dark mode now unify visually with cockpit chrome — no iframe
color seam. Accent family unchanged (brand identity preserved).

* test(design-tokens): update dark-theme css-vars assertions

Aligns --ds-canvas and --ds-text-primary expectations with the new
neutral-dark palette.

* test(cockpit): update dark-mode e2e canvas assertion

Aligns the default-dark --ds-canvas expectation with the new
neutral-dark palette.

* chore(design-tokens): bump to 0.0.35

Patch bump for dark palette alignment.

* test(example-layouts): update dark-theme install-embedded-theme assertion

Aligns the default-dark --ds-canvas expectation with the new
neutral-dark palette.

* test(example-layouts): fix stale #fafbfc light-canvas assertions

Pre-existing test drift missed by #321 (light palette refresh —
canvas changed to rgb(255, 255, 255)). Caught while updating the
dark assertion in this PR.

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant