Skip to content

feat(create): add AI-assisted builder redesign behind ?next#295

Open
mehdibha wants to merge 2 commits into
mainfrom
claude/reverent-fermat-ea8240
Open

feat(create): add AI-assisted builder redesign behind ?next#295
mehdibha wants to merge 2 commits into
mainfrom
claude/reverent-fermat-ea8240

Conversation

@mehdibha

@mehdibha mehdibha commented Jun 27, 2026

Copy link
Copy Markdown
Owner

What

An experiment that rethinks /create end to end — a new "studio" layout, an AI assistant as the centerpiece, and the missing foundation axes. It's opt-in and UI-only, gated exactly like ?lab, so the shipped builder and the panel lab are untouched.

Try it: run the app and open /create?next=true.

The layout

A persistent three-zone studio instead of the single drill-down column:

  • Top bar — brand mark + editable system name, a centered ⌘K AI command bar, and theme toggle / re-roll / undo / share.
  • Left rail — every axis as one click (no back-button spelunking), grouped Foundations → shape & feel → surfaces → components / code. New axes carry a dot.
  • Inspector — deep controls for the selected axis, each with a per-axis ✦ Ask.
  • Canvas — the existing live preview, reused as-is.
  • Assistant drawer — the AI surface.

It reuses the real useDesignSystem + preview iframe, so brand color / radius / density edits (and the assistant's applies) are genuinely live.

AI, around one primitive

Every assistant action returns the same reviewable diff: a list of per-axis changes you can toggle row by row, apply, and undo — never a silent rewrite.

  • Compose — a prompt (or the ⌘K bar) → a whole-system diff.
  • Refine — "Rounder", "More contrast", "Calmer motion" → small scoped diffs.
  • Audit — scans the current system for issues (contrast, scale jumps, focus ring), each with a one-click Fix.
  • Extract — an image/URL → palette + font guess as a diff.

UI-only: the engine (ai.ts) returns canned diffs — no model call. The DesignSystemDiff shape it produces is the contract a real server function would later fill, so the UI wouldn't change.

New axes (all proposed, per the brief)

Typography depth (scale ratio / weight / tracking), spacing, elevation (+ tint), motion (speed + easing), borders, focus ring, translucent surfaces. Token-backed axes drive the preview today; the new axes persist as namespaced --next-* tokens and are visual-only until components consume them.

Notes

  • Reuses the existing Color / Icon / Cursor / Radius / Density / Components / Code panels rather than reimplementing them.
  • Desktop-first prototype (inspector + assistant hide below lg, like the shipped mobile pane).
  • pnpm typecheck and pnpm check pass; verified live in the browser (compose → apply changes the preview, new-axis panels render, no console errors).
  • New axes are proposals — landing them for real is a product decision, not assumed by this PR.

Note

Low Risk
Changes are isolated behind a search flag and client-only UI; routing/layout tweaks are narrow (create route + header suppression) with no auth or server-side behavior.

Overview
Adds an opt-in studio builder at /create?next=true (same gating as ?lab=true), leaving the default /create flow unchanged.

The new BuilderNext shell replaces the single customizer column with a rail → inspector → live preview → assistant layout, a dedicated top bar (⌘K compose bar, re-roll, preset undo, share), and hides the global site Header on that route so chrome does not stack.

AI is UI-only in ai.ts: compose, refine, audit, and image extract all return the same reviewable per-axis DiffRow list (toggle, apply, undo) via canned presets—no model calls. The assistant drawer wires those diffs into useDesignSystem.

New foundation axes (spacing, elevation, motion, borders, focus, surfaces, typography depth) persist as namespaced --next-* tokens in the inspector; most are visual-only until components consume them. Existing color, typography, components, and export panels are reused in the inspector rather than rewritten.

Reviewed by Cursor Bugbot for commit 4341fef. Bugbot is set up for automated code reviews on this repo. Configure here.

Opt-in "studio" reimagining of /create at /create?next=true, gated the
same way as ?lab so the shipped builder and the panel lab stay untouched.
Reuses the live preview iframe and useDesignSystem, so colour / radius /
density edits are genuinely live.

- Studio layout: top bar (identity, the ⌘K AI command bar, theme toggle,
  re-roll, undo, share), a left axis rail, a contextual inspector, the
  live canvas, and an AI assistant drawer.
- AI assistant: every action — compose, refine, audit, extract — funnels
  into one reviewable diff primitive (toggle rows, apply, undo). UI-only;
  the engine returns canned diffs, no model call yet. The diff shape is
  the contract a real server function would later fill.
- New foundation axes: typography depth (scale / weight / tracking),
  spacing, elevation, motion, borders, focus ring, translucent surfaces.
  Token-backed axes are live; the new axes persist as namespaced --next-*
  tokens (visual-only until components consume them).
- Reuses the existing Colour, Icon, Cursor, Radius, Density, Components,
  and Code panels rather than reimplementing them.

UI only, as requested — no publisher or model wiring.
@changeset-bot

changeset-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4341fef

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dotui Ready Ready Preview, Comment Jun 27, 2026 11:08pm

@cursor

cursor Bot commented Jun 27, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_e3b3bd08-fe77-4f71-a753-cd55fda66cbc)

@cursor

cursor Bot commented Jun 27, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_a9cee314-4da4-4f02-a008-c7ab778d8b00)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant