Uh oh!
There was an error while loading. Please reload this page.
refactor(studio): one validateFlowDraft pass — derive red-error highlight from the unified problem list - #1977
Merged
Merged
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
…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-zhuangforce-pushed
the
feat/flow-problems-unify
branch
from
June 24, 2026 15:54
03adc48 to
32f71f7CompareUh oh!
There was an error while loading. Please reload this page.
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Follow-up to #1972 (Problems panel + badges) and #1976 (clickable banner).
Why
After #1976 the inline banner, badges, and panel all read the unified
problemslist — but the flow preview still ranvalidateFlowDrafttwice per render: once insidebuildFlowProblems, and again in a separate memo that derived the red node/edge ring/stroke, with the cycle-highlight logic duplicated between them.What
buildFlowProblemsis now the single source. A newderiveInvalidElements(problems)produces the red error set (errors only — warnings get an amber badge, no ring).highlightset (every hop node + edge) so the whole loop reads red, while its badge + click-reveal stay on the closing edge.validateFlowDraftcall.Verification
pnpm --filter @object-ui/app-shell build(tsc) — clean.vitest— 18 pass (addedderiveInvalidElementscases: full-cycle red set, warnings excluded).@object-ui/app-shellpatch).🤖 Generated with Claude Code