chore(web): swap flowsApi mock for real NF-7 endpoints #366
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#366
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Switch
apps/web/src/features/flows/flowsApi.tsfrom the seed-fixture mocks to real server endpoints, now that NF-7 (#363) landed thePOST /flows/PATCH /flows/:id/POST /flows/:id/dry-run/POST /flows/:id/enable|disable/DELETE /flows/:id/POST /flows/:id/revert/GET /flows/:id/versionssurface.Scope
Mechanical swap — the existing function signatures (
list,getFlow,setEnabled,remove,updateFlow,getMode,listRuns,getRun) are already shaped like the server routes. Replace each mock body with afetchcall, keep the signatures identical.Endpoints to wire
list()→GET /flowsgetFlow(id, version?)→GET /flows/:id(current) orGET /flows/:id/versions/:versionwhenversionis setupdateFlow(id, body)→PATCH /flows/:id(POST when the flow is new — branch on a localisNewbit or fall back to POST→404→PATCH)setEnabled(id, enabled)→POST /flows/:id/enableor/disableremove(id)→DELETE /flows/:idgetMode()→GET /flows/mode(endpoint ships with NF-7; verify)listRuns(opts)→GET /flows/runs?limit&before&flowIdgetRun(runId)→GET /flows/runs/:idWhat to keep
FlowValidationError/FlowsApiError— already parallel the server's 422/403/404 responses.FlowSummary,FlowRunSummary,FlowNodeRun, etc.) — server mirror is already in sync.flowsApivia dependency injection continue to work — they bypass fetch.What to drop
apps/web/src/fixtures/flows.json,flow-graphs.json,flow-runs.json,flow-config.json) — keep them as test fixtures but stop importing them from productionflowsApi.graphStore,flowRunsStore, etc.) — gone entirely once fetch replaces them.Acceptance
flowsApi.tsfetches every endpoint against/flows/*on the same host.fetchinstead of the in-memory store.bun x turbo run typecheck+bun x biome checkclean.Out of scope
GET /flows/:id/versionswhich already ships.References
specs/node-flows.md+specs/node-flows-ui.md.Dependencies