feat(ui): publish editor chrome tokens and Storybook inventory - #360
feat(ui): publish editor chrome tokens and Storybook inventory#360cursor[bot] wants to merge 5 commits into
Conversation
Give hosts a typed catalog of the repeating --cwl-* chrome tokens, a DTCG 2025.10 interchange snapshot, and Storybook stories for toolbar button states so brand theming happens on .cwl-editor after a WCAG 2.2 contrast check. Co-authored-by: Seongho Bae <[email protected]>
There was a problem hiding this comment.
Stale comment
Review (head
c9f99c8)The token catalog, fail-closed unknown-name behavior, DTCG 2025.10 snapshot, Storybook inventory, and host next-action (override
--cwl-*on.cwl-editorafter WCAG 2.2 contrast) are the right buyer-facing slice. CSS staying runtime authority is correct. Keep this Draft while #118 ownsv0.6.0.Blocking for this lane
ADR identity collides. This PR adds
docs/adr/0027-editor-design-tokens-storybook.md, but 0027 is already used by open #141 (DOCX page layout), #248/#249/#285 (writing diagnostics), and #320 (Hangul). #248 also occupies 0028. Landing two different 0027 files is not a mergeable architecture record.REQUEST_CHANGES is unavailable on this automation-owned PR. Next action on this same writer lane: refetch the open ADR queue, renumber this decision to the next unused identifier (currently 0029 or later), and update the filename, index, TRACEABILITY, doctoring, and any filename-pinning tests together. Do not take 0027/0028.
Sent by Cursor Automation: Fix Issues
There was a problem hiding this comment.
Stale comment
Head
89dcc2astill cannot land. The ADR index now points at 0031, but the collidingdocs/adr/0027-editor-design-tokens-storybook.mdfile remains in the tree, and TRACEABILITY/doctoring still cite ADR 0027. Landing this head would republish a second 0027 onto protectedmainnext to #141, #248/#249/#285, and #320.The catalog also mislabels print-media hexes as
forcedColorsValue. Insrc/styles.css, those values live under@media print.@media (forced-colors: active)only sets.cwl-tb-btn:focus-visible { outline-color: CanvasText; }. The current test ratifies the mislabel with a bare hex substring check.Keep this Draft. Same-automation author cannot REQUEST_CHANGES here; a successor on the writer branch will delete the leftover 0027 file, retarget TRACEABILITY/doctoring to 0031, and rename the print field with media-block assertions.
Prior threads: leftover 0027 file is only partially addressed; the 0031 index row is fully addressed. Do not treat queued checks as acceptance evidence.
Sent by Cursor Automation: Fix Issues
There was a problem hiding this comment.
Verdict
Do not merge this draft. Prefer successor #362 (03a823d) over this head and over #361.
This head still contains leftover docs/adr/0027-editor-design-tokens-storybook.md and labels @media print remaps as forcedColorsValue. #361 removed those collisions. #362 keeps that repair and also discloses that shipped dark .cwl-tb-btn.is-active text (--cwl-accent on --cwl-accent-soft) is below WCAG 2.2 4.5:1.
Buyer next action
Use #362. Call getEditorThemeTokenContrast('cwl-accent', 'cwl-accent-soft', 'dark') and override those tokens when meetsTextContrast is false. Do not edit Inkspan internals. Keep the token lane Draft while issue #118 owns live v0.6.0 publication.
No approval from this automation.
Sent by Cursor Automation: Fix Issues


Problem
Hosts already re-theme Inkspan by overriding
--cwl-*custom properties, but the names, light/dark/forced-colors values, and next action lived only insidesrc/styles.css. There was no typed catalog, no Design Tokens Format Module 2025.10 interchange snapshot, and no Storybook inventory of repeating toolbar/editor chrome.Buyer next action
Override the named tokens on
.cwl-editorafter checking WCAG 2.2 contrast. Do not edit Inkspan internals. Runpnpm storybookand open Editor Chrome / Toolbar Button States to preview the same objects buyers see.Test-first proof
src/designTokens.test.tsfailed because./designTokens.jsdid not exist.src/styles.css, rejects unknown names without reflecting caller input, and emits a DTCG 2025.10 group. Localpnpm exec tsc --noEmitandpnpm exec vitest run --coveragereported 145 files / 833 tests with 100% statements, branches, functions, and lines.Scope
CSS remains runtime presentation authority. Storybook is a development preview. This adds no Figma Variables sync, network, persistence, credential, tenant, model, or durable-audit authority. The interchange snapshot is not complete DTCG conformance or a host WCAG certification.
Integration boundary
Keep Draft/unmerged while #118 owns the exact protected
v0.6.0publication identity. ADR 0027 stays Proposed until protected integration.