Skip to content

feat: replace configurator with conf-v2 redesign, wire to framework - #418

Merged
jackgranatowski merged 6 commits into
mainfrom
claude/configurator-v2-migration-4vp68d
Jun 26, 2026
Merged

feat: replace configurator with conf-v2 redesign, wire to framework#418
jackgranatowski merged 6 commits into
mainfrom
claude/configurator-v2-migration-4vp68d

Conversation

@jackgranatowski

Copy link
Copy Markdown
Contributor

Archives the old configurator to configurator-archive/ and replaces it
with the new Svelte 5 + Tailwind v4 studio redesign from conf-v2.

Framework integration changes:

  • vite.config.js: inject SLASHED_VERSION, base './', fs.allow ['..']
  • src/main.ts: import ../../core/*.css layers for chrome dogfooding
  • src/lib/codec.ts: read token-registry.generated.json (not tokens.json);
    version from SLASHED_VERSION define (not hardcoded string)
  • src/App.svelte: read api-index.generated.json (not tokens.json)
  • src/components/shell/StudioHeader.svelte: version pill uses SLASHED_VERSION
  • src/components/shell/PreviewPanel.svelte: import dist/slashed.full.css?raw
    at build time instead of fetching /slashed.full.css at runtime
  • package.json: slashed-configurator name, sync/predev/prebuild scripts,
    tailwind + svelte 5 + lucide deps, version matches root 0.6.16

All share URL (hash c=…), import/export, undo/redo, theme presets, and
live preview features verified working after build.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_017FGqcDvhJ6HEFpT7WRwqib

claude added 2 commits June 26, 2026 07:14
Archives the old configurator to configurator-archive/ and replaces it
with the new Svelte 5 + Tailwind v4 studio redesign from conf-v2.

Framework integration changes:
- vite.config.js: inject __SLASHED_VERSION__, base './', fs.allow ['..']
- src/main.ts: import ../../core/*.css layers for chrome dogfooding
- src/lib/codec.ts: read token-registry.generated.json (not tokens.json);
  version from __SLASHED_VERSION__ define (not hardcoded string)
- src/App.svelte: read api-index.generated.json (not tokens.json)
- src/components/shell/StudioHeader.svelte: version pill uses __SLASHED_VERSION__
- src/components/shell/PreviewPanel.svelte: import dist/slashed.full.css?raw
  at build time instead of fetching /slashed.full.css at runtime
- package.json: slashed-configurator name, sync/predev/prebuild scripts,
  tailwind + svelte 5 + lucide deps, version matches root 0.6.16

All share URL (hash c=…), import/export, undo/redo, theme presets, and
live preview features verified working after build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017FGqcDvhJ6HEFpT7WRwqib
Rebuilt dist bundles during configurator v2 migration; badge reflects
the updated gzip size of the optimal bundle after rebuild.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017FGqcDvhJ6HEFpT7WRwqib
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 190 files, which is 40 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 07ab56ed-0b75-43ef-ac5b-6e90bf70e04b

📥 Commits

Reviewing files that changed from the base of the PR and between c00216c and e1890e9.

⛔ Files ignored due to path filters (3)
  • configurator-archive/package-lock.json is excluded by !**/package-lock.json
  • configurator/package-lock.json is excluded by !**/package-lock.json
  • dist/badge-optimal.json is excluded by !**/dist/**
📒 Files selected for processing (190)
  • .github/workflows/ci.yml
  • .stylelintrc.json
  • configurator-archive/.gitignore
  • configurator-archive/IA-REDESIGN.md
  • configurator-archive/README.md
  • configurator-archive/ROADMAP.md
  • configurator-archive/index.html
  • configurator-archive/jsconfig.json
  • configurator-archive/package.json
  • configurator-archive/playwright.config.js
  • configurator-archive/scripts/check-curation.mjs
  • configurator-archive/scripts/sync-api.mjs
  • configurator-archive/src/App.svelte
  • configurator-archive/src/components/BrandColorRow.svelte
  • configurator-archive/src/components/BundlePicker.svelte
  • configurator-archive/src/components/CategoryHeader.svelte
  • configurator-archive/src/components/Cheatsheet.svelte
  • configurator-archive/src/components/ColorAssignments.svelte
  • configurator-archive/src/components/ContainerBars.svelte
  • configurator-archive/src/components/ContrastBadge.svelte
  • configurator-archive/src/components/ControlPreview.svelte
  • configurator-archive/src/components/ControlSection.svelte
  • configurator-archive/src/components/DomainPanel.svelte
  • configurator-archive/src/components/DomainPreview.svelte
  • configurator-archive/src/components/FriendlyControl.svelte
  • configurator-archive/src/components/Header.svelte
  • configurator-archive/src/components/HeadingEditor.svelte
  • configurator-archive/src/components/Home.svelte
  • configurator-archive/src/components/Icon.svelte
  • configurator-archive/src/components/OklchPicker.svelte
  • configurator-archive/src/components/OutputPanel.svelte
  • configurator-archive/src/components/Preview.svelte
  • configurator-archive/src/components/QuickKnobs.svelte
  • configurator-archive/src/components/RadiusEditor.svelte
  • configurator-archive/src/components/ScaleGenerator.svelte
  • configurator-archive/src/components/ShadeRamp.svelte
  • configurator-archive/src/components/Sidebar.svelte
  • configurator-archive/src/components/SmartSettings.svelte
  • configurator-archive/src/components/StylePresetRow.svelte
  • configurator-archive/src/components/ThemeGallery.svelte
  • configurator-archive/src/components/TokenEditor.svelte
  • configurator-archive/src/components/TokenGroup.svelte
  • configurator-archive/src/components/TokenRow.svelte
  • configurator-archive/src/components/WcagPanel.svelte
  • configurator-archive/src/components/editors/ColorStudio.svelte
  • configurator-archive/src/components/editors/EffectsStudio.svelte
  • configurator-archive/src/components/editors/LayoutStudio.svelte
  • configurator-archive/src/components/editors/MotionStudio.svelte
  • configurator-archive/src/components/editors/ShadowStudio.svelte
  • configurator-archive/src/components/editors/ShapeStudio.svelte
  • configurator-archive/src/components/editors/SpacingStudio.svelte
  • configurator-archive/src/components/editors/StudioControls.svelte
  • configurator-archive/src/components/editors/StudioFrame.svelte
  • configurator-archive/src/components/editors/TypographyStudio.svelte
  • configurator-archive/src/data/api-index.generated.json
  • configurator-archive/src/data/bundles.generated.json
  • configurator-archive/src/data/token-registry.generated.json
  • configurator-archive/src/lib/basics.js
  • configurator-archive/src/lib/brandColors.js
  • configurator-archive/src/lib/bundles.js
  • configurator-archive/src/lib/clipboard.js
  • configurator-archive/src/lib/codec.js
  • configurator-archive/src/lib/color.js
  • configurator-archive/src/lib/colorRoles.js
  • configurator-archive/src/lib/contrast.js
  • configurator-archive/src/lib/controlSchema.js
  • configurator-archive/src/lib/css.js
  • configurator-archive/src/lib/domainPreviews.js
  • configurator-archive/src/lib/domainSettings.js
  • configurator-archive/src/lib/domains.js
  • configurator-archive/src/lib/fluidEngine.js
  • configurator-archive/src/lib/foldState.js
  • configurator-archive/src/lib/fonts.js
  • configurator-archive/src/lib/historyOps.js
  • configurator-archive/src/lib/icons.js
  • configurator-archive/src/lib/length.js
  • configurator-archive/src/lib/lightdark.js
  • configurator-archive/src/lib/model.js
  • configurator-archive/src/lib/preview.js
  • configurator-archive/src/lib/probeHost.js
  • configurator-archive/src/lib/scale.js
  • configurator-archive/src/lib/share.js
  • configurator-archive/src/lib/store.svelte.js
  • configurator-archive/src/lib/studioSchema.js
  • configurator-archive/src/lib/stylePresets.js
  • configurator-archive/src/lib/themes.js
  • configurator-archive/src/lib/uiState.js
  • configurator-archive/src/main.js
  • configurator-archive/src/styles/app.css
  • configurator-archive/svelte.config.js
  • configurator-archive/tests-components/bundle-picker.test.js
  • configurator-archive/tests-components/domain-preview.test.js
  • configurator-archive/tests-components/icon.test.js
  • configurator-archive/tests-components/setup.js
  • configurator-archive/tests-components/shade-ramp.test.js
  • configurator-archive/tests-components/share-button.test.js
  • configurator-archive/tests-components/studios.test.js
  • configurator-archive/tests-e2e/a11y.spec.js
  • configurator-archive/tests-e2e/axe.spec.js
  • configurator-archive/tests-e2e/dogfood.spec.js
  • configurator-archive/tests-e2e/domain-preview.spec.js
  • configurator-archive/tests-e2e/generator.spec.js
  • configurator-archive/tests-e2e/helpers.js
  • configurator-archive/tests-e2e/import-export.spec.js
  • configurator-archive/tests-e2e/presets.spec.js
  • configurator-archive/tests-e2e/preview.spec.js
  • configurator-archive/tests-e2e/screenshots.spec.js
  • configurator-archive/tests-e2e/share.spec.js
  • configurator-archive/tests-e2e/shell.spec.js
  • configurator-archive/tests-e2e/undo-redo.spec.js
  • configurator-archive/tests/basics.test.js
  • configurator-archive/tests/bundles.test.js
  • configurator-archive/tests/codec.test.js
  • configurator-archive/tests/color.test.js
  • configurator-archive/tests/colorRoles.test.js
  • configurator-archive/tests/contrast.test.js
  • configurator-archive/tests/css.test.js
  • configurator-archive/tests/curation.test.js
  • configurator-archive/tests/dependents.test.js
  • configurator-archive/tests/domain-settings.test.js
  • configurator-archive/tests/domainPreviews.test.js
  • configurator-archive/tests/domains.test.js
  • configurator-archive/tests/fluid-engine.test.js
  • configurator-archive/tests/fonts.test.js
  • configurator-archive/tests/length.test.js
  • configurator-archive/tests/lightdark.test.js
  • configurator-archive/tests/scale.test.js
  • configurator-archive/tests/share.test.js
  • configurator-archive/tests/smoke.test.js
  • configurator-archive/tests/store-history.test.js
  • configurator-archive/tests/studio-schema.test.js
  • configurator-archive/tests/style-presets.test.js
  • configurator-archive/tests/themes.test.js
  • configurator-archive/tests/ui-state.test.js
  • configurator-archive/vite.config.js
  • configurator-archive/vitest.config.js
  • configurator/index.html
  • configurator/package.json
  • configurator/playwright.config.js
  • configurator/scripts/check-curation.mjs
  • configurator/src/App.svelte
  • configurator/src/app.css
  • configurator/src/components/DomainPanel.svelte
  • configurator/src/components/inputs/OklchColorDesk.svelte
  • configurator/src/components/inputs/PowerKnobRow.svelte
  • configurator/src/components/inputs/RangeWithNumber.svelte
  • configurator/src/components/inputs/SliderRow.svelte
  • configurator/src/components/inputs/StylePresetCards.svelte
  • configurator/src/components/inputs/TokenRow.svelte
  • configurator/src/components/panels/AllTokensTab.svelte
  • configurator/src/components/panels/BordersPanel.svelte
  • configurator/src/components/panels/ColorsPanel.svelte
  • configurator/src/components/panels/EffectsPanel.svelte
  • configurator/src/components/panels/ExportPanel.svelte
  • configurator/src/components/panels/GenericTokenPanel.svelte
  • configurator/src/components/panels/HomePanel.svelte
  • configurator/src/components/panels/LayoutPanel.svelte
  • configurator/src/components/panels/MiscPanel.svelte
  • configurator/src/components/panels/MotionPanel.svelte
  • configurator/src/components/panels/ShadowsPanel.svelte
  • configurator/src/components/panels/SpacingPanel.svelte
  • configurator/src/components/panels/ThemesPanel.svelte
  • configurator/src/components/panels/TypographyPanel.svelte
  • configurator/src/components/shell/PreviewPanel.svelte
  • configurator/src/components/shell/SidebarNav.svelte
  • configurator/src/components/shell/StatusBar.svelte
  • configurator/src/components/shell/StudioHeader.svelte
  • configurator/src/lib/basics.ts
  • configurator/src/lib/codec.ts
  • configurator/src/lib/colorUtils.ts
  • configurator/src/lib/domains.ts
  • configurator/src/lib/powerKnobs.ts
  • configurator/src/lib/stylePresets.ts
  • configurator/src/lib/themes.ts
  • configurator/src/main.ts
  • configurator/src/types.ts
  • configurator/src/vite-env.d.ts
  • configurator/svelte.config.js
  • configurator/tests-components/header.test.js
  • configurator/tests-components/setup.js
  • configurator/tests-e2e/helpers.js
  • configurator/tests-e2e/shell.spec.js
  • configurator/tests/codec.test.js
  • configurator/tests/css.test.js
  • configurator/tests/curation.test.js
  • configurator/tests/share.test.js
  • configurator/tests/smoke.test.js
  • configurator/tsconfig.json
  • configurator/vite.config.js
  • configurator/vitest.config.js

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/configurator-v2-migration-4vp68d

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Replace configurator with conf-v2 Svelte 5/Tailwind Studio and framework wiring
✨ Enhancement ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

Description

• Archive the legacy configurator under configurator-archive/ for reference/rollback.
• Replace the app with the new Svelte 5 + Tailwind v4 Studio redesign and new panel shell.
• Wire Studio to framework artifacts (version define, generated indexes, dist CSS in preview).
Diagram

graph TD
  Vite["configurator/vite.config.js"] --> Ver["__SLASHED_VERSION__"] --> App["src/App.svelte"] --> Preview["PreviewPanel"] --> CSS["dist/slashed.full.css"]
  App --> Data[("generated JSON")]
  App --> Codec["src/lib/codec.ts"] --> Hash["#c= share code"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep both UIs (old + new) behind a build flag
  • ➕ Safer rollout with quick fallback
  • ➕ Enables side-by-side comparison during migration
  • ➖ Doubles maintenance burden
  • ➖ Risk of divergent data/preview wiring over time
2. Runtime-load framework CSS for preview (fetch)
  • ➕ Smaller JS bundle (no inlined CSS string)
  • ➕ Can preview different CSS builds without rebuilding Studio
  • ➖ More runtime failure modes (paths/CORS/offline)
  • ➖ Harder to guarantee preview matches the shipped dist artifact
3. Use querystring JSON (compressed) instead of token-id registry share code
  • ➕ Easier to evolve schema and include non-token state
  • ➕ More debuggable payload semantics
  • ➖ Longer URLs and more brittleness
  • ➖ Harder to keep stable/compact across versions

Recommendation: For a full redesign, archiving the old configurator and fully switching to the new Studio is a reasonable simplification; just ensure the archive remains buildable if you intend it as rollback. Inlining dist/slashed.full.css into the preview at build time is a good choice for determinism and offline-friendly builds; runtime fetch is a viable alternative only if bundle size becomes a primary concern.

Files changed (173) +8832 / -880

Enhancement (33) +4396 / -801
App.svelteReplace legacy configurator shell with Studio app wiring +242/-419

Replace legacy configurator shell with Studio app wiring

• Replaces the previous multi-pane legacy shell with the new Studio structure and state model, including URL-hash share sync and persistence.

configurator/src/App.svelte

app.cssAdd/adjust Studio app stylesheet entry +1/-0

Add/adjust Studio app stylesheet entry

• Adds the app-level CSS entry used by the new Studio UI.

configurator/src/app.css

DomainPanel.svelteNew domain panel router for Studio sections +143/-382

New domain panel router for Studio sections

• Implements the new domain/panel switching layer used by the Studio to render token panels and tool tabs.

configurator/src/components/DomainPanel.svelte

OklchColorDesk.svelteAdd OKLCH color editor control surface +167/-0

Add OKLCH color editor control surface

• Introduces an OKLCH-centric color editing component used by the Colors panel.

configurator/src/components/inputs/OklchColorDesk.svelte

PowerKnobRow.svelteAdd reusable power-knob row component +57/-0

Add reusable power-knob row component

• Adds a shared row control for numeric “knob” token adjustments.

configurator/src/components/inputs/PowerKnobRow.svelte

RangeWithNumber.svelteAdd slider + numeric input primitive +56/-0

Add slider + numeric input primitive

• Adds a shared input combining a range slider with a number field for precision edits.

configurator/src/components/inputs/RangeWithNumber.svelte

SliderRow.svelteAdd standardized slider row UI +34/-0

Add standardized slider row UI

• Adds a shared slider row component to edit numeric token values with consistent styling.

configurator/src/components/inputs/SliderRow.svelte

StylePresetCards.svelteAdd style preset card selector +46/-0

Add style preset card selector

• Adds a UI component to preview/apply preset patches via a card layout.

configurator/src/components/inputs/StylePresetCards.svelte

TokenRow.svelteAdd generic token editing row +86/-0

Add generic token editing row

• Adds a reusable token row component used by multiple panels for direct variable editing and reset behavior.

configurator/src/components/inputs/TokenRow.svelte

AllTokensTab.svelteAdd all-tokens tab for bulk discovery/editing +133/-0

Add all-tokens tab for bulk discovery/editing

• Adds an all-tokens view for searching/filtering and editing across the full token set.

configurator/src/components/panels/AllTokensTab.svelte

BordersPanel.svelteAdd borders/radius panel +222/-0

Add borders/radius panel

• Introduces the Borders panel for editing border-related tokens in the new Studio UI.

configurator/src/components/panels/BordersPanel.svelte

ColorsPanel.svelteAdd OKLCH-based colors panel +301/-0

Add OKLCH-based colors panel

• Introduces the Colors panel with brand/status source editing and related token controls.

configurator/src/components/panels/ColorsPanel.svelte

EffectsPanel.svelteAdd effects panel +132/-0

Add effects panel

• Introduces the Effects panel for editing effect-related tokens (e.g., blur/opacity/filter primitives).

configurator/src/components/panels/EffectsPanel.svelte

ExportPanel.svelteAdd import/export overrides panel +93/-0

Add import/export overrides panel

• Adds the Export panel for generating override CSS and importing existing overrides back into state.

configurator/src/components/panels/ExportPanel.svelte

HomePanel.svelteAdd Studio home panel +103/-0

Add Studio home panel

• Adds the new landing/home panel for the Studio navigation model.

configurator/src/components/panels/HomePanel.svelte

LayoutPanel.svelteAdd layout panel +166/-0

Add layout panel

• Introduces the Layout panel for editing layout-related tokens under the new Studio UI.

configurator/src/components/panels/LayoutPanel.svelte

MiscPanel.svelteAdd misc panel +176/-0

Add misc panel

• Introduces a Misc panel for tokens that don’t fit other dedicated sections.

configurator/src/components/panels/MiscPanel.svelte

MotionPanel.svelteAdd motion panel +197/-0

Add motion panel

• Introduces the Motion panel for editing motion/duration/easing-related tokens and knobs.

configurator/src/components/panels/MotionPanel.svelte

ShadowsPanel.svelteAdd shadows panel +87/-0

Add shadows panel

• Introduces the Shadows panel for editing shadow-related tokens in the new Studio UI.

configurator/src/components/panels/ShadowsPanel.svelte

SpacingPanel.svelteAdd spacing panel +167/-0

Add spacing panel

• Introduces the Spacing panel for editing spacing and section tokens under the new Studio UI.

configurator/src/components/panels/SpacingPanel.svelte

ThemesPanel.svelteAdd themes panel/tooling +71/-0

Add themes panel/tooling

• Introduces themes tooling for applying presets and managing theme-related override sets.

configurator/src/components/panels/ThemesPanel.svelte

TypographyPanel.svelteAdd typography panel +442/-0

Add typography panel

• Introduces the Typography panel for editing font and text tokens under the new Studio UI.

configurator/src/components/panels/TypographyPanel.svelte

PreviewPanel.svelteAdd iframe preview panel with build-time framework CSS import +367/-0

Add iframe preview panel with build-time framework CSS import

• Implements live preview as an iframe and imports dist/slashed.full.css via ?raw at build time so preview always matches dist. Adds controls for theme/width/motion/template.

configurator/src/components/shell/PreviewPanel.svelte

SidebarNav.svelteAdd icon rail navigation with per-domain badges +88/-0

Add icon rail navigation with per-domain badges

• Adds the Studio sidebar navigation rail with lucide icons and override-count badges.

configurator/src/components/shell/SidebarNav.svelte

StatusBar.svelteAdd bottom status bar for live/override state +22/-0

Add bottom status bar for live/override state

• Adds a compact status bar showing live state, override count, and active domain label.

configurator/src/components/shell/StatusBar.svelte

StudioHeader.svelteAdd Studio header with version stamp and actions +109/-0

Add Studio header with version stamp and actions

• Adds the redesigned header chrome, including version pill using __SLASHED_VERSION__ and controls for share/import/export/reset/undo/redo.

configurator/src/components/shell/StudioHeader.svelte

basics.tsAdd basic group definitions for Studio panels +99/-0

Add basic group definitions for Studio panels

• Introduces basic control/group metadata used by panels to render curated token controls.

configurator/src/lib/basics.ts

codec.tsAdd share-code codec and CSS import/export helpers (v2) +249/-0

Add share-code codec and CSS import/export helpers (v2)

• Adds encoding/decoding for compact #c= share codes backed by token-registry.generated.json, plus helpers to parse and emit override CSS and to stamp output with __SLASHED_VERSION__.

configurator/src/lib/codec.ts

colorUtils.tsAdd shared color utilities for OKLCH workflows +103/-0

Add shared color utilities for OKLCH workflows

• Introduces color parsing/formatting utilities used by the color editor and colors panel.

configurator/src/lib/colorUtils.ts

powerKnobs.tsAdd power knob catalog for domain panels +81/-0

Add power knob catalog for domain panels

• Adds the definitions and helpers for “power knob” controls used in multiple token domains.

configurator/src/lib/powerKnobs.ts

stylePresets.tsAdd style preset patch definitions +17/-0

Add style preset patch definitions

• Introduces preset patches to apply coordinated token changes in panels.

configurator/src/lib/stylePresets.ts

themes.tsAdd theme presets and helpers +120/-0

Add theme presets and helpers

• Adds theme preset definitions and helpers for applying theme-level overrides within the Studio.

configurator/src/lib/themes.ts

main.tsSwitch to TS entrypoint and import framework CSS layers for dogfooding +19/-0

Switch to TS entrypoint and import framework CSS layers for dogfooding

• Mounts the Svelte App and imports core token/theme CSS layers so the Studio chrome is styled by the framework it edits.

configurator/src/main.ts

Refactor (2) +175 / -0
GenericTokenPanel.svelteAdd reusable generic token panel layout +67/-0

Add reusable generic token panel layout

• Adds a shared panel layout for rendering grouped tokens with consistent edit/reset/bulk-change wiring.

configurator/src/components/panels/GenericTokenPanel.svelte

types.tsAdd TypeScript types for tokens and Studio state +108/-0

Add TypeScript types for tokens and Studio state

• Adds shared TS types for tokens, presets, history, and preview configuration across the new Studio components.

configurator/src/types.ts

Other (138) +4261 / -79
IA-REDESIGN.mdArchive legacy IA redesign doc +0/-0

Archive legacy IA redesign doc

• Adds an archived copy of the legacy configurator IA/redesign notes under configurator-archive/.

configurator-archive/IA-REDESIGN.md

README.mdArchive legacy configurator README +0/-0

Archive legacy configurator README

• Adds an archived copy of the legacy configurator README under configurator-archive/.

configurator-archive/README.md

ROADMAP.mdArchive legacy configurator roadmap +0/-0

Archive legacy configurator roadmap

• Adds an archived copy of the legacy configurator roadmap under configurator-archive/.

configurator-archive/ROADMAP.md

index.htmlArchive legacy configurator HTML entrypoint +38/-0

Archive legacy configurator HTML entrypoint

• Adds the legacy configurator index.html under configurator-archive/ to preserve the previous SPA entry metadata and bootstrap.

configurator-archive/index.html

jsconfig.jsonArchive legacy JS config +0/-0

Archive legacy JS config

• Adds the legacy jsconfig.json under configurator-archive/ for the archived build environment.

configurator-archive/jsconfig.json

package.jsonArchive legacy package manifest and scripts +34/-0

Archive legacy package manifest and scripts

• Adds the legacy configurator package.json including its scripts and devDependencies for the archived app.

configurator-archive/package.json

playwright.config.jsArchive legacy Playwright config +0/-0

Archive legacy Playwright config

• Adds the legacy Playwright configuration under configurator-archive/ as part of preserving the prior test setup.

configurator-archive/playwright.config.js

check-curation.mjsArchive legacy curation check script +74/-0

Archive legacy curation check script

• Adds the prior curation validation script into configurator-archive/scripts/ for reference and potential reuse.

configurator-archive/scripts/check-curation.mjs

sync-api.mjsArchive legacy API sync script +316/-0

Archive legacy API sync script

• Adds the previous API sync pipeline (generating local token metadata) under configurator-archive/scripts/.

configurator-archive/scripts/sync-api.mjs

App.svelteArchive legacy Svelte App implementation +452/-0

Archive legacy Svelte App implementation

• Adds the previous App.svelte into configurator-archive/src/ to preserve legacy shell/state/behavior.

configurator-archive/src/App.svelte

BrandColorRow.svelteArchive legacy component: BrandColorRow +0/-0

Archive legacy component: BrandColorRow

• Adds the legacy BrandColorRow.svelte under configurator-archive/src/components/.

configurator-archive/src/components/BrandColorRow.svelte

BundlePicker.svelteArchive legacy component: BundlePicker +0/-0

Archive legacy component: BundlePicker

• Adds the legacy BundlePicker.svelte under configurator-archive/src/components/.

configurator-archive/src/components/BundlePicker.svelte

CategoryHeader.svelteArchive legacy component: CategoryHeader +0/-0

Archive legacy component: CategoryHeader

• Adds the legacy CategoryHeader.svelte under configurator-archive/src/components/.

configurator-archive/src/components/CategoryHeader.svelte

Cheatsheet.svelteArchive legacy component: Cheatsheet +0/-0

Archive legacy component: Cheatsheet

• Adds the legacy Cheatsheet.svelte under configurator-archive/src/components/.

configurator-archive/src/components/Cheatsheet.svelte

ColorAssignments.svelteArchive legacy component: ColorAssignments +0/-0

Archive legacy component: ColorAssignments

• Adds the legacy ColorAssignments.svelte under configurator-archive/src/components/.

configurator-archive/src/components/ColorAssignments.svelte

ContainerBars.svelteArchive legacy component: ContainerBars +0/-0

Archive legacy component: ContainerBars

• Adds the legacy ContainerBars.svelte under configurator-archive/src/components/.

configurator-archive/src/components/ContainerBars.svelte

ContrastBadge.svelteArchive legacy component: ContrastBadge +0/-0

Archive legacy component: ContrastBadge

• Adds the legacy ContrastBadge.svelte under configurator-archive/src/components/.

configurator-archive/src/components/ContrastBadge.svelte

ControlPreview.svelteArchive legacy component: ControlPreview +0/-0

Archive legacy component: ControlPreview

• Adds the legacy ControlPreview.svelte under configurator-archive/src/components/.

configurator-archive/src/components/ControlPreview.svelte

ControlSection.svelteArchive legacy component: ControlSection +0/-0

Archive legacy component: ControlSection

• Adds the legacy ControlSection.svelte under configurator-archive/src/components/.

configurator-archive/src/components/ControlSection.svelte

DomainPanel.svelteArchive legacy component: DomainPanel +399/-0

Archive legacy component: DomainPanel

• Adds the legacy DomainPanel.svelte under configurator-archive/src/components/ to preserve the prior domain editing UI.

configurator-archive/src/components/DomainPanel.svelte

DomainPreview.svelteArchive legacy component: DomainPreview +0/-0

Archive legacy component: DomainPreview

• Adds the legacy DomainPreview.svelte under configurator-archive/src/components/.

configurator-archive/src/components/DomainPreview.svelte

FriendlyControl.svelteArchive legacy component: FriendlyControl +0/-0

Archive legacy component: FriendlyControl

• Adds the legacy FriendlyControl.svelte under configurator-archive/src/components/.

configurator-archive/src/components/FriendlyControl.svelte

Header.svelteArchive legacy component: Header +0/-0

Archive legacy component: Header

• Adds the legacy Header.svelte under configurator-archive/src/components/.

configurator-archive/src/components/Header.svelte

HeadingEditor.svelteArchive legacy component: HeadingEditor +0/-0

Archive legacy component: HeadingEditor

• Adds the legacy HeadingEditor.svelte under configurator-archive/src/components/.

configurator-archive/src/components/HeadingEditor.svelte

Home.svelteArchive legacy component: Home +0/-0

Archive legacy component: Home

• Adds the legacy Home.svelte under configurator-archive/src/components/.

configurator-archive/src/components/Home.svelte

Icon.svelteArchive legacy component: Icon +0/-0

Archive legacy component: Icon

• Adds the legacy Icon.svelte under configurator-archive/src/components/.

configurator-archive/src/components/Icon.svelte

OklchPicker.svelteArchive legacy component: OklchPicker +0/-0

Archive legacy component: OklchPicker

• Adds the legacy OklchPicker.svelte under configurator-archive/src/components/.

configurator-archive/src/components/OklchPicker.svelte

OutputPanel.svelteArchive legacy component: OutputPanel +0/-0

Archive legacy component: OutputPanel

• Adds the legacy OutputPanel.svelte under configurator-archive/src/components/.

configurator-archive/src/components/OutputPanel.svelte

Preview.svelteArchive legacy component: Preview +0/-0

Archive legacy component: Preview

• Adds the legacy Preview.svelte under configurator-archive/src/components/.

configurator-archive/src/components/Preview.svelte

QuickKnobs.svelteArchive legacy component: QuickKnobs +0/-0

Archive legacy component: QuickKnobs

• Adds the legacy QuickKnobs.svelte under configurator-archive/src/components/.

configurator-archive/src/components/QuickKnobs.svelte

RadiusEditor.svelteArchive legacy component: RadiusEditor +0/-0

Archive legacy component: RadiusEditor

• Adds the legacy RadiusEditor.svelte under configurator-archive/src/components/.

configurator-archive/src/components/RadiusEditor.svelte

ScaleGenerator.svelteArchive legacy component: ScaleGenerator +0/-0

Archive legacy component: ScaleGenerator

• Adds the legacy ScaleGenerator.svelte under configurator-archive/src/components/.

configurator-archive/src/components/ScaleGenerator.svelte

ShadeRamp.svelteArchive legacy component: ShadeRamp +0/-0

Archive legacy component: ShadeRamp

• Adds the legacy ShadeRamp.svelte under configurator-archive/src/components/.

configurator-archive/src/components/ShadeRamp.svelte

Sidebar.svelteArchive legacy component: Sidebar +0/-0

Archive legacy component: Sidebar

• Adds the legacy Sidebar.svelte under configurator-archive/src/components/.

configurator-archive/src/components/Sidebar.svelte

SmartSettings.svelteArchive legacy component: SmartSettings +0/-0

Archive legacy component: SmartSettings

• Adds the legacy SmartSettings.svelte under configurator-archive/src/components/.

configurator-archive/src/components/SmartSettings.svelte

StylePresetRow.svelteArchive legacy component: StylePresetRow +0/-0

Archive legacy component: StylePresetRow

• Adds the legacy StylePresetRow.svelte under configurator-archive/src/components/.

configurator-archive/src/components/StylePresetRow.svelte

ThemeGallery.svelteArchive legacy component: ThemeGallery +0/-0

Archive legacy component: ThemeGallery

• Adds the legacy ThemeGallery.svelte under configurator-archive/src/components/.

configurator-archive/src/components/ThemeGallery.svelte

TokenEditor.svelteArchive legacy component: TokenEditor +0/-0

Archive legacy component: TokenEditor

• Adds the legacy TokenEditor.svelte under configurator-archive/src/components/.

configurator-archive/src/components/TokenEditor.svelte

TokenGroup.svelteArchive legacy component: TokenGroup +0/-0

Archive legacy component: TokenGroup

• Adds the legacy TokenGroup.svelte under configurator-archive/src/components/.

configurator-archive/src/components/TokenGroup.svelte

TokenRow.svelteArchive legacy component: TokenRow +0/-0

Archive legacy component: TokenRow

• Adds the legacy TokenRow.svelte under configurator-archive/src/components/.

configurator-archive/src/components/TokenRow.svelte

WcagPanel.svelteArchive legacy component: WcagPanel +0/-0

Archive legacy component: WcagPanel

• Adds the legacy WcagPanel.svelte under configurator-archive/src/components/.

configurator-archive/src/components/WcagPanel.svelte

ColorStudio.svelteArchive legacy editor: ColorStudio +0/-0

Archive legacy editor: ColorStudio

• Adds the legacy ColorStudio.svelte under configurator-archive/src/components/editors/.

configurator-archive/src/components/editors/ColorStudio.svelte

EffectsStudio.svelteArchive legacy editor: EffectsStudio +0/-0

Archive legacy editor: EffectsStudio

• Adds the legacy EffectsStudio.svelte under configurator-archive/src/components/editors/.

configurator-archive/src/components/editors/EffectsStudio.svelte

LayoutStudio.svelteArchive legacy editor: LayoutStudio +0/-0

Archive legacy editor: LayoutStudio

• Adds the legacy LayoutStudio.svelte under configurator-archive/src/components/editors/.

configurator-archive/src/components/editors/LayoutStudio.svelte

MotionStudio.svelteArchive legacy editor: MotionStudio +0/-0

Archive legacy editor: MotionStudio

• Adds the legacy MotionStudio.svelte under configurator-archive/src/components/editors/.

configurator-archive/src/components/editors/MotionStudio.svelte

ShadowStudio.svelteArchive legacy editor: ShadowStudio +0/-0

Archive legacy editor: ShadowStudio

• Adds the legacy ShadowStudio.svelte under configurator-archive/src/components/editors/.

configurator-archive/src/components/editors/ShadowStudio.svelte

ShapeStudio.svelteArchive legacy editor: ShapeStudio +0/-0

Archive legacy editor: ShapeStudio

• Adds the legacy ShapeStudio.svelte under configurator-archive/src/components/editors/.

configurator-archive/src/components/editors/ShapeStudio.svelte

SpacingStudio.svelteArchive legacy editor: SpacingStudio +0/-0

Archive legacy editor: SpacingStudio

• Adds the legacy SpacingStudio.svelte under configurator-archive/src/components/editors/.

configurator-archive/src/components/editors/SpacingStudio.svelte

StudioControls.svelteArchive legacy editor: StudioControls +0/-0

Archive legacy editor: StudioControls

• Adds the legacy StudioControls.svelte under configurator-archive/src/components/editors/.

configurator-archive/src/components/editors/StudioControls.svelte

StudioFrame.svelteArchive legacy editor: StudioFrame +0/-0

Archive legacy editor: StudioFrame

• Adds the legacy StudioFrame.svelte under configurator-archive/src/components/editors/.

configurator-archive/src/components/editors/StudioFrame.svelte

TypographyStudio.svelteArchive legacy editor: TypographyStudio +0/-0

Archive legacy editor: TypographyStudio

• Adds the legacy TypographyStudio.svelte under configurator-archive/src/components/editors/.

configurator-archive/src/components/editors/TypographyStudio.svelte

bundles.generated.jsonArchive legacy generated bundle list +55/-0

Archive legacy generated bundle list

• Adds the legacy bundles.generated.json snapshot used by the prior configurator build.

configurator-archive/src/data/bundles.generated.json

token-registry.generated.jsonArchive legacy generated token registry +2787/-0

Archive legacy generated token registry

• Adds the legacy token-registry.generated.json snapshot used by the prior configurator share/export logic.

configurator-archive/src/data/token-registry.generated.json

basics.jsArchive legacy lib: basics +0/-0

Archive legacy lib: basics

• Adds the legacy basics.js helper module under configurator-archive/src/lib/.

configurator-archive/src/lib/basics.js

brandColors.jsArchive legacy lib: brandColors +0/-0

Archive legacy lib: brandColors

• Adds the legacy brandColors.js helper module under configurator-archive/src/lib/.

configurator-archive/src/lib/brandColors.js

bundles.jsArchive legacy lib: bundles +0/-0

Archive legacy lib: bundles

• Adds the legacy bundles.js helper module under configurator-archive/src/lib/.

configurator-archive/src/lib/bundles.js

clipboard.jsArchive legacy lib: clipboard +0/-0

Archive legacy lib: clipboard

• Adds the legacy clipboard.js helper module under configurator-archive/src/lib/.

configurator-archive/src/lib/clipboard.js

codec.jsArchive legacy lib: codec +0/-0

Archive legacy lib: codec

• Adds the legacy codec.js module under configurator-archive/src/lib/ preserving the prior share/export implementation.

configurator-archive/src/lib/codec.js

color.jsArchive legacy lib: color +0/-0

Archive legacy lib: color

• Adds the legacy color.js helper module under configurator-archive/src/lib/.

configurator-archive/src/lib/color.js

colorRoles.jsArchive legacy lib: colorRoles +0/-0

Archive legacy lib: colorRoles

• Adds the legacy colorRoles.js helper module under configurator-archive/src/lib/.

configurator-archive/src/lib/colorRoles.js

contrast.jsArchive legacy lib: contrast +0/-0

Archive legacy lib: contrast

• Adds the legacy contrast.js helper module under configurator-archive/src/lib/.

configurator-archive/src/lib/contrast.js

controlSchema.jsArchive legacy lib: controlSchema +0/-0

Archive legacy lib: controlSchema

• Adds the legacy controlSchema.js helper module under configurator-archive/src/lib/.

configurator-archive/src/lib/controlSchema.js

css.jsArchive legacy lib: css +0/-0

Archive legacy lib: css

• Adds the legacy css.js helper module under configurator-archive/src/lib/.

configurator-archive/src/lib/css.js

domainPreviews.jsArchive legacy lib: domainPreviews +0/-0

Archive legacy lib: domainPreviews

• Adds the legacy domainPreviews.js helper module under configurator-archive/src/lib/.

configurator-archive/src/lib/domainPreviews.js

domainSettings.jsArchive legacy lib: domainSettings +0/-0

Archive legacy lib: domainSettings

• Adds the legacy domainSettings.js helper module under configurator-archive/src/lib/.

configurator-archive/src/lib/domainSettings.js

domains.jsArchive legacy lib: domains +0/-0

Archive legacy lib: domains

• Adds the legacy domains.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/domains.js

fluidEngine.jsArchive legacy lib: fluidEngine +0/-0

Archive legacy lib: fluidEngine

• Adds the legacy fluidEngine.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/fluidEngine.js

foldState.jsArchive legacy lib: foldState +0/-0

Archive legacy lib: foldState

• Adds the legacy foldState.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/foldState.js

fonts.jsArchive legacy lib: fonts +0/-0

Archive legacy lib: fonts

• Adds the legacy fonts.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/fonts.js

historyOps.jsArchive legacy lib: historyOps +0/-0

Archive legacy lib: historyOps

• Adds the legacy historyOps.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/historyOps.js

icons.jsArchive legacy lib: icons +0/-0

Archive legacy lib: icons

• Adds the legacy icons.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/icons.js

length.jsArchive legacy lib: length +0/-0

Archive legacy lib: length

• Adds the legacy length.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/length.js

lightdark.jsArchive legacy lib: lightdark +0/-0

Archive legacy lib: lightdark

• Adds the legacy lightdark.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/lightdark.js

model.jsArchive legacy lib: model +0/-0

Archive legacy lib: model

• Adds the legacy model.js module under configurator-archive/src/lib/ (token grouping/search/etc).

configurator-archive/src/lib/model.js

preview.jsArchive legacy lib: preview +0/-0

Archive legacy lib: preview

• Adds the legacy preview.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/preview.js

probeHost.jsArchive legacy lib: probeHost +0/-0

Archive legacy lib: probeHost

• Adds the legacy probeHost.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/probeHost.js

scale.jsArchive legacy lib: scale +0/-0

Archive legacy lib: scale

• Adds the legacy scale.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/scale.js

share.jsArchive legacy lib: share +0/-0

Archive legacy lib: share

• Adds the legacy share.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/share.js

store.svelte.jsArchive legacy lib: store.svelte +0/-0

Archive legacy lib: store.svelte

• Adds the legacy Svelte store module under configurator-archive/src/lib/ that powered the prior app state.

configurator-archive/src/lib/store.svelte.js

studioSchema.jsArchive legacy lib: studioSchema +0/-0

Archive legacy lib: studioSchema

• Adds the legacy studioSchema.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/studioSchema.js

stylePresets.jsArchive legacy lib: stylePresets +0/-0

Archive legacy lib: stylePresets

• Adds the legacy stylePresets.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/stylePresets.js

themes.jsArchive legacy lib: themes +0/-0

Archive legacy lib: themes

• Adds the legacy themes.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/themes.js

uiState.jsArchive legacy lib: uiState +0/-0

Archive legacy lib: uiState

• Adds the legacy uiState.js module under configurator-archive/src/lib/.

configurator-archive/src/lib/uiState.js

main.jsArchive legacy main entrypoint +0/-0

Archive legacy main entrypoint

• Adds the legacy main.js entrypoint under configurator-archive/src/.

configurator-archive/src/main.js

app.cssArchive legacy app styles +0/-0

Archive legacy app styles

• Adds the legacy app.css stylesheet under configurator-archive/src/styles/.

configurator-archive/src/styles/app.css

svelte.config.jsArchive legacy svelte.config.js +9/-0

Archive legacy svelte.config.js

• Adds the legacy svelte.config.js under configurator-archive/.

configurator-archive/svelte.config.js

bundle-picker.test.jsArchive legacy component test: bundle-picker +0/-0

Archive legacy component test: bundle-picker

• Adds the legacy component test under configurator-archive/tests-components/.

configurator-archive/tests-components/bundle-picker.test.js

domain-preview.test.jsArchive legacy component test: domain-preview +0/-0

Archive legacy component test: domain-preview

• Adds the legacy component test under configurator-archive/tests-components/.

configurator-archive/tests-components/domain-preview.test.js

icon.test.jsArchive legacy component test: icon +0/-0

Archive legacy component test: icon

• Adds the legacy component test under configurator-archive/tests-components/.

configurator-archive/tests-components/icon.test.js

setup.jsArchive legacy test setup +0/-0

Archive legacy test setup

• Adds the legacy test setup file under configurator-archive/tests-components/.

configurator-archive/tests-components/setup.js

shade-ramp.test.jsArchive legacy component test: shade-ramp +0/-0

Archive legacy component test: shade-ramp

• Adds the legacy component test under configurator-archive/tests-components/.

configurator-archive/tests-components/shade-ramp.test.js

share-button.test.jsArchive legacy component test: share-button +0/-0

Archive legacy component test: share-button

• Adds the legacy component test under configurator-archive/tests-components/.

configurator-archive/tests-components/share-button.test.js

studios.test.jsArchive legacy component test: studios +0/-0

Archive legacy component test: studios

• Adds the legacy component test under configurator-archive/tests-components/.

configurator-archive/tests-components/studios.test.js

a11y.spec.jsArchive legacy e2e: a11y +0/-0

Archive legacy e2e: a11y

• Adds the legacy Playwright spec under configurator-archive/tests-e2e/.

configurator-archive/tests-e2e/a11y.spec.js

axe.spec.jsArchive legacy e2e: axe +0/-0

Archive legacy e2e: axe

• Adds the legacy Playwright spec under configurator-archive/tests-e2e/.

configurator-archive/tests-e2e/axe.spec.js

dogfood.spec.jsArchive legacy e2e: dogfood +0/-0

Archive legacy e2e: dogfood

• Adds the legacy Playwright spec under configurator-archive/tests-e2e/.

configurator-archive/tests-e2e/dogfood.spec.js

domain-preview.spec.jsArchive legacy e2e: domain-preview +0/-0

Archive legacy e2e: domain-preview

• Adds the legacy Playwright spec under configurator-archive/tests-e2e/.

configurator-archive/tests-e2e/domain-preview.spec.js

generator.spec.jsArchive legacy e2e: generator +0/-0

Archive legacy e2e: generator

• Adds the legacy Playwright spec under configurator-archive/tests-e2e/.

configurator-archive/tests-e2e/generator.spec.js

</...

@qodo-code-review

qodo-code-review Bot commented Jun 26, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (6) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 5 rules

Grey Divider


Action required

1. Nested :root CSS 🐞 Bug ≡ Correctness
Description
codec.fa({mode:"root"}) already returns a complete :root { ... } block, but both App and
PreviewPanel wrap it again, generating invalid CSS like :root { :root { ... } } so overrides may
not apply. This breaks both the parent-document override injection and the iframe preview override
updates.
Code

configurator/src/App.svelte[R78-84]

+    let styleEl = document.getElementById("sf-parent-overrides");
+    if (!styleEl) {
+      styleEl = document.createElement("style");
+      styleEl.id = "sf-parent-overrides";
+      document.head.appendChild(styleEl);
+    }
+    styleEl.textContent = `:root {\n${fa(_ov, { mode: "root", banner: false })}\n}`;
Relevance

⭐⭐ Medium

No historical evidence on fa(mode:"root") wrapping/nested :root expectations in this repo.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
fa(..., {mode:"root"}) returns a complete :root { ... } rule, but App and PreviewPanel each wrap
that returned string inside another :root { ... }, creating invalid nested :root blocks.

configurator/src/lib/codec.ts[161-178]
configurator/src/App.svelte[69-85]
configurator/src/components/shell/PreviewPanel.svelte[165-243]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`codec.fa(..., { mode: "root" })` returns a full `:root { ... }` rule, but callers wrap it in another `:root { ... }`, producing invalid CSS and preventing overrides from applying.

### Issue Context
This happens in both the parent document style injection (`sf-parent-overrides`) and the preview iframe (`slashed-overrides`).

### Fix Focus Areas
- configurator/src/App.svelte[69-85]
- configurator/src/components/shell/PreviewPanel.svelte[165-243]
- configurator/src/lib/codec.ts[161-178]

### Suggested fix
- In `App.svelte`, set `styleEl.textContent` to the output of `fa(_ov, { mode: "root", banner: false })` directly (no additional wrapper).
- In `PreviewPanel.svelte`, in both `buildIframeHTML()` and the `$effect` that updates `slashed-overrides`, write the `fa(..., { mode: "root" })` output directly into the style element (or alternatively switch `fa` to `mode:"layer"` and adjust surrounding CSS accordingly).
- Add a quick assertion/unit check (optional) that the generated style text does not contain `:root` twice at the top-level.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Missing dist CSS import 🐞 Bug ☼ Reliability
Description
PreviewPanel build-imports ../../../../dist/slashed.full.css?raw, but dist/*.css is explicitly
gitignored and not generated by the configurator’s predev/prebuild scripts, so Vite can fail to
start/build on a clean checkout. This turns the studio into an order-dependent build that breaks
when dist/ hasn’t been generated yet.
Code

configurator/src/components/shell/PreviewPanel.svelte[R4-6]

+  import { fa } from '../../lib/codec';
+  // Import the built framework CSS at Vite compile time — always in sync with dist.
+  import frameworkCSSStatic from '../../../../dist/slashed.full.css?raw';
Relevance

⭐⭐ Medium

No prior evidence about build-time importing gitignored/generated dist CSS and clean-checkout Vite
behavior.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PreviewPanel requires a build-time module import of a dist CSS file, but the repository
configuration indicates dist CSS is generated and not tracked, and configurator scripts don’t
generate it before Vite resolves imports.

configurator/src/components/shell/PreviewPanel.svelte[1-7]
.gitignore[12-17]
configurator/package.json[7-15]
package.json[34-37]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`configurator/src/components/shell/PreviewPanel.svelte` imports `dist/slashed.full.css?raw` at compile time, but the repo gitignores `dist/*.css`, and configurator scripts do not build/generate that file. This can break `npm run dev` / `npm run build` for the configurator on fresh clones.

### Issue Context
- `dist/*.css` is not tracked by git.
- Root build (`npm run build`) generates dist artifacts, but configurator predev/prebuild currently only sync API JSON.

### Fix Focus Areas
- configurator/src/components/shell/PreviewPanel.svelte[1-7]
- configurator/package.json[7-15]
- .gitignore[12-17]
- package.json[34-37]

### Suggested fix (choose one)
1) **Preferred (decouple from dist):** Replace the `dist/slashed.full.css?raw` import with a preview stylesheet built from source layers (e.g., import the needed `core/*.css` inputs and/or bundle them for the iframe), so preview works without prebuilding dist.
2) **If you must use dist:** Update `configurator` scripts (`predev`/`prebuild`) to generate `dist/slashed.full.css` (e.g., run the root bundling step) before starting Vite, and fail with a clear message if generation fails.
3) **Fallback approach:** Revert to runtime fetch with graceful error handling (so dev server can still run even if dist is missing), and optionally cache the CSS after first load.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Share drops unknown keys 🐞 Bug ≡ Correctness
Description
Share encoding (codec.Ga/Ha) skips keys not present in the token registry, but the UI’s
overridesCount and domain badges count all keys in overrides, so imported/legacy unknown keys
can be silently omitted from shared URLs. This can lead to “customised” counts that don’t match what
the share link actually preserves.
Code

configurator/src/App.svelte[R63-76]

+  // Derived
+  let overridesCount = $derived(Object.keys(overrides).length);
+  let domainBadges = $derived(overridesByDomain(overrides));
+  let canUndo = $derived(past.length > 0);
+  let canRedo = $derived(future.length > 0);

-  // Persist the navigation prefs so a reload restores where the user was.
-  // Restore (with validation) happens in store.svelte.js via sanitiseUiState.
+  // Persist + URL sync + style injection
  $effect(() => {
-    const snapshot = JSON.stringify({ domain: ui.domain, outputMode: ui.outputMode, uiTheme: ui.uiTheme, bundle: ui.bundle, showTokens: ui.showTokens });
-    try {
-      localStorage.setItem(UI_STORAGE_KEY, snapshot);
-    } catch {
-      /* quota / private mode — non-essential, ignore */
+    const _ov = overrides;
+    localStorage.setItem("slashed-studio/overrides/v2", JSON.stringify(_ov));
+    const code = Ga(_ov);
+    const nextHash = code ? `c=${code}` : "";
+    if (window.location.hash.replace("#", "") !== nextHash) {
+      window.location.hash = nextHash;
Relevance

⭐⭐⭐ High

Same issue previously flagged and accepted: token-aware override count prevents stale/unknown-key
share desync (PR #402).

PR-#402

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The UI counts all override keys, but the encoder skips keys missing from the registry; therefore
unknown keys can be present in state yet absent from the share code.

configurator/src/App.svelte[63-76]
configurator/src/lib/codec.ts[70-82]
PR-#402

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The share-code encoder only serializes known tokens, but the app state and UI counts include any key present in `overrides`. Unknown keys (e.g., from imports) will be dropped from shared URLs without any indication.

### Issue Context
`codec.Ha` explicitly skips unknown token names (no id in registry). The UI uses `Object.keys(overrides).length`.

### Fix Focus Areas
- configurator/src/App.svelte[63-76]
- configurator/src/lib/codec.ts[70-82]

### Suggested fix
- Option A: Filter `overrides` on import/ingest to only known token names (recommended), so state never contains unknown keys.
- Option B: Derive `overridesCount`/badges from the same “known-token” filtered view used for `Ga()` (or export a helper from `codec` to filter/count known overrides).
- If you intentionally want to allow unknown keys in export CSS, consider indicating “X unknown keys not shareable” to avoid silent loss.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. Unguarded localStorage writes 🐞 Bug ☼ Reliability
Description
The App persistence $effect writes to localStorage without a try/catch, which can throw (quota
exceeded, privacy modes) and disrupt the effect’s subsequent URL/style updates. This reduces
reliability in constrained browser environments.
Code

configurator/src/App.svelte[R70-77]

  $effect(() => {
-    const snapshot = JSON.stringify({ domain: ui.domain, outputMode: ui.outputMode, uiTheme: ui.uiTheme, bundle: ui.bundle, showTokens: ui.showTokens });
-    try {
-      localStorage.setItem(UI_STORAGE_KEY, snapshot);
-    } catch {
-      /* quota / private mode — non-essential, ignore */
+    const _ov = overrides;
+    localStorage.setItem("slashed-studio/overrides/v2", JSON.stringify(_ov));
+    const code = Ga(_ov);
+    const nextHash = code ? `c=${code}` : "";
+    if (window.location.hash.replace("#", "") !== nextHash) {
+      window.location.hash = nextHash;
    }
Relevance

⭐⭐⭐ High

Team has accepted try/catch around localStorage access to avoid failures in restricted browsers (PR
#398).

PR-#398

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The persistence effect performs an unguarded localStorage.setItem, and init reads localStorage as
well; either can throw depending on browser/storage policy.

configurator/src/App.svelte[21-32]
configurator/src/App.svelte[69-77]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`localStorage.setItem(...)` is called without guarding against exceptions. In some environments this throws and can interrupt the persistence effect.

### Issue Context
The same component also reads from `localStorage` during init; guarding both read and write makes behavior consistent.

### Fix Focus Areas
- configurator/src/App.svelte[21-32]
- configurator/src/App.svelte[69-85]

### Suggested fix
- Wrap `localStorage.getItem`/`setItem` (and JSON parse/stringify) in `try/catch`.
- If persistence fails, continue to update hash/style injection without relying on storage.
- Optionally gate on `typeof localStorage !== 'undefined'` and/or handle `DOMException` cases explicitly.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Overbroad dev fs access 🐞 Bug ⛨ Security
Description
server.fs.allow: ['..'] broadens Vite dev server filesystem access to the repo parent, increasing
the risk of unintended file exposure if the dev server is reachable beyond localhost. This should be
narrowed to only the specific directories needed for the cross-package CSS imports.
Code

configurator/vite.config.js[R27-33]

  server: {
    port: 5180,
+    hmr: process.env.DISABLE_HMR !== 'true',
+    watch: process.env.DISABLE_HMR === 'true' ? null : {},
    fs: {
-      // Allow importing the framework's source CSS (../core, ../optional) so the
-      // chrome can dogfood SLASHED's token + theme layers (see src/main.js).
      allow: ['..'],
    },
Relevance

⭐⭐ Medium

No historical evidence on narrowing Vite server.fs.allow; team may not treat dev config as
security-critical.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The Vite config explicitly allowlists the parent directory, which is a broad expansion of dev server
filesystem access.

configurator/vite.config.js[27-34]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
Vite dev server is configured to allow filesystem access to the parent directory (`'..'`). This is broader than necessary and can expose non-app files via dev-server file serving features when the server is accessible.

### Issue Context
The configurator imports `../../core/*.css`, so some allow-listing is needed, but it can be scoped to those directories.

### Fix Focus Areas
- configurator/vite.config.js[27-33]

### Suggested fix
- Replace `allow: ['..']` with a minimal allowlist (e.g., absolute paths to `../core`, `../optional`, and/or the single generated file directory you need).
- Consider ensuring the dev server is bound to localhost-only when used for local development (if applicable to your setup).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

6. Invalid slow-motion durations 🐞 Bug ≡ Correctness
Description
PreviewPanel’s slow-motion mode emits transition-duration: 200% and animation-duration: 200%,
which are invalid CSS time values and will be ignored. The “slow” preview mode therefore likely has
no effect.
Code

configurator/src/components/shell/PreviewPanel.svelte[R172-178]

+    const css = fa(ov, { mode: "root", banner: false });
+    const motionCSS =
+      motion === "slow"
+        ? "*, *::before, *::after { transition-duration: 200% !important; animation-duration: 200% !important; }"
+        : motion === "none"
+        ? "*, *::before, *::after { transition: none !important; animation: none !important; }"
+        : "";
Relevance

⭐⭐⭐ High

Motion preview correctness fixes have been accepted recently in similar code (PR #371).

PR-#371

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The slow-motion CSS string explicitly uses percentage values for duration properties, which are not
valid time units.

configurator/src/components/shell/PreviewPanel.svelte[172-178]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The generated CSS uses percentage values for `transition-duration` and `animation-duration`, but these properties require time units (e.g., `ms`, `s`).

### Issue Context
This affects the preview iframe’s optional slow-motion mode.

### Fix Focus Areas
- configurator/src/components/shell/PreviewPanel.svelte[172-178]

### Suggested fix
- Replace `200%` with a valid time-based approach, e.g. set a fixed `600ms`/`2s`, or use a CSS variable multiplier pattern if the framework supports it.
- Verify in the iframe that slow-motion visibly changes animation/transition timing.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment on lines +78 to +84
let styleEl = document.getElementById("sf-parent-overrides");
if (!styleEl) {
styleEl = document.createElement("style");
styleEl.id = "sf-parent-overrides";
document.head.appendChild(styleEl);
}
styleEl.textContent = `:root {\n${fa(_ov, { mode: "root", banner: false })}\n}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Nested :root css 🐞 Bug ≡ Correctness

codec.fa({mode:"root"}) already returns a complete :root { ... } block, but both App and
PreviewPanel wrap it again, generating invalid CSS like :root { :root { ... } } so overrides may
not apply. This breaks both the parent-document override injection and the iframe preview override
updates.
Agent Prompt
### Issue description
`codec.fa(..., { mode: "root" })` returns a full `:root { ... }` rule, but callers wrap it in another `:root { ... }`, producing invalid CSS and preventing overrides from applying.

### Issue Context
This happens in both the parent document style injection (`sf-parent-overrides`) and the preview iframe (`slashed-overrides`).

### Fix Focus Areas
- configurator/src/App.svelte[69-85]
- configurator/src/components/shell/PreviewPanel.svelte[165-243]
- configurator/src/lib/codec.ts[161-178]

### Suggested fix
- In `App.svelte`, set `styleEl.textContent` to the output of `fa(_ov, { mode: "root", banner: false })` directly (no additional wrapper).
- In `PreviewPanel.svelte`, in both `buildIframeHTML()` and the `$effect` that updates `slashed-overrides`, write the `fa(..., { mode: "root" })` output directly into the style element (or alternatively switch `fa` to `mode:"layer"` and adjust surrounding CSS accordingly).
- Add a quick assertion/unit check (optional) that the generated style text does not contain `:root` twice at the top-level.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +4 to +6
import { fa } from '../../lib/codec';
// Import the built framework CSS at Vite compile time — always in sync with dist.
import frameworkCSSStatic from '../../../../dist/slashed.full.css?raw';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Missing dist css import 🐞 Bug ☼ Reliability

PreviewPanel build-imports ../../../../dist/slashed.full.css?raw, but dist/*.css is explicitly
gitignored and not generated by the configurator’s predev/prebuild scripts, so Vite can fail to
start/build on a clean checkout. This turns the studio into an order-dependent build that breaks
when dist/ hasn’t been generated yet.
Agent Prompt
### Issue description
`configurator/src/components/shell/PreviewPanel.svelte` imports `dist/slashed.full.css?raw` at compile time, but the repo gitignores `dist/*.css`, and configurator scripts do not build/generate that file. This can break `npm run dev` / `npm run build` for the configurator on fresh clones.

### Issue Context
- `dist/*.css` is not tracked by git.
- Root build (`npm run build`) generates dist artifacts, but configurator predev/prebuild currently only sync API JSON.

### Fix Focus Areas
- configurator/src/components/shell/PreviewPanel.svelte[1-7]
- configurator/package.json[7-15]
- .gitignore[12-17]
- package.json[34-37]

### Suggested fix (choose one)
1) **Preferred (decouple from dist):** Replace the `dist/slashed.full.css?raw` import with a preview stylesheet built from source layers (e.g., import the needed `core/*.css` inputs and/or bundle them for the iframe), so preview works without prebuilding dist.
2) **If you must use dist:** Update `configurator` scripts (`predev`/`prebuild`) to generate `dist/slashed.full.css` (e.g., run the root bundling step) before starting Vite, and fail with a clear message if generation fails.
3) **Fallback approach:** Revert to runtime fetch with graceful error handling (so dev server can still run even if dist is missing), and optionally cache the CSS after first load.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

claude and others added 4 commits June 26, 2026 07:35
…tor v2

Lint CSS:
- Exclude configurator-archive/** from stylelint (same treatment as
  configurator/**) to silence the 89 Tailwind/legacy CSS errors

Configurator tests:
- Add vitest + @playwright/test + @testing-library/svelte to devDependencies
- Add test, test:unit, test:components, pretest:e2e, test:e2e, check:curation
  scripts to configurator/package.json
- vitest.config.js: jsdom env, __SLASHED_VERSION__ define, both tests/ and
  tests-components/ included; playwright.config.js: 3 engines, preview server
- tests/codec.test.js: encode/decode round-trip, URL-safety, error resilience
- tests/css.test.js: sanitizeValue, generateCSS, parseCSS
- tests/share.test.js: encodeOverrides/readShareFromHash/buildShareUrl round-trip
- tests/smoke.test.js: api-index, token-registry, bundles data integrity
- tests/curation.test.js: asserts every public knob has a home domain
- tests-components/header.test.js: StudioHeader component rendering
- tests-e2e/shell.spec.js: load, sidebar nav, undo/redo/share controls
- src/lib/domains.ts: extract DOMAIN_PATTERNS from DomainPanel (shared source
  of truth); DomainPanel.svelte imports from it
- src/lib/codec.ts: add named export aliases (encode, decode, sanitizeValue,
  generateCSS, parseCSS, encodeOverrides, buildShareUrl, readShareFromHash)
- scripts/check-curation.mjs: replace broken domains.js import with inline
  DOMAIN_PATTERNS; fix isExplicitlyClassified to include misc; expand patterns
  to cover all 686 framework tokens (was 103 orphans, now 0)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017FGqcDvhJ6HEFpT7WRwqib
- Add src/vite-env.d.ts with vite/client reference and __SLASHED_VERSION__
  ambient declaration, fixing two svelte-check errors:
  1. PreviewPanel: ?raw import now typed via vite/client
  2. StudioHeader: declare modifier no longer needed inline in <script>

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017FGqcDvhJ6HEFpT7WRwqib
PreviewPanel.svelte imports dist/slashed.full.css via Vite's ?raw
query. The dist CSS files are gitignored and must be produced by
`npm run build` at the repo root before the Vite build inside the
Configurator tests job can succeed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017FGqcDvhJ6HEFpT7WRwqib
- loads with branding: scope to header element to avoid strict-mode
  violation when preview panel also renders "SLASHED Studio" text
- clicking sidebar items: add data-testid="panel-heading" to the panel
  heading span in App.svelte; use that locator instead of getByText
  which matched 4 visually-uppercase "Colors" elements via CSS
- share button: skip on Firefox/WebKit — grantPermissions clipboard-*
  is Chromium-only; the button itself is still wired and tested
@jackgranatowski
jackgranatowski merged commit b55ab86 into main Jun 26, 2026
13 checks passed
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