feat(flows): surface automation flows (list + diagram)#64
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
FlowViewercomponent existed and was unit-tested but had no route into the app. This wires it up so automation flows are user-facing.useFlows/useFlowhooks fetch flow definitions from/api/v1/meta/flow(react-query), normalizingnodes/edges/variablesinto theFlowViewershape.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-onlyFlowViewerdiagram for a single flow plus its trigger/status/version/input metadata.Stack.Verification
Start → Conversion Details → Get Lead Record → Create Account → Create Contactwith edge connectors + metadata badges.useFlowsunit tests (normalization, label fallback, error path, single-flow selector) — 3 pass.tsc --noEmitclean; 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
useFlowshook + the existingclient.automationAPI in a follow-up.🤖 Generated with Claude Code