Skip to content

feat(ui): publish editor chrome tokens and Storybook inventory - #360

Closed
cursor[bot] wants to merge 5 commits into
mainfrom
cursor/bc-92338a1b-f9ac-4f8b-9659-b1607ca15713-894c
Closed

feat(ui): publish editor chrome tokens and Storybook inventory#360
cursor[bot] wants to merge 5 commits into
mainfrom
cursor/bc-92338a1b-f9ac-4f8b-9659-b1607ca15713-894c

Conversation

@cursor

@cursor cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown

Problem

Hosts already re-theme Inkspan by overriding --cwl-* custom properties, but the names, light/dark/forced-colors values, and next action lived only inside src/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-editor after checking WCAG 2.2 contrast. Do not edit Inkspan internals. Run pnpm storybook and open Editor Chrome / Toolbar Button States to preview the same objects buyers see.

.cwl-editor {
  --cwl-accent: #0b6e4f;
  --cwl-accent-soft: #d8f3e8;
}
import { listEditorThemeTokens, toDesignTokenFormatGroup } from '@contextualwisdomlab/cwl-editor';

Test-first proof

  • RED: src/designTokens.test.ts failed because ./designTokens.js did not exist.
  • GREEN: the catalog lists the nine shipped tokens, aligns color values with src/styles.css, rejects unknown names without reflecting caller input, and emits a DTCG 2025.10 group. Local pnpm exec tsc --noEmit and pnpm exec vitest run --coverage reported 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.0 publication identity. ADR 0027 stays Proposed until protected integration.

Open in Web View Automation 

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]>
@seonghobae
seonghobae self-requested a review August 16, 2026 15:33

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-editor after WCAG 2.2 contrast) are the right buyer-facing slice. CSS staying runtime authority is correct. Keep this Draft while #118 owns v0.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.

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

Comment thread docs/adr/0027-editor-design-tokens-storybook.md
Comment thread docs/adr/README.md Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Head 89dcc2a still cannot land. The ADR index now points at 0031, but the colliding docs/adr/0027-editor-design-tokens-storybook.md file remains in the tree, and TRACEABILITY/doctoring still cite ADR 0027. Landing this head would republish a second 0027 onto protected main next to #141, #248/#249/#285, and #320.

The catalog also mislabels print-media hexes as forcedColorsValue. In src/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.

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

Comment thread docs/adr/0027-editor-design-tokens-storybook.md
Comment thread docs/TRACEABILITY.md
Comment thread src/designTokens.ts
Comment thread stories/EditorChrome.stories.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

View PR

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

@seonghobae seonghobae closed this Aug 16, 2026
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.

2 participants