Skip to content

🐛 Fix Workflow Not Rendering on Refresh on Slow CPUs - #418

Merged
MFA-X-AI merged 2 commits into
masterfrom
fahreza/fix-empty-canvas-bug
Jul 10, 2025
Merged

MFA-X-AI merged 2 commits into
masterfrom
fahreza/fix-empty-canvas-bug

Conversation

@MFA-X-AI

@MFA-X-AI MFA-X-AI commented Jul 4, 2025

Copy link
Copy Markdown
Member

Description

On the very first contentChanged event the handler only clears undo history and registers listeners - but for some reason it never called engine.setModel(). Which means that it would only render the default “Start/Finish” template until a second change event finally applies the updated model. Under heavy CPU throttling that second event can be delayed or even skipped, leaving us with a blank canvas.

(Hopefully this fixes things)

Pull Request Type

  • Xircuits Core (Jupyterlab Related changes)
  • Xircuits Canvas (Custom RD Related changes)
  • Xircuits Component Library
  • Xircuits Project Template
  • Testing Automation
  • Documentation
  • Others (Please Specify)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tests

Test Steps to Reproduce the Original Bug

  1. Open JupyterLab and load an existing .xircuits file that has more than just the default “Start” and “Finish” nodes.
  2. In Chrome DevTools, set CPU throttling to “Slow 6×”.
  3. Refresh the JupyterLab page (⌘R or F5).
  4. Observe that the canvas stays on the empty/default template (only “Start”/“Finish”), instead of rendering your saved nodes.

Verify the Fix

  1. With the same .xircuits file open and CPU still throttled at “Slow 6×”, refresh the page again.
  2. Confirm that immediately after reload, your custom nodes and connections are rendered (no blank “Start/Finish” only).
  3. Optionally toggle CPU throttling back to “No throttling” and repeat to ensure rendering remains correct.

Tested on? Specify Version.

  • Windows
  • Linux
  • Mac
  • Others (State here -> xxx )

Notes

Add if any.

@github-actions

github-actions Bot commented Jul 4, 2025

Copy link
Copy Markdown

Binder 👈 Launch a binder notebook on branch XpressAI/xircuits/fahreza/fix-empty-canvas-bug

@MFA-X-AI
MFA-X-AI merged commit 5897c5a into master Jul 10, 2025
@MFA-X-AI
MFA-X-AI deleted the fahreza/fix-empty-canvas-bug branch September 9, 2025 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant