Redesign editor UI with dark-first "Graphite" theme#3
Open
lzrscg wants to merge 1 commit into
Open
Conversation
Refresh the cspec editor with a cohesive, dark-first IDE aesthetic
("Graphite") driven by a single CSS custom-property token layer, so one
[data-theme] flip recolors the entire app including the CodeMirror surface.
App (cspec-app):
- Add a full design-token layer (dark default + light) for color,
elevation, typography, radii, spacing, and motion; drive every surface
from it. Status bar now harmonizes with the theme instead of a fixed
dark slab.
- Persistent Sun/Moon theme toggle in the status bar; honors
prefers-color-scheme on first load and persists to localStorage. An
inline script in index.html sets the theme before mount to avoid a
flash. Load Inter for UI chrome.
- Three button tiers (primary Build / tonal Save / ghost Check), a
segmented Source/Hybrid control with a sliding thumb, a path breadcrumb
in the toolbar, a Problems count badge, iconified/color-coded status
segments, and intentional centered empty states.
- Hover/active/focus-visible states and a single motion curve across
sliding indicators, the active file-row rail, dirty-dot pulse, and a
one-shot Save/Check success ring; all animation gated behind
prefers-reduced-motion.
Editor (cspec-editor):
- Replace every hardcoded color in the CodeMirror theme with var(--cm-*)
references (with fallbacks) so the editor adapts to the active theme.
- Two-accent semantics: indigo left-rail for a file's own block headers,
a strictly-semantic cyan rail/label for embed/reference cards.
- Add IDE affordances: line-number gutter, active-line highlight, drawn
selection, and line wrapping. Round the block "S" marker, render the
child/leaf meta as a pill, and add embed hover elevation.
Update the app render test for the new empty-state copy. Build, typecheck,
and all package tests pass; verified light + dark in a headless browser.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refreshes the cspec editor with a cohesive, dark-first IDE aesthetic ("Graphite"), driven by a single CSS custom-property token layer so one
[data-theme]flip recolors the entire app — the CodeMirror surface included. No features or layout regions were removed; this is visual/UX polish plus a first-class dark mode.The direction came out of a multi-agent design pass (audit → competing directions → judge → unified spec); "Graphite" (single indigo accent, strictly-semantic cyan reference rail) won over editorial/paper and two-accent variants, with the best ideas grafted in.
What changed
App (
cspec-app)prefers-color-schemeon first load and persists tolocalStorage. An inline script inindex.htmlsets the theme before mount to avoid a flash. Loads Inter for UI chrome.focus-visiblestates and a single motion curve across sliding indicators, the active file-row rail, dirty-dot pulse, and a one-shot Save/Check success ring — all gated behindprefers-reduced-motion.Editor (
cspec-editor)var(--cm-*)reference (with fallbacks), so the editor adapts to the active theme. Zero hardcoded colors remain outside the token definitions.Test plan
turbo buildpassesturbo check(typecheck) passesturbo testpasses (updated one app render test for the new empty-state copy)Reviewing locally
```sh
npm install && npm run dev # http://127.0.0.1:5173
```
Toggle theme via the Sun/Moon button at the far right of the status bar.
🤖 Generated with Claude Code