Skip to content

refactor(web-ui): govern surface theme token namespaces#1341

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/theme-surface-namespace-governance
Jun 29, 2026
Merged

refactor(web-ui): govern surface theme token namespaces#1341
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/theme-surface-namespace-governance

Conversation

@limityan

@limityan limityan commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Migrates remaining Flow Chat/tool-card surface-local CSS variable names to explicit namespaces, including BaseToolCard, SnapshotCard, ScrollAnchor, and failed user-message sizing keys.
  • Consolidates exact command-empty color usage through --tool-command-empty-rgb, and moves widget/editor highlight defaults into shared token definitions without changing their RGB values.
  • Adds SURFACE_TOKEN_RENAME_CONTRACTS plus audit/baseline enforcement so deprecated local keys cannot return silently and rename canonical targets must continue to exist.
  • Updates the theme optimization and visual governance docs to reflect the completed 6-9 surface coverage and the tightened terminal/domain metrics.

Risk Review

  • No intentional user-visible color change: renamed or moved values keep the same colors and alpha behavior.
  • No adjacent status-color merge: git/diff accepted/rejected/conflict semantics, terminal ANSI palette, Monaco theme palette, Mermaid, Prism, and generated widget payload compatibility are left intact.
  • Dynamic CSS key review: target deprecated keys are not generated through runtime string composition; existing dynamic families remain the registered theme families audited by theme:color-audit.
  • Generated widget payload remains unchanged at 326 vars; the new host UI tokens are not exported into the iframe payload.
  • Rename contract drift is now guarded in both directions: old keys must stay absent, and each registered canonical target must remain defined.

Validation

  • pnpm run theme:color-audit:test
  • pnpm run theme:color-audit
  • pnpm run theme:visual-contract
  • pnpm run lint:web
  • pnpm run type-check:web
  • pnpm --dir src/web-ui run test:run
  • pnpm run build:web
  • git diff --check

pnpm run build:web completed with existing Vite chunk/dynamic-import warnings only.

@limityan limityan force-pushed the yanzhn/theme-surface-namespace-governance branch from adeced1 to c1c07a0 Compare June 29, 2026 08:02
@limityan limityan merged commit 3f526f5 into GCWing:main Jun 29, 2026
4 checks passed
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