Skip to content

refactor: compress theme color contracts - #1399

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/theme-contract-compression-next
Jul 3, 2026
Merged

refactor: compress theme color contracts#1399
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/theme-contract-compression-next

Conversation

@limityan

@limityan limityan commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Retire redundant overlay micro-stops and remap internal reads to canonical 08/12 overlay stops while preserving generated-widget iframe compatibility aliases.
  • Shrink generated-widget host theme payload from 94 to 80 keys by moving derived accent/status/border/radius values to iframe fallback/static shell.
  • Compress installer, CLI/TUI, Mermaid, and Monaco/editor specialty palettes, then update governance baselines and the theme optimization design doc.

Metrics

Area Before After
Web UI unique colors 356 346
Web UI generated widget payload keys 94 80
Web UI specialized near pairs 26 13
Installer unique colors 66 62
Installer theme preset near pairs 11 3
CLI total unique colors 152 148
CLI runtime unique colors 109 107
CLI preset near pairs 4 0
CLI runtime preset near pairs 2 0

Review notes and risk

  • Subagent review found no architecture-blocking issues, but product-design review identified visual risks; this update restores Monaco diff text/line/gutter hierarchy, makes light card active feedback visible, restores readable Mermaid note text, and preserves visible primary background identity for named dark installer themes.
  • Retired overlay keys are no longer exported by root/runtime/internal reads; historical generated-widget content still resolves them through iframe compatibility aliases.
  • Removed widget payload keys are covered by fallback/static shell tests so iframe-rendered content can still resolve derived values without expanding the host theme API.
  • CLI runtime and OpenCode compatibility declarations are tracked separately so compatibility-only fields are not counted as runtime renderer benefit.
  • Installer keeps 3 documented near pairs for user-visible theme preview identity; these are not treated as ordinary app UI color debt.

Verification

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

@limityan
limityan force-pushed the yanzhn/theme-contract-compression-next branch from 7673b9b to 88d8d55 Compare July 3, 2026 05:35
@limityan
limityan merged commit cae512b into GCWing:main Jul 3, 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