Skip to content

feat(configurator): Basic/Advanced/Power IA restructure - #311

Merged
jackgranatowski merged 8 commits into
mainfrom
claude/festive-ritchie-5kfy8d
Jun 11, 2026
Merged

feat(configurator): Basic/Advanced/Power IA restructure#311
jackgranatowski merged 8 commits into
mainfrom
claude/festive-ritchie-5kfy8d

Conversation

@jackgranatowski

@jackgranatowski jackgranatowski commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Restructures the configurator's information architecture so Basic mode is a per-project checklist and the atomic-reach controls are fenced away — following the conventions that make the best framework configurators approachable, adapted to SLASHED's buildless model (no save/regenerate cycle; every edit is a live override with instant preview and CSS export).

Basic = per-project checklist

  • New Home landing screen: one row per domain with intro copy, per-domain customised counts, "start here" pointer and an Export CSS shortcut.
  • Basic sidebar shows only Home + 6 domains (Colors, Typography, Spacing, Layout, Borders, Shadows) + Themes.
  • Curated forms (src/lib/basics.js, single source of truth): friendly labels ("Content width", not --sf-container-default), help text, and an ⓘ popover revealing the raw token name (click-to-copy), description, default and "drives N" reach.
  • Basic search scopes to the curated surface and offers an "N more matches in Advanced" jump that preserves the query.

Power knobs out of Basic

  • The global multipliers (--sf-space-scale drives 45 tokens, --sf-shadow-strength 14, …) no longer render in Basic. They move to a collapsed, warning-styled ⚡ Power knobs group at the bottom of each Advanced panel, with per-domain warning copy.

Generators write the live fluid engine

  • core/tokens.css derives every fluid step at use-time from registered scalars, so the scale generators now write those scalars (src/lib/fluidEngine.js) in one history step instead of baking nine per-step clamp() expressions. Defaults are cleared rather than written; per-step tokens are nulled in the same patch so stale baked overrides can't mask the engine.
  • Display ramp's ratio selects are read-only (shared with the type scale); the shared viewport range carries an explicit warning + dedicated reset.

One-click style presets

  • Corner style (Sharp / Subtle / Rounded / Pill — values keep * var(--sf-radius-scale) so the power knob stays live) and Shadow style (None / Subtle / Soft / Strong — steer --sf-shadow-strength, preserving the dark-mode boost). Single undo step; presets null what they don't set so they never mask each other.

Framework sync enforced by tests

  • New suites (basics, fluid-engine, style-presets) + knob default-parity pin every curated control, preset patch and engine scalar to the live catalogue. Upgrade ritual: npm run sync && npm test — a vanished token or drifted default fails CI instead of rendering a dead control.
  • A guard test keeps all authored configurator files vendor-neutral.

Docs

  • IA-REDESIGN.md rewritten as the as-shipped architecture record; ROADMAP + README refreshed.
  • Also includes a stale-badge fix: bundle gzip badge descriptors regenerated (15.3/19.3 kB, verified independently).

Testing

  • cd configurator && npm test — 345/345 (node --test)
  • Root suite incl. tests/api-index-sync.test.js — green
  • npm run build — clean
  • Headless-browser smoke (Playwright/Chromium against the built app), 7/7: Home landing & sidebar composition, zero knobs in Basic / power group in Advanced, mode-switch guards, generator writes scalars (no baked steps in localStorage), shadow preset + single-step undo, Basic search jump preserving the query, ⓘ popover revealing the raw token.

https://claude.ai/code/session_01DCCWK2EPSRdhBDZ7f25NxT


Generated by Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Basic and Advanced modes with curated controls vs. full token catalog
    • Home screen for Basic mode configuration overview
    • Power knobs section for advanced per-domain multipliers
    • One-click style preset buttons (borders/shadows)
    • Fluid scale generators with live engine scalar application
    • Search with "Switch to Advanced" affordance for hidden matches
  • Documentation

    • Added design specification for tiered interface
    • Enhanced README with feature details
    • Updated roadmap with shipped features

claude added 7 commits June 11, 2026 07:30
…ers)

