Skip to content

feat(mapgen-studio): migrate to Tailwind v4, establish tokenized design system, shadcn scaffolding, and .dark class theming#1604

Closed
mateicanavra wants to merge 3 commits into
design/mapgen-studio-redesignfrom
design/ds-foundation
Closed

feat(mapgen-studio): migrate to Tailwind v4, establish tokenized design system, shadcn scaffolding, and .dark class theming#1604
mateicanavra wants to merge 3 commits into
design/mapgen-studio-redesignfrom
design/ds-foundation

Conversation

@mateicanavra

Copy link
Copy Markdown
Owner

This PR establishes the design system foundation for MapGen Studio (P1 of the redesign workstream), replacing the broken ad-hoc styling infrastructure with a coherent, token-driven system.

Tailwind v4 migration. Removes tailwind.config.js, postcss.config.js, and autoprefixer in favor of Tailwind v4's CSS-first @import "tailwindcss" + @tailwindcss/vite plugin. The existing arbitrary hex utilities across components remain valid in v4 and render unchanged — this is what makes the foundation non-breaking.

Token system. Replaces three disagreeing dark palettes and 242 arbitrary hex utilities with a single set of HSL design tokens in :root (light) and .dark (dark), mapped through @theme inline to Tailwind utilities and shadcn aliases. The token set encodes a felt substrate-elevation tier scale (page → panel → nested → floating) and a border progression (subtle / default / strong) — the primary craft lever identified from the live app, which currently reads as one hollow plane with surfaces only ~4% lightness apart. Legacy --color-* vars referenced by scrollbar, select, and focus styles are re-pointed at the new tokens so nothing breaks.

Design direction. The accent is a committed elevated cool-steel slate (--primary 216 18% 42%), not the previously declared-but-unused indigo. Focus renders as a 1px contour ring using the ring token (a luminance step, not a saturated glow), consistent with the cartographer's instrument aesthetic where the deck.gl map is the only thing that should carry color.

Theming repair. Adopts shadcn's single .dark class strategy with a no-flash inline bootstrap (default dark, localStorage-backed), replacing the prefers-color-scheme coupling and the JIT-invisible createTheme() runtime string interpolation. The legacy lightMode prop path is left in place and removed as components migrate in later slices; both systems coexist without conflict.

shadcn scaffolding. Adds components.json (New York style, CSS vars, slate base) and src/lib/utils.ts exporting cn. Adds @fontsource/inter and @fontsource/jetbrains-mono as self-hosted replacements for the render-blocking Google Fonts @import. Installs tw-animate-css so the previously dead animate-in overlay transitions actually run.

Path aliases. Adds @/*src/* to tsconfig.json for shadcn-compatible imports.

Verified: tsc --noEmit clean, vite build succeeds, worker bundle passes, app renders in dark with no console errors and no regression to existing components.

mateicanavra and others added 3 commits June 12, 2026 05:04
OpenSpec change 'mapgen-studio-design-system' (P1, FIRST domino):
- proposal/tasks/design + mapgen-studio spec deltas (single tokenized design
  system; felt substrate-elevation hierarchy; single .dark theming + contour focus).
- .interface-design/system.md: confirmed direction (cartographer's instrument,
  elevated cool-steel slate, substrate elevation = primary craft lever, dark-first
  + real light). launch.json for live preview.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…+ tokens

Implements OpenSpec change 'mapgen-studio-design-system' (P1, non-breaking foundation):
- Tailwind v3.4 → v4 (CSS-first): @tailwindcss/vite plugin, delete tailwind.config.js
  + postcss.config.js + autoprefixer; src/index.css → @import tailwindcss + tw-animate-css.
- Single tokenized design system: HSL tokens in :root/.dark mapped via @theme inline.
  Cartographer's-instrument direction — graphite substrate, one elevated cool-steel
  slate accent, FELT substrate-elevation tiers (page→panel→floating) + border
  progression (the primary craft lever), contour-luminance focus ring.
- shadcn scaffolding: components.json (new-york, slate, css vars), src/lib/utils.ts (cn),
  @/* alias in tsconfig + vite.
- Theming repair: single .dark class with no-flash pre-paint bootstrap (default dark),
  replacing prefers-color-scheme + JIT-invisible createTheme. Self-hosted Inter +
  JetBrains Mono (@fontsource), removing render-blocking Google Fonts. Real overlay
  motion via tw-animate-css.

Additive: existing components keep their hex utilities and render unchanged; they
adopt tokens in later slices. Verify: tsc clean; vite build + worker-bundle check
pass; live dev renders with no console errors and no regression.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…l ledger

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown

Railway preview (MapGen Studio): not provisioned for this PR.

Policy (Graphite stacks): previews are created only for the top-of-stack PR by default.

  • To force a preview for this PR: add label railway-preview
  • To suppress a preview: add label no-railway-preview

Debug: {"isClosed":true,"isFork":false,"suppress":false,"force":false,"isTopOfStack":false,"hasToken":true,"draft":false}

mateicanavra commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

This was referenced Jun 12, 2026
This was referenced Jun 12, 2026
@mateicanavra
mateicanavra deleted the branch design/mapgen-studio-redesign June 12, 2026 19:34
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