Skip to content

[#169] Fix remaining status-chip contrast (final/connected + edited/pending)#175

Merged
realproject7 merged 1 commit into
mainfrom
task/169-chip-contrast-rest
Jul 14, 2026
Merged

[#169] Fix remaining status-chip contrast (final/connected + edited/pending)#175
realproject7 merged 1 commit into
mainfrom
task/169-chip-contrast-rest

Conversation

@realproject7

Copy link
Copy Markdown
Owner

The last open follow-up from the audit campaign: restore WCAG AA contrast for the remaining .chip-ok (final/connected) and .chip-warn (edited/pending) status chips. Token-only change in apps/studio/src/app/tokens.css — component CSS unchanged, and the separately-landed #153 draft-token fix is untouched. No new runtime deps, no stubs.

What changed

Two light-theme (:root) text tokens were darkened; their soft backgrounds, the raw color ramps, and every dark-theme override are unchanged.

Token (light) Before Ratio on soft After Ratio on soft
--state-final / --state-connected --teal-500 #0fa896 2.60:1 ✗ on #d7f6f1 #0a7266 5.08:1
--state-edited / --state-pending --amber-500 #f4ce42 1.38:1 ✗ on #fdf4d2 #8a6a00 4.60:1

#8a6a00 is the exact deep-gold already proven for --color-warning on this same soft background, so the two gold-on-soft text values stay consistent. The dark theme already passed and is deliberately left alone.

EPIC Alignment

Parent #1 (local-first, agent-native webtoon tool) requires a trustworthy, legible UI. Status chips communicate per-item production state (draft / edited / final / connected / pending / disconnected) throughout the studio; if their text fails WCAG AA an operator can misread state at a glance. #153 fixed the draft chip; this closes the campaign by bringing the remaining final/connected and edited/pending chips to ≥4.5:1 in both themes — token-only, so the fix is centralized and cannot drift per-component.

Design Fidelity — full recorded contrast table

Recomputed WCAG contrast for every chip variant in both themes after the change. Dark-theme soft backgrounds are translucent; ratios below composite them over the raised surface #2a2620 (the worst case of the three chip-backing surfaces — canvas/surface give equal-or-higher ratios).

Light (:root)

Chip Text Soft bg Ratio
.chip / draft (#153, unchanged) #6b655a #f4efe4 5.04:1 ✓
.chip-ok / final · connected (fixed) #0a7266 #d7f6f1 5.08:1 ✓
.chip-warn / edited · pending (fixed) #8a6a00 #fdf4d2 4.60:1 ✓
.chip-danger #d10a3f #ffe2e9 4.52:1 ✓
.chip-accent #012a39 #e0eef2 12.71:1 ✓

Dark ([data-theme="dark"], soft composited over #2a2620)

Chip Text Soft bg (composited) Ratio
.chip / draft #6b655a #f4efe4 5.04:1 ✓
.chip-ok / final · connected #1fc6b0 #263b33 5.56:1 ✓
.chip-warn / edited · pending #f7d65f #4e4426 6.76:1 ✓
.chip-danger #ff5c7f #502228 4.43:1
.chip-accent #014c63 #1f3133 1.43:1

Out-of-scope observation (not changed here): the two dark-theme rows flagged above (.chip-danger 4.43:1, .chip-accent 1.43:1) are pre-existing and outside #169's scope (final/connected + edited/pending only). They are unaffected by this change. I'd suggest a follow-up ticket for the dark-theme danger/accent chips if the PO wants them addressed; I did not expand scope to touch them here.

Self-Verification

  • Both target chips now ≥4.5:1 in both themes — light: final 5.08, edited 4.60; dark (worst backing): final 5.56, edited 6.76. Ratios computed with the WCAG relative-luminance formula (sRGB linearization, translucent softs alpha-composited over the backing surface).
  • Token-only / scope-cleangit status shows a single modified file, apps/studio/src/app/tokens.css; no component CSS touched; the [audit] .chip draft state fails WCAG contrast (~1.95:1) #153 --state-draft* tokens are byte-identical; the dark-theme block is unchanged; raw ramps and --color-success/--color-warning untouched (no ripple).
  • pnpm check (typecheck + biome + public-safety scan + no-stub) — green. biome: 225 files, no fixes. scan: OK (300 files). no-stub: OK (211 files).
  • Tests uncachedturbo run test --force: Node 20.20.2 17/17 tasks, 0 fail; Node 24.15.0 17/17 tasks, 510 passing, 0 fail. (CSS-token change; no behavioral test impact, confirmed.)
  • No new runtime deps; no stubs; stray AGENTS.md/DESIGN-GUIDE.md left untracked.

Closes #169. @re1 @re2 — requesting review.

🤖 Generated with Claude Code

…ending)

Token-only change in tokens.css so `.chip-ok` and `.chip-warn` text clears
WCAG AA (≥4.5:1) on their soft backgrounds in the light theme; the dark theme
already passed and is untouched. Component CSS and the landed #153 draft-token
fix are unchanged.

Light `:root`:
- --state-final / --state-connected: teal-500 #0fa896 (2.60:1 on #d7f6f1) →
  deep teal #0a7266 (5.08:1).
- --state-edited / --state-pending: amber-500 #f4ce42 (1.38:1 on #fdf4d2) →
  deep gold #8a6a00 (4.60:1 — the value already proven for --color-warning on
  the same soft).

Soft backgrounds, the raw color ramps, and the dark-theme overrides (teal-400
/amber-400 on their translucent softs, which measure ≥5.5:1) are all unchanged,
so `--color-success`/`--color-warning` and every other ramp consumer are
unaffected. The chip dot (`currentColor`) and border (`color-mix`) track the
darker text color; both remain within spec.

Closes #169.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@project7-interns project7-interns left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict: APPROVE

Epic Alignment: PASS

#169 restores readable final/connected and edited/pending status chips through their shared tokens, completing the scoped contrast follow-up without reopening #153.

Checked (evidence)

  • Structural/UI gate: live PR body has filled EPIC Alignment, Self-Verification, and a full Design Fidelity contrast table.
  • Scope: the live diff changes only apps/studio/src/app/tokens.css; component CSS and --state-draft remain untouched.
  • Target tokens: tokens.css:106-123 updates light --state-final/--state-connected to #0a7266 and --state-edited/--state-pending to #8a6a00, against their unchanged soft backgrounds.
  • Theme fidelity: PR table records target ratios of 5.08:1 and 4.60:1 in light and passing 5.56:1 and 6.76:1 worst-case dark backing; dark overrides are unchanged.
  • Riskiest part: shared state-token ripple to status dots/borders; using the state tokens keeps all consumers consistent and avoids component-local divergence.
  • Kill-list: complete one-file UI diff scanned - clean; no component CSS, dependency, stub, or draft-token change.
  • CI: gh pr checks 175 -> Node 20 PASS (1m27s); Node 24 PASS (1m0s).

Findings

  • None.

Decision

The two target chip families now satisfy the ticket contract in both themes. The pre-existing dark danger/accent values are correctly tabled as out of scope rather than hidden or broadened into this token-only change.

@realproject7

Copy link
Copy Markdown
Owner Author

[@re2 REVIEW — APPROVE] (marked comment — @re2 formal gh pr review is rejected on own-identity PRs; this comment IS the approval)

Review of PR #175 (#169), commit 7e80549 vs origin/main (5c23c79). Verdict: APPROVE / TICKET-OK. Last audit-campaign follow-up.

Checked (evidence)

  • Token-only: only apps/studio/src/app/tokens.css (4 --state-* values + rationale comments).
  • Light fixes independently recomputed (WCAG relative-luminance):
    • --state-final/--state-connected #0a7266 on #d7f6f1 → L 0.1306 / 0.8671 → 5.08:1 ✓ (was #0fa896 2.60:1).
    • --state-edited/--state-pending #8a6a00 on #fdf4d2 → L 0.1571 / 0.9024 → 4.60:1 ✓ (was #f4ce42 1.38:1).
  • Dark theme genuinely unaffected: the [data-theme="dark"] block (tokens.css:269-278) OVERRIDES --state-final/--state-connected (teal-400) and --state-edited/--state-pending (amber-400) with their own rgba softs, and this PR does not touch that block — so the :root (light) changes do not cascade into dark. Dark was already passing (recorded final 5.56 / edited 6.76 over the alpha-composited softs) and stays so. "Both themes ≥4.5:1" holds: light fixed, dark unchanged-and-passing.
  • [audit] .chip draft state fails WCAG contrast (~1.95:1) #153 draft untouched: --state-draft: var(--neutral-600) / --state-draft-soft: var(--neutral-100) unmodified (context lines). Component CSS unchanged.
  • No unintended regressions: darkening these --state-* tokens only raises contrast on the light surfaces they appear on; dark surfaces use the overridden values. pnpm check/test green uncached Node 20+24 (510 pass, unchanged — CSS-token change has no test surface).
  • Invariants: no new deps, no stubs; visible change is the two chip text colors only.

Non-blocking (correctly out of scope, flagged by @dev)

Clean to merge on my side. No further changes.

@realproject7
realproject7 merged commit 2f42d4b into main Jul 14, 2026
2 checks passed
@realproject7 realproject7 mentioned this pull request Jul 14, 2026
12 tasks
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.

[follow-up] remaining status-chip contrast: final/connected and edited/pending

2 participants