Uh oh!
There was an error while loading. Please reload this page.
feat(studio): make the flow-canvas error banner clickable (reveal on click) - #1976
Merged
Conversation
The inline structural-error banner (ADR-0044 cycle surfacing) was display-only, duplicating the newer Problems-panel data via a separate `validationErrors` string[]. Drive it from the unified `problems` list instead and make each row with a concrete target a button: clicking selects + pans-to-reveal the offending node/edge (reusing the Problems panel's reveal handler), so the always-visible banner is actionable without opening the panel. The `validationErrors` prop + its duplicate validateFlowDraft-message derivation are removed; the red edge/node highlighting stays. Refs #1958 (ADR-0044 inline cycle surfacing). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang added a commit
that referenced
this pull request
Jun 24, 2026
…oblem list Follow-up to #1972 (Problems panel + badges) and #1976 (clickable banner). The flow preview still ran validateFlowDraft TWICE per render — once in buildFlowProblems (badges / banner / panel) and again in a separate memo that derived the red node/edge ring/stroke, with the cycle-highlight logic duplicated. buildFlowProblems is now the single validation pass: a new deriveInvalidElements(problems) produces the red error set (errors only; a cycle paints its whole loop via a per-problem `highlight` set, while its badge + reveal stay on the closing edge). The preview drops its second validateFlowDraft call. The clickable banner (#1976), badges, and panel are unchanged — all four surfaces now derive from one list, so they cannot drift. Browser-verified on showcase_budget_approval (injected an un-declared cycle by flipping the resubmit back-edge → normal): clickable banner, edge badge, full-loop red paint (4 elements), and Problems count all in lock-step; reverting clears all. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
os-zhuang added a commit
that referenced
this pull request
Jun 24, 2026
…oblem list (#1977) Follow-up to #1972 (Problems panel + badges) and #1976 (clickable banner). The flow preview still ran validateFlowDraft TWICE per render — once in buildFlowProblems (badges / banner / panel) and again in a separate memo that derived the red node/edge ring/stroke, with the cycle-highlight logic duplicated. buildFlowProblems is now the single validation pass: a new deriveInvalidElements(problems) produces the red error set (errors only; a cycle paints its whole loop via a per-problem `highlight` set, while its badge + reveal stay on the closing edge). The preview drops its second validateFlowDraft call. The clickable banner (#1976), badges, and panel are unchanged — all four surfaces now derive from one list, so they cannot drift. Browser-verified on showcase_budget_approval (injected an un-declared cycle by flipping the resubmit back-edge → normal): clickable banner, edge badge, full-loop red paint (4 elements), and Problems count all in lock-step; reverting clears all. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 24, 2026
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 freeto 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.
What & why
The inline structural-error banner on the flow canvas (ADR-0044 cycle surfacing, #1958) was display-only. Since then a full Problems panel landed — clickable rows that select + pan-to-reveal the offending node/edge — but the always-visible canvas banner still just showed text via a separate
validationErrors: string[], duplicating the panel's data.Change
problemslist and make each row with a concrete target a button. Clicking it calls the sameonSelectProblem/reveal handler the Problems panel uses (onRevealProblem), so it selects and pans-to-center the offending node/edge. Flow-level problems (no specific element) stay non-clickable.validationErrorsprop and its duplicatevalidateFlowDraftmessage-mapping inFlowPreview. The banner, Problems panel, and on-canvas badges now share one source (buildFlowProblems). The red edge/node highlighting (its owninvalidNodeIds/invalidEdges) is unchanged.Verification
FlowCanvastests 4 passing (banner renders fromproblems; click →onRevealProblemcalled with the problem; warnings excluded from the banner; clean flow → no banner/markers).type-check0 errors;eslint0 errors (3 pre-existing warnings untouched).🤖 Generated with Claude Code