fix: add isGraphReady guard to prevent premature graph access error logs#9672
fix: add isGraphReady guard to prevent premature graph access error logs#9672
Conversation
Add isGraphReady getter to ComfyApp that checks graph initialization without triggering the ootGraph getter's error log. Replace guard checks in executionErrorStore's computed properties and watch callbacks with �pp.isGraphReady to prevent false 'ComfyApp graph accessed before initialization' errors during early store evaluation.
🎨 Storybook: ✅ Built — View Storybook |
🎭 Playwright: ✅ 554 passed, 0 failed · 3 flaky📊 Browser Reports
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughA new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📦 Bundle: 4.57 MB gzip 🟢 -73 BDetailsSummary
Category Glance App Entry Points — 28.9 kB (baseline 28.9 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 967 kB (baseline 967 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 72.4 kB (baseline 72.4 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed Panels & Settings — 436 kB (baseline 436 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed User & Accounts — 16.1 kB (baseline 16.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed Editors & Dialogs — 77.5 kB (baseline 77.5 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 56.5 kB (baseline 56.5 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed Data & Services — 2.77 MB (baseline 2.77 MB) • 🔴 +79 BStores, services, APIs, and repositories
Status: 14 added / 14 removed Utilities & Hooks — 56.8 kB (baseline 56.8 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 11 added / 11 removed Vendor & Third-Party — 8.88 MB (baseline 8.88 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 8.04 MB (baseline 8.04 MB) • ⚪ 0 BBundles that do not match a named category
Status: 50 added / 50 removed |
⚡ Performance Report
Raw data{
"timestamp": "2026-03-09T19:59:32.893Z",
"gitSha": "af5b95eabfb3e5d6402625c99384c9bccae89e24",
"branch": "fix/is-graph-ready-guard",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2034.716000000003,
"styleRecalcs": 126,
"styleRecalcDurationMs": 20.852000000000004,
"layouts": 1,
"layoutDurationMs": 0.273,
"taskDurationMs": 389.99699999999996,
"heapDeltaBytes": -3013276
},
{
"name": "canvas-idle",
"durationMs": 2007.222999999982,
"styleRecalcs": 121,
"styleRecalcDurationMs": 15.747000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 354.919,
"heapDeltaBytes": -4817972
},
{
"name": "canvas-idle",
"durationMs": 2030.036999999993,
"styleRecalcs": 124,
"styleRecalcDurationMs": 18.160000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 372.89300000000003,
"heapDeltaBytes": -3648728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2041.1900000000003,
"styleRecalcs": 184,
"styleRecalcDurationMs": 48.644,
"layouts": 12,
"layoutDurationMs": 3.2239999999999993,
"taskDurationMs": 1030.1039999999998,
"heapDeltaBytes": -3154228
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1776.2809999999831,
"styleRecalcs": 162,
"styleRecalcDurationMs": 41.412,
"layouts": 13,
"layoutDurationMs": 3.3040000000000003,
"taskDurationMs": 756.589,
"heapDeltaBytes": -2378840
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1799.5829999999842,
"styleRecalcs": 164,
"styleRecalcDurationMs": 40.273999999999994,
"layouts": 12,
"layoutDurationMs": 3.2990000000000004,
"taskDurationMs": 743.7230000000001,
"heapDeltaBytes": -3108388
},
{
"name": "dom-widget-clipping",
"durationMs": 577.0090000000039,
"styleRecalcs": 42,
"styleRecalcDurationMs": 11.184,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 358.221,
"heapDeltaBytes": 7774748
},
{
"name": "dom-widget-clipping",
"durationMs": 547.7779999999939,
"styleRecalcs": 40,
"styleRecalcDurationMs": 11.518,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 336.73199999999997,
"heapDeltaBytes": 7279752
},
{
"name": "dom-widget-clipping",
"durationMs": 531.3449999999875,
"styleRecalcs": 38,
"styleRecalcDurationMs": 11.326999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 333.97900000000004,
"heapDeltaBytes": 7141920
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 605.277000000001,
"styleRecalcs": 73,
"styleRecalcDurationMs": 12.929000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 398.271,
"heapDeltaBytes": -8897848
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 589.0639999999507,
"styleRecalcs": 73,
"styleRecalcDurationMs": 13.508000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 396.30899999999997,
"heapDeltaBytes": -8968968
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 583.0980000000068,
"styleRecalcs": 72,
"styleRecalcDurationMs": 13.961000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 391.569,
"heapDeltaBytes": 15247000
},
{
"name": "subgraph-idle",
"durationMs": 1993.9449999999965,
"styleRecalcs": 120,
"styleRecalcDurationMs": 17.156,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 355.302,
"heapDeltaBytes": -3411900
},
{
"name": "subgraph-idle",
"durationMs": 1991.7029999999727,
"styleRecalcs": 120,
"styleRecalcDurationMs": 16.836999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 364.46900000000005,
"heapDeltaBytes": -3618904
},
{
"name": "subgraph-idle",
"durationMs": 1992.3260000000482,
"styleRecalcs": 120,
"styleRecalcDurationMs": 17.836,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 358.17900000000003,
"heapDeltaBytes": -4333404
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1708.3749999999895,
"styleRecalcs": 155,
"styleRecalcDurationMs": 38.32299999999999,
"layouts": 16,
"layoutDurationMs": 3.7619999999999996,
"taskDurationMs": 679.454,
"heapDeltaBytes": -5094772
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1981.0550000000262,
"styleRecalcs": 171,
"styleRecalcDurationMs": 45.441,
"layouts": 16,
"layoutDurationMs": 4.25,
"taskDurationMs": 919.111,
"heapDeltaBytes": -5125428
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1707.4650000000133,
"styleRecalcs": 155,
"styleRecalcDurationMs": 38.622,
"layouts": 16,
"layoutDurationMs": 4.045999999999999,
"taskDurationMs": 670.0780000000001,
"heapDeltaBytes": -5744144
}
]
} |
…ogs (#9672) ## Summary Adds `isGraphReady` getter to `ComfyApp` and uses it in `executionErrorStore` guards to prevent false 'ComfyApp graph accessed before initialization' error logs during early store evaluation. ## Changes - **What**: Added `isGraphReady` boolean getter to `ComfyApp` that safely checks graph initialization without triggering the `rootGraph` getter's error log. Updated 5 guard sites in `executionErrorStore` to use `app.isGraphReady` instead of `app.rootGraph`. - **Why**: The `rootGraph` getter logs an error when accessed before initialization. Computed properties and watch callbacks in `executionErrorStore` are evaluated early (before graph init), causing false error noise in the console. ## Review Focus - `isGraphReady` is intentionally minimal — just `!!this.rootGraphInternal` — to avoid duplicating the error-logging behavior of `rootGraph` - The `watch(lastNodeErrors, ...)` callback now checks `isGraphReady` at the top and early-returns, consistent with the computed property pattern ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9672-fix-add-isGraphReady-guard-to-prevent-premature-graph-access-error-logs-31e6d73d365081be8e1fc77114ce9382) by [Unito](https://www.unito.io) Co-authored-by: Alexander Brown <drjkl@comfy.org>
Summary
Adds
isGraphReadygetter toComfyAppand uses it inexecutionErrorStoreguards to prevent false 'ComfyApp graph accessed before initialization' error logs during early store evaluation.Changes
isGraphReadyboolean getter toComfyAppthat safely checks graph initialization without triggering therootGraphgetter's error log. Updated 5 guard sites inexecutionErrorStoreto useapp.isGraphReadyinstead ofapp.rootGraph.rootGraphgetter logs an error when accessed before initialization. Computed properties and watch callbacks inexecutionErrorStoreare evaluated early (before graph init), causing false error noise in the console.Review Focus
isGraphReadyis intentionally minimal — just!!this.rootGraphInternal— to avoid duplicating the error-logging behavior ofrootGraphwatch(lastNodeErrors, ...)callback now checksisGraphReadyat the top and early-returns, consistent with the computed property pattern┆Issue is synchronized with this Notion page by Unito