Repository navigation
feat(frontend): create a prompt from the /m Prompts page - #8156
Conversation
… mode Create new and the folder menu offer New prompt > Chat, Completion, Agent, as /w does. Each makes a local draft app from the type's template, names and creates it in the shared commit dialog, then opens the new app in the /m playground. Without developer mode the menus stay as they were. Entire-Checkpoint: 01M6R57JTD9D6TE2VET4VBJCSK
|
Caution Review failedThe pull request is closed. No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Railway Preview Environment
Preview use finished or expired. Environment absence verified; retained storage requires separate provider accounting. Post |
…rity-create-prompt # Conflicts: # web/mobile/src/features/prompts/PromptsScreen.tsx
Context
In /m developer mode, a developer cannot start a new prompt. "Create new" on the Prompts page offers only "New folder", and the folder menu in the breadcrumb has no "New prompt" either. In /w, Create new > New prompt > Chat, Completion or Agent creates a draft app, asks for its name, creates it and opens the playground.
Changes
With beta developer mode on, "Create new" and the breadcrumb folder menu now offer New prompt > Chat / Completion / Agent, in the same place as /w. Choosing a type:
createEphemeralAppFromTemplate, the same factory /w uses; Agent follows the /w path for agents, so it picks the model the same way),createWorkflowFromEphemeralAtom) and opens the new app in the /m playground at that revision.Cancel drops the local draft. Nothing is sent to the server before Create.
Naming step is a first step. /w names the draft in its editable revision drawer, where the user can also change the prompt before creating it. The /m editable drawer (PR 4.1) is still in progress, so this PR uses the shared commit dialog.
CreatePromptDialogis the only piece that the drawer replaces later; the draft, the create call and the landing stay.Gating. New prompt shows only when the playground developer view is on, which needs beta developer mode (the view is
hiddenfor everyone else). Without it, the menus are exactly as before: Create new has only New folder, the folder menu has Rename, Move, New folder, Delete, and the page does not fetch the templates.Based on
release/v0.128.8(now inmainat 8d75125).Tests
createPrompt.render.test.tsxruns the real create atoms with only HTTP stubbed:POST /workflows/,/workflows/variants/and the v1/workflows/revisions/commitare checked exactly (name, slug, flags, template parameters), then the landing URL/apps/<id>/playground?revisions=<v1>. Before Create, only the template read and the schema inspect are sent.promptsScreen.render.test.tsxandpromptsRoute.render.test.tsxstill pass. /m types pass, lint is clean on the changed files.What to QA