Full proposal for reorganising the configurator's information
architecture, inspired by the panel DX of Automatic.css 4.0 adapted
to SLASHED's buildless model:

- Basic mode becomes a curated per-project checklist: 11 main colors,
  fluid type/space generators, basic layout/border/shadow options
- Quick Knobs (global multipliers) demoted out of Basic into a fenced
  'Power knobs' group inside Advanced
- Generators write fluid-engine scalars instead of baked clamp() output
- Home/checklist screen, per-panel intro copy, friendly labels with
  raw-token info popovers
- Five implementation phases with file-level targets

https://claude.ai/code/session_01DCCWK2EPSRdhBDZ7f25NxT
…reen

Phase 1 of the Basic/Advanced/Power IA restructure:

- Quick Knobs no longer render in Basic; they move to a collapsed,
  warning-styled 'Power knobs' group at the bottom of each Advanced
  panel, with per-domain powerIntro copy explaining their reach
- Basic sidebar shows only the per-project checklist (6 domains +
  Themes) plus a new Home row
- New Home screen: setup checklist with per-domain customised counts
  and an 'Export CSS' shortcut into the output drawer
- Basic search now renders curated-surface hits and offers an
  'N more matches in Advanced' switch that preserves the query
- Per-domain intro copy on Basic panels
- Essentials sync fixes: +--sf-font-weight-heading, +--sf-color-border,
  --sf-space-content -> --sf-content-gap (canonical knob),
  --sf-radius-full demoted to Advanced
- Output drawer expansion lifted into the shared ui store
- domains tests extended: basic ids, intro/powerIntro presence, knob
  tokens verified against the catalogue

https://claude.ai/code/session_01DCCWK2EPSRdhBDZ7f25NxT
Phase 2 of the Basic/Advanced/Power IA restructure:

- New lib/basics.js: single source of truth for the curated Basic
  surface — grouped controls with friendly labels and help text for
  typography, spacing, layout, borders and shadows (colors keep the
  11 brand/status pair rows)
- domains.js essentials now derive from basics.js, so the curated
  card and the search surface can never drift apart
- TokenRow gains optional label/help/showRawInfo props: Basic rows
  render a friendly title with an i-popover revealing the raw token
  name (click-to-copy), catalogue description, framework default and
  'drives N' reach; Advanced rows are untouched
- DomainPanel Basic branch renders the curated groups as cards
- New tests/basics.test.js: every curated control must exist in the
  catalogue with a non-empty default, labels unique, help present,
  essentials in lockstep with basics.js

https://claude.ai/code/session_01DCCWK2EPSRdhBDZ7f25NxT
Phase 3 of the Basic/Advanced/Power IA restructure:

- New lib/fluidEngine.js: the framework derives every fluid step live
  from registered scalars (pow() inside clamp()), so the generator now
  writes those scalars in one history step instead of baking nine
  per-step clamp() expressions. Defaults are cleared rather than
  written; the ramp's per-step tokens are nulled in the same patch so
  previously baked overrides can't mask the live engine
- ScaleGenerator: seeds knobs from live overrides, disables ratio
  selects on the display ramp (shared with the type scale), surfaces
  the shared-viewport warning, adds a 'Reset viewport range'
  affordance; falls back to the old per-step path only when a scalar
  is missing from the catalogue
- New lib/stylePresets.js + StylePresetRow: one-click Corner style
  (Sharp/Subtle/Rounded/Pill) and Shadow style (None/Subtle/Soft/
  Strong) rows on the Basic borders/shadows panels — single undo
  step, radius values keep the --sf-radius-scale factor, shadow
  presets steer --sf-shadow-strength preserving the dark-mode boost
- New tests: fluid-engine (scalar existence + default parity + patch
  semantics), style-presets (token existence, sanitiser round-trip,
  one all-null default per list, uniform key sets); knob default
  parity added to the existing registry suite

https://claude.ai/code/session_01DCCWK2EPSRdhBDZ7f25NxT
Phase 4 of the IA restructure (orientation polish):

- Each token domain links to its framework doc (docs/theming.md,
  docs/layout.md, docs/motion.md, docs/tokens.md) from the panel footer
