feat(composer): hosted demo is the shadcn v3 reference project - #58
Merged
Conversation
composer.aesthetic-function.com now demonstrates the representation work we shipped, not the v1 Acme sample. The baked demo (demo-data.ts + demo-assets) is the shadcn/ui v3 project: 34 components mapped through the v2-language production profile (T1-T4 + A0), 14 worked surfaces (11 emit, 3 refuse on declared casualties — accordion/breadcrumb/pagination/tooltip, first-class). The Acme project stays in the repo for the agent 'bring your own library' story. Removed the v3 project's surfaces/ dir (it duplicated the contract's 14 examples; recomputeEmit/demo-assets read contract examples directly). Two real v3-compat bugs found by validating the hosted demo, both fixed: 1. **In-browser validation failed on the v3 contract**: rule 48 (rule.form-control-carries-control) uses requiredCategories (dspack-spec 0.4.3+), but Studio's browser validator bundled dspack-spec 0.4.2's v0.4 schema, which rejects it. Bumped @aestheticfunction/dspack-spec ^0.4.2 -> ^0.4.4 (composer + agent); 'contract + surface gates' now PASS. 2. **Mapper crashed (React #31) on any v3 enum prop**: v3 contracts carry enum members as {value, description} objects; the Mapper rendered them as React children and used them as keys. Added enumLabel() and normalised every enum-value use through it (v1 strings and v3 objects both). Rewrote e2e/composer-prod-smoke.spec.ts for the v3 demo (12 specs): load, agent honesty, project checklist, inventory + casualty, mapper fidelity, whole-in-browser validation (catalog A1-A3 + document S1-S3 PASS), preview + casualty refusals, export, reload-safety, acknowledged casualties, rule builder rationale-gate, scenario live gates, bundle hygiene. 12/12 green against the built static export. Live authoring/generation still needs the local agent — asserted, not hidden. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
dspack-studio-composer | b7c19a5 | Aug 08 2026, 06:53 PM |
There was a problem hiding this comment.
Pull request overview
Updates the hosted Composer demo to use the shadcn/ui v3 reference project and aligns the app/tests/dependencies so the deployed site validates and renders v3 correctly (including enum-member normalization and schema compatibility).
Changes:
- Bump
@aestheticfunction/dspack-specto^0.4.4(lockfile + app deps) to resolve v3 schema validation (requiredCategories). - Update the mapper to safely render v3 enum members (
{ value, description }) via normalization. - Rewrite production smoke E2E specs to assert the hosted demo’s v3 behavior and gating outputs; remove legacy demo surface assets from the project.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Locks @aestheticfunction/dspack-spec to 0.4.4. |
| e2e/composer-prod-smoke.spec.ts | Reworks hosted-demo smoke coverage for shadcn v3 flows and gate assertions. |
| apps/composer/shadcn-v3-project/surfaces/workspace-members-directory.dsurface.json | Removes legacy surface asset (now relying on v3 contract examples / emitted surfaces). |
| apps/composer/shadcn-v3-project/surfaces/usage-help-affordances.dsurface.json | Removes legacy surface asset. |
| apps/composer/shadcn-v3-project/surfaces/support-ticket-queue.dsurface.json | Removes legacy surface asset. |
| apps/composer/shadcn-v3-project/surfaces/project-workspace-panels.dsurface.json | Removes legacy surface asset. |
| apps/composer/shadcn-v3-project/surfaces/orders-table-loading.dsurface.json | Removes legacy surface asset. |
| apps/composer/shadcn-v3-project/surfaces/order-detail-summary.dsurface.json | Removes legacy surface asset. |
| apps/composer/shadcn-v3-project/surfaces/notification-preferences.dsurface.json | Removes legacy surface asset. |
| apps/composer/shadcn-v3-project/surfaces/invite-teammates-dialog.dsurface.json | Removes legacy surface asset. |
| apps/composer/shadcn-v3-project/surfaces/import-run-status.dsurface.json | Removes legacy surface asset. |
| apps/composer/shadcn-v3-project/surfaces/expense-report-form.dsurface.json | Removes legacy surface asset. |
| apps/composer/shadcn-v3-project/surfaces/docs-article-trail.dsurface.json | Removes legacy surface asset. |
| apps/composer/shadcn-v3-project/surfaces/delete-project-confirmation.dsurface.json | Removes legacy surface asset. |
| apps/composer/shadcn-v3-project/surfaces/delete-account-confirmation.dsurface.json | Removes legacy surface asset. |
| apps/composer/shadcn-v3-project/surfaces/customer-context-sheet.dsurface.json | Removes legacy surface asset. |
| apps/composer/shadcn-v3-project/project.json | Updates demo project manifest (removes surfacesDir). |
| apps/composer/scripts/demo-assets.mjs | Points demo asset generation at shadcn-v3-project contract/profile. |
| apps/composer/package.json | Bumps @aestheticfunction/dspack-spec to ^0.4.4. |
| apps/composer/app/views/mapper-view.tsx | Normalizes enum labels to avoid rendering v3 objects as React children. |
| apps/composer/app/demo-data.ts | Switches demo imports to shadcn v3 contract/profile/manifest; drops extra surfaces. |
| apps/agent/package.json | Bumps @aestheticfunction/dspack-spec to ^0.4.4. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
16
to
18
| const here = dirname(fileURLToPath(import.meta.url)); | ||
| const project = join(here, "..", "demo-project"); | ||
| const project = join(here, "..", "shadcn-v3-project"); | ||
| const outDir = join(here, "..", "app", "demo", "generated"); |
Comment on lines
+18
to
+29
| import demoContract from "../shadcn-v3-project/shadcn-ui.dspack.json"; | ||
| import demoProfile from "../shadcn-v3-project/shadcn-v3.profile.json"; | ||
| import demoManifest from "../shadcn-v3-project/project.json"; | ||
| import demoEmit from "./demo/generated/emit.json"; | ||
| import usesCasualty from "../demo-project/surfaces/uses-casualty.dsurface.json"; | ||
|
|
||
| export const DEMO_CONTRACT = demoContract as unknown as Record<string, any>; | ||
| export const DEMO_PROFILE = demoProfile as unknown as Record<string, any>; | ||
| export const DEMO_MANIFEST = demoManifest as unknown as Record<string, any>; | ||
| export const DEMO_EMIT = demoEmit as unknown as Record<string, any>; | ||
| export const DEMO_EXTRA_SURFACES = [{ name: "uses-casualty", surface: usesCasualty as unknown }]; | ||
| // The v3 contract's 14 examples ARE the worked surfaces (recomputeEmit emits | ||
| // contractSurfaces(doc)); the project carries no extra surfaces beyond them. | ||
| export const DEMO_EXTRA_SURFACES: Array<{ name: string; surface: unknown }> = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes composer.aesthetic-function.com demonstrate the v3 representation work (not the v1 Acme sample). The baked demo is the shadcn/ui v3 project — 34 components, T1-T4 + A0, 14 surfaces (11 emit, 3 acknowledged-casualty refusals).
Two real v3-compat bugs found by validating the hosted demo, both fixed:
requiredCategories) — Studio bundled dspack-spec 0.4.2's schema; bumped to ^0.4.4. Contract+surface gates now PASS.{value, description}members rendered as children) — addedenumLabel()normalisation.Rewrote
composer-prod-smoke.spec.tsfor v3 (12 specs, 12/12 green against the built static export): load, agent honesty, checklist, inventory+casualty, mapper fidelity, whole-in-browser validation, preview + casualty refusals, export, reload-safety, acknowledged casualties, rule-builder gate, scenario live gates, bundle hygiene.This is the legitimate product merge that verifies the restored Cloudflare pipeline. Live authoring/generation still requires the local agent (asserted, not hidden).
🤖 Generated with Claude Code