UX-1338 — Redpanda Connect Pipeline (RPCN) Visual View & Editor#2553
UX-1338 — Redpanda Connect Pipeline (RPCN) Visual View & Editor#2553SpicyPete wants to merge 5 commits into
Conversation
✅ Clean — no registry drift, off-token colours, or ad-hoc classesApp:
Generated by lookout audit-changes. |
|
@claude review |
|
Claude finished @SpicyPete's task in 1m 24s —— View job Code Review — UX-1338 RPCN Visual EditorReviewed across 5 parallel passes (parser/layout, canvas, inspector/store, yaml/utils, panels/shared-UI). This is a large but carefully written PR — effect cleanup, undo/redo, the save-flush path, and the shared-UI signature changes all check out. Below are the findings worth acting on, most impactful first. 🟠 Correctness1. const inputType = Object.keys(inputObj)[0]; // ← should be firstKey(inputObj)Everywhere else in this file uses 2. Switch-case condition draft leaks across sibling cases → silent misrouting — const initial = typeof caseObject.check === 'string' ? caseObject.check : '';
const [check, setCheck] = useState(initial);
useEffect(() => setCheck(initial), [initial]); // only resyncs when the primitive value changes
3. 🟡 Performance (large graphs)4. Scope-region work re-runs on pan/zoom and hover —
Fix direction: derive 🟢 Minor / nits
Also worth noting the PR's own stated deferral: the delete-guard for nodes with dependents is still a TODO, and Nothing here is a merge-blocker for a feature-flagged surface, but I'd fix #1 and #2 before wider rollout — both silently corrupt/misroute saved config. Nice work on the parser test coverage and the paint-cap tiling. |
|
#2554 |
Summary
Adds a full visual editor for Redpanda Connect (RPCN) pipelines: an interactive, node-based canvas that renders a pipeline's YAML as a directed graph and lets you inspect and edit nodes without hand-writing YAML. It sits alongside the existing YAML editor as a new "Visual" lane.
The editor is feature-flagged and currently scoped to the embedded (Cloud) context — it activates only when
enableRpcnVisualEditorandenablePipelineDiagramsare on and the page is embedded. When enabled, editing opens on the Visual lane by default; otherwise the experience is unchanged (YAML lane).What's included
Canvas & layout
pipeline-flow-canvas.tsx,pipeline-flow-canvas-nodes.tsx) — renders the pipeline as a left-to-right DAG using React Flow + Dagre (@dagrejs/dagre, new dependency): input → processors → output, with control-flow constructs (switch,branch,try/catch,broker,fallback) drawn as split → case-lanes → merge, plus conditional/error/reference edge styling.pipeline-flow-parser.ts,pipeline-flow-meta.ts) — parses pipeline YAML into a flow tree and computes the layout with source-aligned ranks. Replaces the old sidebar diagram (pipeline-flow-diagram.tsxremoved).Editing
node-inspector.tsx,node-config-form.tsx) — side panel to view/edit a selected node's config via Registry Field forms (react-hook-form + Zod), drill into control-flow children (switch cases / steps), and edit a node's raw YAML in place.use-pipeline-editor-store.ts) — Zustand store with undo/redo; pending visual edits are flushed to YAML at save time.pipeline-canvas-command-palette.tsx,onboarding/connect-command-palette.tsx,component-aliases.ts) — quick actions (view in YAML, undo/redo, jump to node) and a connector/processor inserter with curated defaults, alias-aware search (e.g. "queue" →kafka_franz), and de-emphasis of deprecated/experimental components.Feedback surfaces
pipeline-structure-tree.tsx) — sidebar outline in document order with collapsible groups, roving-tabindex keyboard navigation, and click-to-reveal.pipeline-problems-panel.tsx,pipeline-lint.ts) — floating chip listing lint problems (mapped from backendLintHints by YAML line range, merged with save-error hints) and detected secret references; click a problem to jump to its node.pipeline-unsaved-panel.tsx,pipeline-diff.ts) — floating chip listing nodes whose config differs from the last save (signature-based diff); click to jump.editor-tips-bar.tsx,template-cta.tsx) — platform-aware keyboard-shortcut hints and a "start from a template" entry point for empty pipelines.Testing
Unit + integration tests accompany the new modules — flow parser/layout, lint mapping, dirty-diff, canvas render (incl. tall-region paint-cap), inspector, config form, structure tree, problems/unsaved panels, and command palettes.
type:check,lint, and the test suite are green.Known limitations / deferrals
How to test
Enable
enableRpcnVisualEditor+enablePipelineDiagrams, open a pipeline in the embedded editor, and confirm the Visual lane loads. Verify node selection/edit, undo/redo, save round-trips to YAML, and the problems/unsaved chips.Screenshots
Sidelane / YAML enhancements
Visual view