- The header 'modified' pill becomes a button: 'N customised — Export
  CSS' opens and scrolls to the output drawer

https://claude.ai/code/session_01DCCWK2EPSRdhBDZ7f25NxT
Phase 5 of the IA restructure:

- IA-REDESIGN.md rewritten as the as-shipped architecture record with
  generic phrasing throughout (no competitor product names)
- ROADMAP.md: vendor mention replaced with generic phrasing; new
  'Shipped' section for the Basic/Advanced/Power restructure
- README.md: feature list refreshed (Basic checklist, Power knobs,
  scalar-writing generators, style presets) and the framework-upgrade
  ritual documented (npm run sync && npm test)
- New guard test in smoke.test.js scans every authored .md/.svelte/.js
  under configurator/ and fails on any vendor name, enforcing the
  constraint permanently

https://claude.ai/code/session_01DCCWK2EPSRdhBDZ7f25NxT
Regenerated by scripts/bundle.js during the test run; the committed
values (52.7/64.1 kB) were stale — the minified bundles gzip to
15.3/19.3 kB, verified independently with zlib.

https://claude.ai/code/session_01DCCWK2EPSRdhBDZ7f25NxT
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jackgranatowski, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 26 minutes and 11 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 55819624-8dd1-44ca-b823-9eca739ca65c

📥 Commits

Reviewing files that changed from the base of the PR and between 1212d62 and 759463b.

📒 Files selected for processing (3)
  • configurator/IA-REDESIGN.md
  • configurator/src/lib/fluidEngine.js
  • configurator/tests/smoke.test.js
📝 Walkthrough

Walkthrough

The PR implements a tiered Basic/Advanced/Power UI redesign for the configurator. It introduces a curated Basic token surface organized per domain, a Home landing page showing domain checklists, fluid engine integration for scalar-based scale generation, one-click style presets for borders/shadows, and comprehensive test lockstep coverage to synchronize with the framework's token catalogue.

Changes

Configurator Basic/Advanced/Power IA Redesign

Layer / File(s) Summary
Design specification and documentation
configurator/IA-REDESIGN.md, configurator/README.md, configurator/ROADMAP.md
Comprehensive design spec defining the Basic/Advanced/Power model, per-tier content and behavior, framework "lockstep" test expectations, non-goals, and roadmap items; README and ROADMAP updated to describe curated domains, fluid engine scalars, style presets, and CI coupling to token catalogue.
Curated token surfaces and metadata
configurator/src/lib/basics.js, configurator/src/lib/domains.js, configurator/src/lib/stylePresets.js, configurator/src/lib/store.svelte.js
New BASIC_BY_DOMAIN catalogue with curated controls per domain; BASIC_DOMAIN_IDS array; domain metadata fields (intro, powerIntro, docsPath); BORDER_STYLE_PRESETS and SHADOW_STYLE_PRESETS; default UI state changed to Home domain with outputOpen flag.
Fluid engine and scale generator refactor
configurator/src/lib/fluidEngine.js, configurator/src/components/ScaleGenerator.svelte
New fluidEngine module defines viewport scalars and per-ramp engine configurations; exports buildEnginePatch, resetEnginePatch, and resetViewportPatch helpers. ScaleGenerator seeds knobs from live overrides, branches on engine-live mode to write single scalar patches vs per-step clamps, conditionally disables ratio controls for shared ratios, and adds viewport reset button.
Home landing and mode-based domain navigation
configurator/src/components/Home.svelte, configurator/src/App.svelte, configurator/src/components/Sidebar.svelte
New Home.svelte component shows BASIC mode domain checklist with per-domain override counts and "Export CSS" button. App.svelte routes to Home, auto-corrects domain on mode switch, and cycles domains by mode. Sidebar.svelte filters domains to Basic-only list in Basic mode and prepends Home entry.
Domain panel curation and token rendering
configurator/src/components/DomainPanel.svelte, configurator/src/components/TokenRow.svelte, configurator/src/components/StylePresetRow.svelte
DomainPanel displays curated Basic groups, Basic-mode search with "N more matches in Advanced" jump button, Power knobs collapsed section, and style presets. TokenRow extended with friendly mode showing user-facing labels, help, optional WCAG badge, and collapsible raw-details panel. New StylePresetRow renders one-click border/shadow preset buttons with active-state highlighting.
Export drawer state and header integration
configurator/src/components/Header.svelte, configurator/src/components/OutputPanel.svelte
Header's override count pill becomes interactive export button that sets ui.outputOpen = true and scrolls .out into view. OutputPanel switches from local drawerOpen state to shared ui.outputOpen, unifying export trigger across Home and Header.
Comprehensive test suites for Basic surface, fluids, presets, and vendor-neutrality
configurator/tests/basics.test.js, configurator/tests/fluid-engine.test.js, configurator/tests/style-presets.test.js, configurator/tests/domains.test.js, configurator/tests/themes.test.js, configurator/tests/smoke.test.js
New tests validate BASIC_BY_DOMAIN structure, token existence, and sync with domains.js essentials; fluid engine scalars/defaults and patch builders; style preset token references and invariants; BASIC mode metadata (intro, powerIntro); knobs registry defaults matching catalogue; vendor-neutrality scan of authored files.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • codeslash-dev/SLASHED#303: Introduces the initial Basic/Advanced split and domain navigation that this PR evolves with Home landing and curated surfaces.
  • codeslash-dev/SLASHED#284: Introduces fluid scale input tokens that this PR integrates via the new fluidEngine.js and ScaleGenerator refactor.
  • codeslash-dev/SLASHED#310: Overlaps on DomainPanel.svelte override reactivity and domain reset behavior within the same configurator architecture.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: a comprehensive restructure of the configurator's information architecture introducing a three-tier model (Basic/Advanced/Power).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/festive-ritchie-5kfy8d

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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
configurator/IA-REDESIGN.md (1)

