Skip to content

fix(apollo-react): disable status glow during node drag#820

Draft
SreedharAvvari wants to merge 1 commit into
mainfrom
codex/disable-status-glow-during-drag
Draft

fix(apollo-react): disable status glow during node drag#820
SreedharAvvari wants to merge 1 commit into
mainfrom
codex/disable-status-glow-during-drag

Conversation

@SreedharAvvari

Copy link
Copy Markdown
Contributor

Summary

  • add a canvas-level drag flag on BaseCanvas while any design-mode node drag is active
  • pause all .animate-glow status chrome inside that canvas during node drag while keeping static status borders visible
  • add a large LoopNode stress story with nested loops, many child nodes, and animated node statuses for performance testing
  • add a focused BaseCanvas test for the drag flag lifecycle

Why

Animated status glow is driven by box-shadow, which is paint-heavy when many nodes are visible. During node drag, React Flow is already doing transforms, edge updates, and hit testing, so pausing all status glow in the active canvas reduces unnecessary paint/style work without changing node status semantics.

Validation

  • pnpm --dir packages/apollo-react exec biome check src/canvas/components/BaseCanvas/BaseCanvas.tsx src/canvas/components/BaseCanvas/BaseCanvas.test.tsx src/canvas/components/LoopNode/LoopNode.stories.tsx src/canvas/styles/reactflow-reset.css
    • passed with existing warnings in the touched test/CSS files
  • pnpm --dir packages/apollo-react exec vitest run src/canvas/components/BaseCanvas/BaseCanvas.test.tsx
  • pnpm --dir packages/apollo-react exec tsc --noEmit --pretty false
  • Playwright MCP verified the animated stress story: idle visible glows animate, all visible glows are disabled while a node is dragged, and glow is restored after drag

Copilot AI review requested due to automatic review settings June 14, 2026 17:56
@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-design 🟢 Ready Preview, Logs Jun 14, 2026, 11:02:16 AM
apollo-docs 🟢 Ready Preview, Logs Jun 14, 2026, 11:02:16 AM
apollo-landing 🟢 Ready Preview, Logs Jun 14, 2026, 11:02:16 AM
apollo-vertex 🟢 Ready Preview, Logs Jun 14, 2026, 11:02:16 AM

@github-actions

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1922 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1692
ISC 89
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces canvas rendering overhead during design-mode node drags by introducing a canvas-level “node dragging” flag and using it to temporarily disable the animated status glow (box-shadow based) while dragging. It also adds a large LoopNode stress story to help profile this scenario and a focused BaseCanvas test to validate the drag-flag lifecycle.

Changes:

  • Track design-mode node drag lifecycle in BaseCanvas and expose it via data-canvas-node-dragging.
  • Pause animate-glow status chrome (animation/box-shadow) inside the active canvas while a node is being dragged.
  • Add an “Animated Status Stress” LoopNode story plus a BaseCanvas test for the new flag.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/apollo-react/src/canvas/styles/reactflow-reset.css Disables .animate-glow animation/box-shadow while the canvas drag flag is set.
packages/apollo-react/src/canvas/components/LoopNode/LoopNode.stories.tsx Adds an animated-status stress story and optional status-context overrides for the story wrapper.
packages/apollo-react/src/canvas/components/BaseCanvas/BaseCanvas.tsx Introduces drag state tracking and attaches data-canvas-node-dragging to the ReactFlow root.
packages/apollo-react/src/canvas/components/BaseCanvas/BaseCanvas.test.tsx Adds a unit test to ensure the drag flag is set/unset during drag start/stop.

onSelectionChange={onSelectionChange}
style={reactFlowStyle}
elevateEdgesOnSelect={isDesignMode}
data-canvas-node-dragging={isNodeDragging || undefined}
Comment on lines +331 to +350
if (executionState || validationState) {
return (
<ExecutionStatusContext.Provider
value={
executionState ?? {
getNodeExecutionState: () => undefined,
getEdgeExecutionState: () => undefined,
}
}
>
<ValidationStatusContext.Provider
value={validationState ?? { getElementValidationState: () => undefined }}
>
{canvas}
</ValidationStatusContext.Provider>
</ExecutionStatusContext.Provider>
);
}

return canvas;
@SreedharAvvari SreedharAvvari changed the title [codex] Disable status glow during node drag fix(apollo-react): disable status glow during node drag Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-react size:XL 500-999 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants