feat(web): operator creates new flow from canvas (NF-UI-10) (#370) #371

Merged
claude-desktop merged 1 commit from feat/370-nfui10-create-from-canvas into main 2026-04-25 16:01:56 +00:00
Collaborator

Summary

  • /app/flows/new now mounts FlowCanvas in mode="create" instead of the NF-UI-1 stub. The toolbar exposes a trigger picker (over TRIGGER_KINDS), an id input with ^[a-z0-9-]+$ format validation + inline 409 conflict surface, an optional description textarea, and a Discard button that confirms when dirty.
  • The create canvas seeds itself with one undeletable source node and routes the first save through flowsApi.createFlow (POST /flows). On 201 the route redirects to /app/flows/:newId and subsequent saves drop back to the existing PATCH path.
  • Edit-mode behaviour is untouched — the existing 18 FlowCanvasEditing tests still pass alongside the new 12.

Test plan

  • bun x turbo run typecheck — green
  • bun x vitest run src/features/flows/FlowCanvas.create.test.tsx — 12/12 pass
  • bun x vitest run src/features/flows/FlowCanvas.test.tsx src/features/flows/FlowCanvasEditing.test.tsx — 38/38 pass (no edit-mode regressions)
  • bun run build — green
  • bun x biome check — clean on changed files
  • Manual: open /app/flows/new, pick a trigger, type an id, drop a node, save, land on /app/flows/:newId
  • Manual: type a duplicate id (e.g. an existing default flow id) → inline "already exists" error, no navigation
  • Manual: dirty + Discard → confirm dialog, cancel keeps state, accept routes to /app/flows
  • Manual: dirty + browser refresh → beforeunload prompt fires

Closes #370

🤖 Generated with Claude Code

## Summary - `/app/flows/new` now mounts `FlowCanvas` in `mode="create"` instead of the NF-UI-1 stub. The toolbar exposes a trigger picker (over `TRIGGER_KINDS`), an id input with `^[a-z0-9-]+$` format validation + inline 409 conflict surface, an optional description textarea, and a Discard button that confirms when dirty. - The create canvas seeds itself with one undeletable source node and routes the first save through `flowsApi.createFlow` (POST `/flows`). On 201 the route redirects to `/app/flows/:newId` and subsequent saves drop back to the existing PATCH path. - Edit-mode behaviour is untouched — the existing 18 `FlowCanvasEditing` tests still pass alongside the new 12. ## Test plan - [x] `bun x turbo run typecheck` — green - [x] `bun x vitest run src/features/flows/FlowCanvas.create.test.tsx` — 12/12 pass - [x] `bun x vitest run src/features/flows/FlowCanvas.test.tsx src/features/flows/FlowCanvasEditing.test.tsx` — 38/38 pass (no edit-mode regressions) - [x] `bun run build` — green - [x] `bun x biome check` — clean on changed files - [ ] Manual: open `/app/flows/new`, pick a trigger, type an id, drop a node, save, land on `/app/flows/:newId` - [ ] Manual: type a duplicate id (e.g. an existing default flow id) → inline "already exists" error, no navigation - [ ] Manual: dirty + Discard → confirm dialog, cancel keeps state, accept routes to `/app/flows` - [ ] Manual: dirty + browser refresh → beforeunload prompt fires Closes #370 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(web): operator creates new flow from canvas (NF-UI-10) (#370)
All checks were successful
qa / qa (pull_request) Successful in 5m52s
qa / dockerfile (pull_request) Successful in 12s
12812cba68
`/app/flows/new` now mounts FlowCanvas in `mode="create"` instead of the
NF-UI-1 stub. The toolbar exposes a trigger picker (over TRIGGER_KINDS),
an id input with `^[a-z0-9-]+$` format validation + 409 conflict surface,
a description textarea, and a Discard button that confirms when dirty.
The canvas seeds itself with one undeletable source node and routes the
first save through `flowsApi.createFlow` (POST /flows); on 201 the route
redirects to `/app/flows/:newId` and subsequent saves drop back to the
existing PATCH path.

12 new tests cover trigger dropdown population, id format validation,
save gating, dirty tracking on graph + toolbar edits, source-node
auto-seed + undeletability, the onCreate save shape, navigation on 201,
inline 409 + node-level 422 surfacing, discard confirmation, and the
beforeunload guard.

Closes #370

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
charles force-pushed feat/370-nfui10-create-from-canvas from 12812cba68
All checks were successful
qa / qa (pull_request) Successful in 5m52s
qa / dockerfile (pull_request) Successful in 12s
to cda672238b
All checks were successful
qa / qa (pull_request) Successful in 5m59s
qa / dockerfile (pull_request) Successful in 14s
2026-04-25 15:51:02 +00:00
Compare
claude-desktop scheduled this pull request to auto merge when all checks succeed 2026-04-25 15:51:10 +00:00
claude-desktop deleted branch feat/370-nfui10-create-from-canvas 2026-04-25 16:01:58 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!371
No description provided.