18-18: ⚡ Quick win

Hardcoded token count could drift.

The "841 tokens" is a snapshot value that will become stale as the framework evolves. The test suite validates token existence and structure but does not assert this specific total. Consider either removing the exact count ("all tokens reachable") or adding a comment indicating it reflects the count at implementation time.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@configurator/IA-REDESIGN.md` at line 18, Update the sentence that reads "all
841 tokens reachable" so it doesn't hardcode a mutable token count: either
remove the numeric total entirely or change it to a time‑scoped note such as
"all tokens reachable (841 at time of writing)"; edit the phrase "all 841 tokens
reachable" in IA‑REDESIGN.md to reflect one of these options so the document
won't drift as the token set changes.
configurator/tests/smoke.test.js (1)

117-143: ⚡ Quick win

Consider expanding the skip list and vendor regex.

The current implementation skips node_modules, dist, and .svelte-kit, which covers common build artifacts. However, consider:

  1. Additional directories: You may want to skip coverage/, .git/, build/, or any other generated/cache directories.
  2. Vendor regex scope: The pattern /\bacss\b|automatic\.css/i specifically targets one competitor. If the goal is vendor neutrality more broadly, document whether other product names should be added or if this is intentionally scoped.
  3. Generated files within src: The skip logic excludes directories but not individual generated files (e.g., api-index.generated.json). If generated data files might contain vendor references from upstream sources, consider filtering by filename patterns as well.
💡 Optional enhancement
- const SKIP_DIRS = new Set(['node_modules', 'dist', '.svelte-kit']);
+ const SKIP_DIRS = new Set(['node_modules', 'dist', '.svelte-kit', 'coverage', '.git', 'build']);

And consider adding a comment documenting the vendor regex scope:

+ // Product constraint: configurator stays vendor-neutral. This regex targets
+ // known competitor product names that should never appear in authored content.
  const VENDOR_RE = /\bacss\b|automatic\.css/i;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@configurator/tests/smoke.test.js` around lines 117 - 143, The test's
