improvement(editor): fix React effect/state anti-patterns across the /w surface#5325
improvement(editor): fix React effect/state anti-patterns across the /w surface#5325waleedlatif1 wants to merge 3 commits into
Conversation
…/w surface Removes derived-state-in-effect, prop-sync effects, and event-logic-in-effect across the workflow editor in favor of render-phase adjustment, derived render values, and event-handler side effects. Stabilizes unstable references (memoization, module-scope hoists, state->ref for non-rendered values), fixes several stale-closure dependency bugs, and adds accessibility labels/roles. No behavior changes; typecheck and lint clean.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Copilot & mentions: context list syncing, past-chat reset on workflow change, combobox input mirroring selected labels, and message/local-buffer adoption move off mount-only effects where that could flash stale UI. Deploy & chat: Editor sub-blocks: repeated inline Misc: Reviewed by Cursor Bugbot for commit 71d3809. Configure here. |
Greptile SummaryThis PR refactors React state and effect patterns across the workflow editor. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (3): Last reviewed commit: "improvement(editor): convert new inline ..." | Re-trigger Greptile |
Addresses review feedback: the no-barrel-import cleanup introduced relative imports that violate the absolute-import rule and conflict with the repo's barrel convention. Reverts to absolute barrel imports (deploy-modal, general, chat hooks, connection-blocks, toolbar, search-groups).
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 14add6d. Configure here.
Replaces the multi-line // comment blocks introduced by this PR (render-phase adjustment rationale, derived-in-render notes) with concise TSDoc, per the repo's TSDoc-only comment convention. Comment-only; no code changes.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 71d3809. Configure here.
Summary
/wworkflow-editor surface (raised the react-doctor health score 24 → 49; errors 70 → 24)state→reffor values never rendered) and fixes several latent stale-closure dependency bugs (use-float-resizeresize constraints,use-wandconversation history, missingblockExecutionMap/workspaceIddeps)type="button"where safe; JS micro-optimizations (single-pass loops,Set/Maplookups)eslint-disables by fixing root causes)Type of Change
Testing
Tested manually.
tscclean, Biome clean. Every one of the 92 changed files was line-by-line audited by an independent adversarial reviewer for behavior equivalence — one mount-timing regression was caught and fixed before shipping.Checklist