Skip to content

feat(flows): surface automation flows (list + diagram)#64

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/wire-flow-viewer
Jun 1, 2026
Merged

feat(flows): surface automation flows (list + diagram)#64
xuyushun441-sys merged 1 commit into
mainfrom
feat/wire-flow-viewer

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

Summary

The FlowViewer component existed and was unit-tested but had no route into the app. This wires it up so automation flows are user-facing.

  • useFlows / useFlow hooks fetch flow definitions from /api/v1/meta/flow (react-query), normalizing nodes / edges / variables into the FlowViewer shape.
  • app/flows/index.tsx — lists every flow with trigger-type / status / step-count badges; loading, error (retry), and empty states.
  • app/flows/[name].tsx — renders the read-only FlowViewer diagram for a single flow plus its trigger/status/version/input metadata.
  • More tab gains an Automation → Flows entry; route registered in the root Stack.

Verification

  • ✅ In-browser against a local 7.5.0 server: 15 flows listed; "Lead Conversion Process" diagram renders Start → Conversion Details → Get Lead Record → Create Account → Create Contact with edge connectors + metadata badges.
  • ✅ New useFlows unit tests (normalization, label fallback, error path, single-flow selector) — 3 pass.
  • tsc --noEmit clean; full jest suite unchanged from baseline (1119 pass; 20 pre-existing snapshot failures, unrelated).

Notes

Read-only for now (diagram + metadata). Triggering / run-history could build on the same useFlows hook + the existing client.automation API in a follow-up.

🤖 Generated with Claude Code

The FlowViewer component existed and was unit-tested but had no route into
the app. Wire it up:

- useFlows / useFlow hooks fetch flow definitions from /api/v1/meta/flow
  (react-query), normalizing nodes/edges/variables into the FlowViewer shape.
- app/flows/index.tsx: lists every flow with trigger-type / status / step
  badges; loading, error (retry), and empty states.
- app/flows/[name].tsx: renders the read-only FlowViewer diagram for one flow
  plus its trigger/status/version/input metadata.
- More tab gains an "Automation → Flows" entry; route registered in the Stack.

Verified in-browser against a local 7.5.0 server (15 flows listed; Lead
Conversion Process diagram renders Start → … → Create Contact with edges).
Adds useFlows unit tests; typecheck clean; full jest suite unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@xuyushun441-sys xuyushun441-sys merged commit 32bebe8 into main Jun 1, 2026
1 of 4 checks passed
@xuyushun441-sys xuyushun441-sys deleted the feat/wire-flow-viewer branch June 1, 2026 18:55
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.

2 participants