SKIP_DIRS and VENDOR_RE are too narrow: update the SKIP_DIRS Set (referenced in
SKIP_DIRS) to include additional generated/cache dirs like 'coverage', '.git',
'build' (and any project-specific generated folders) and adjust the
file-filtering in walk (function walk) to ignore common generated filenames
(e.g., *.generated.*, api-index.generated.json) or add a filename skip check;
also expand or document VENDOR_RE (the regex VENDOR_RE) to include other vendor
product names you want to ban or add a comment describing its intentional scope
so the test 'no vendor / competitor product names in authored files' reflects
broader vendor-neutral requirements.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@configurator/src/lib/fluidEngine.js`:
- Around line 94-97: The num(v) helper currently does
String(parseFloat(Number(v).toFixed(4))) which first rounds to 4 decimals then
strips trailing zeros; if you need to preserve exactly four decimal places
change num to return Number(v).toFixed(4) (and coerce/validate v as a number) so
values like 1.99995 -> "2.0000" and 1.00001 -> "1.0000"; if instead you want to
keep up-to-4-decimal trimmed formatting, keep the current logic but add a
comment documenting that parseFloat intentionally strips trailing zeros.
Reference: function num in fluidEngine.js.

---

Nitpick comments:
In `@configurator/IA-REDESIGN.md`:
- Line 18: Update the sentence that reads "all 841 tokens reachable" so it
doesn't hardcode a mutable token count: either remove the numeric total entirely
or change it to a time‑scoped note such as "all tokens reachable (841 at time of
writing)"; edit the phrase "all 841 tokens reachable" in IA‑REDESIGN.md to
reflect one of these options so the document won't drift as the token set
changes.

In `@configurator/tests/smoke.test.js`:
- Around line 117-143: The test's SKIP_DIRS and VENDOR_RE are too narrow: update
the SKIP_DIRS Set (referenced in SKIP_DIRS) to include additional
generated/cache dirs like 'coverage', '.git', 'build' (and any project-specific
generated folders) and adjust the file-filtering in walk (function walk) to
ignore common generated filenames (e.g., *.generated.*,
api-index.generated.json) or add a filename skip check; also expand or document
VENDOR_RE (the regex VENDOR_RE) to include other vendor product names you want
to ban or add a comment describing its intentional scope so the test 'no vendor
/ competitor product names in authored files' reflects broader vendor-neutral
requirements.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: be8fc19a-1014-4697-ad8b-b38d4e129b66

📥 Commits

Reviewing files that changed from the base of the PR and between 2117a3f and 1212d62.

⛔ Files ignored due to path filters (2)
  • dist/badge-essential.json is excluded by !**/dist/**
  • dist/badge-optimal.json is excluded by !**/dist/**
📒 Files selected for processing (23)
  • configurator/IA-REDESIGN.md
  • configurator/README.md
  • configurator/ROADMAP.md
  • configurator/src/App.svelte
  • configurator/src/components/DomainPanel.svelte
  • configurator/src/components/Header.svelte
  • configurator/src/components/Home.svelte
  • configurator/src/components/OutputPanel.svelte
  • configurator/src/components/ScaleGenerator.svelte
  • configurator/src/components/Sidebar.svelte
  • configurator/src/components/StylePresetRow.svelte
  • configurator/src/components/TokenRow.svelte
  • configurator/src/lib/basics.js
  • configurator/src/lib/domains.js
  • configurator/src/lib/fluidEngine.js
  • configurator/src/lib/store.svelte.js
  • configurator/src/lib/stylePresets.js
  • configurator/tests/basics.test.js
  • configurator/tests/domains.test.js
  • configurator/tests/fluid-engine.test.js
  • configurator/tests/smoke.test.js
  • configurator/tests/style-presets.test.js
  • configurator/tests/themes.test.js

Comment thread configurator/src/lib/fluidEngine.js Outdated
- fluidEngine num(): document the intentional trailing-zero stripping
  (trimmed form matches framework defaults; entry() compares numerically)
- smoke vendor-guard: widen the dir skip list (build, coverage, .git,
  test-results) and document the regex scope
- IA-REDESIGN.md: time-scope the token count so the doc can't drift

https://claude.ai/code/session_01DCCWK2EPSRdhBDZ7f25NxT
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