Skip to content

feat(canvas): create prototypes before a dev server starts - #140

Draft
lukasoppermann wants to merge 4 commits into
mainfrom
lukasoppermann-canvas-prototype-creation
Draft

lukasoppermann wants to merge 4 commits into
mainfrom
lukasoppermann-canvas-prototype-creation

Conversation

@lukasoppermann

Copy link
Copy Markdown
Contributor

Why

The canvas currently replaces its interface with server-start controls when no prototype is running. Authors should still be able to describe a new prototype, choose a team template, and use repository-level actions before starting a dev server.

Closes #77

What changes

Keep the full canvas shell available without a preview. Reuse Hub's creation form for the prompt, optional details, and template picker, then send the brief to the current conversation. Saved Hub connections are reused, and an authenticated catalog endpoint supplies templates from the latest successful default-branch Build. Disconnected and failed catalog states stay explicit rather than falling back to local templates.

Place a compact connection box below the prompt. It discovers running servers automatically every 30 seconds, offers Connect when servers are available, and otherwise offers Start dev server with a script action menu. Warnings and errors use inline alerts, and startup output appears in a code block. Starting code still requires an explicit action. Preview-only controls remain unavailable until connected, while repository publication state survives connection changes.

Replace the old server-only HTML fixtures with production React controls and shared fixture responses. Keep isolated control stories for presentation and add full-canvas stories for placement and interaction with the composer.

Real-host current-conversation dispatch and connected-Hub template loading remain unverified because no installed Replica canvas runtime was available in this session.

Storybook screenshots

All captures use the light theme and a desktop viewport. Some images are cropped to the creation area or connection control; open-menu captures include the dropdown.

Prototype canvas / Publication example: creation states

Prototype canvas / Publication example / No Prototype - Light, desktop viewport.

Full canvas with creation prompt and start controls

Prototype canvas / Publication example / No Prototype Default Template - Light, desktop viewport.

Canvas with only the default template available

Prototype canvas / Publication example / No Prototype Disconnected - Light, desktop viewport.

Disconnected canvas with Hub connection dialog

Prototype canvas / Publication example / No Prototype Catalog Loading - Light, desktop viewport.

Canvas loading Hub templates above the connection box

Prototype canvas / Publication example / No Prototype Catalog Failed - Light, desktop viewport.

Template catalog error with retry action

Prototype canvas / Publication example / No Prototype Details - Light, desktop viewport.

Optional prototype details dialog

Prototype canvas / Publication example / No Prototype Template Picker - Light, desktop viewport.

Open template picker in the canvas

Prototype canvas / Publication example / No Prototype Submission Failed - Light, desktop viewport.

Creation brief retained after a failed handoff

Prototype canvas / Publication example: server states below the prompt

Prototype canvas / Publication example / No Prototype Server Scanning - Light, desktop viewport.

Prompt above server discovery in progress

Prototype canvas / Publication example / No Prototype Single Server - Light, desktop viewport.

Prompt above a detected server and Connect action

Prototype canvas / Publication example / No Prototype Multiple Servers - Light, desktop viewport.

Prompt above multiple detected servers

Prototype canvas / Publication example / No Prototype Script Selection - Light, desktop viewport.

Prompt above script selection and Start dev server

Prototype canvas / Publication example / No Prototype Script Menu Open - Light, desktop viewport.

Full canvas with the dev server script menu open

Prototype canvas / Publication example / No Prototype Server Scan Failed - Light, desktop viewport.

Prompt above a server discovery error

Prototype canvas / Publication example / No Prototype Server Warnings - Light, desktop viewport.

Prompt above a detected server and discovery warning

Prototype canvas / Publication example / No Prototype Startup Unavailable - Light, desktop viewport.

Prompt above an unavailable-startup warning

Prototype canvas / Publication example / No Prototype Connecting - Light, desktop viewport.

Prompt above a pending server connection

Prototype canvas / Publication example / No Prototype Connect Failed - Light, desktop viewport.

Prompt above a connection failure and retry action

Prototype canvas / Publication example / No Prototype Starting - Light, desktop viewport.

Prompt above server startup with CLI output in a code block

Prototype canvas / Publication example / No Prototype Start Failed - Light, desktop viewport.

Prompt above a server startup error

Prototype canvas / Server connection: isolated controls

Prototype canvas / Server connection / Scanning - Light, desktop viewport.

Checking for running servers

Prototype canvas / Server connection / No Servers - Light, desktop viewport.

Start dev server when no server is detected

Prototype canvas / Server connection / Single Server - Light, desktop viewport.

One detected server with Connect

Prototype canvas / Server connection / Multiple Servers - Light, desktop viewport.

Multiple detected servers with individual Connect actions

Prototype canvas / Server connection / Script Selection - Light, desktop viewport.

Dev server script selector beside the start button

Prototype canvas / Server connection / Script Menu Open - Light, desktop viewport.

Single-row script menu items with a selection checkmark

Prototype canvas / Server connection / Scan Failed - Light, desktop viewport.

Inline discovery error and automatic retry explanation

Prototype canvas / Server connection / Discovery Warnings - Light, desktop viewport.

Detected server with an inline discovery warning

Prototype canvas / Server connection / Startup Unavailable - Light, desktop viewport.

Inline warning when startup is unavailable

Prototype canvas / Server connection / Connecting - Light, desktop viewport.

Disabled Connecting action

Prototype canvas / Server connection / Connect Failed - Light, desktop viewport.

Connection error with Connect available again

Prototype canvas / Server connection / Starting - Light, desktop viewport.

Starting dev server with CLI output in a code block

Prototype canvas / Server connection / Start Failed - Light, desktop viewport.

Inline startup error with Start dev server available again

Keep the full canvas available before preview connection, reuse Hub templates for current-chat creation, and add server discovery, startup controls, and complete Storybook states.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4823a28-20de-453d-b9e8-b03bbbd963ff
Resolve the TypeScript migration and Notes integration conflicts while retaining the full canvas without a preview. Make bootstrap script matching case-insensitive and keep prototype briefs explicitly untrusted in serialized request data.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4823a28-20de-453d-b9e8-b03bbbd963ff
Resolve merge conflicts in canvas app imports and regenerated extension asset outputs while preserving server-free creation behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4823a28-20de-453d-b9e8-b03bbbd963ff
Switch server-free canvas Primer Brand imports to /esm so tree-shaking preserves split vendor chunks under the extension installer size cap. Rebuild committed renderer assets and rerun the previously failing frontend build and shard 4 tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4823a28-20de-453d-b9e8-b03bbbd963ff
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.

Keep the prototype canvas usable before a dev server starts

2 participants