feat(web): flow list page — mock-first (NF-UI-1) #344

Merged
code-lead merged 1 commit from feat/331-nfui1-flow-list into main 2026-04-24 12:12:29 +00:00
Collaborator

Summary

  • New /app/flows route listing every configured flow with filters (trigger, repo pattern, enabled, source) and inline actions (Open / Toggle / Delete).
  • Mocked flowsApi backed by apps/web/src/fixtures/flows.json — shape-stable against the future GET /flows / POST /flows/:id/enable / DELETE /flows/:id that lands with NF-7.
  • Optimistic enable-toggle with rollback on 403; delete is refused for source === "default" (409 → info toast, row stays). Mutation affordances hide when useFlowAuth().isOperator === false.
  • Create flow CTA + stub pages at /app/flows/new and /app/flows/:flowId so NF-UI-2 / NF-UI-4 have targets.
  • Flows entry added to NAV_ITEMS in app-shell.tsx.

Test plan

  • bun x vitest run src/routes/flows.test.tsx — 8 component tests pass (filters, optimistic rollback on 403, delete refusal for defaults, delete success for operator-authored, auth-gated mutation hide, empty state).
  • bun x turbo run typecheck clean across all four workspaces.
  • bun x biome check clean on every touched file.
  • Manual smoke: /app/flows renders with fixture rows, filters narrow the list, stub pages reachable via Open / Create flow.

Out of scope

  • Real GET /flows server endpoint — lands with NF-7.
  • Flow-builder canvas at /app/flows/newNF-UI-2.
  • Flow-detail inspector at /app/flows/:flowIdNF-UI-2 + NF-UI-4.
  • Operator-authored flow editing UI — follows NF-UI-2.

Closes #331

## Summary - New `/app/flows` route listing every configured flow with filters (trigger, repo pattern, enabled, source) and inline actions (Open / Toggle / Delete). - Mocked `flowsApi` backed by `apps/web/src/fixtures/flows.json` — shape-stable against the future `GET /flows` / `POST /flows/:id/enable` / `DELETE /flows/:id` that lands with NF-7. - Optimistic enable-toggle with rollback on 403; delete is refused for `source === "default"` (409 → info toast, row stays). Mutation affordances hide when `useFlowAuth().isOperator === false`. - `Create flow` CTA + stub pages at `/app/flows/new` and `/app/flows/:flowId` so NF-UI-2 / NF-UI-4 have targets. - Flows entry added to `NAV_ITEMS` in `app-shell.tsx`. ## Test plan - [x] `bun x vitest run src/routes/flows.test.tsx` — 8 component tests pass (filters, optimistic rollback on 403, delete refusal for defaults, delete success for operator-authored, auth-gated mutation hide, empty state). - [x] `bun x turbo run typecheck` clean across all four workspaces. - [x] `bun x biome check` clean on every touched file. - [ ] Manual smoke: `/app/flows` renders with fixture rows, filters narrow the list, stub pages reachable via Open / Create flow. ## Out of scope - Real `GET /flows` server endpoint — lands with **NF-7**. - Flow-builder canvas at `/app/flows/new` — **NF-UI-2**. - Flow-detail inspector at `/app/flows/:flowId` — **NF-UI-2** + **NF-UI-4**. - Operator-authored flow editing UI — follows NF-UI-2. Closes #331
feat(web): flow list page — mock-first (NF-UI-1)
All checks were successful
qa / qa (pull_request) Successful in 4m23s
qa / dockerfile (pull_request) Successful in 9s
d4226b4c54
Adds /app/flows route that lists every configured flow with filters,
inline toggle / delete actions, and a stub `Create flow` CTA. Backed
by a mocked flowsApi reading from a local fixture — the real server
endpoint (GET /flows) lands with NF-7.

- Routes: flows (layout), flows.index (list), flows.new + flows.$flowId (stubs)
- FlowList component with filters (trigger, repo pattern, enabled, source)
- Optimistic toggle with rollback on 403
- Delete refused for source=default (409) with info toast
- Auth-gated mutations via useFlowAuth
- Tests: 8 component tests covering filters, toggle rollback, delete
  refusal, success path, auth gating, empty state

Closes #331

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
code-lead deleted branch feat/331-nfui1-flow-list 2026-04-24 12:12:32 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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!344
No description provided.