Repository navigation
refactor: inject the api auth provider from the composition root - #19118
Conversation
🎭 Playwright: ✅ 2248 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 18a9c4210382fab896a7e00c7db5b141cefadef6
Full docs: ADR-DEVEX-LINT-0015 🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md 📦 Bundle: 9.36 MB gzip 🟢 -1.16 kBDetailsSummary
Category Glance App Entry Points — 4.57 kB (baseline 4.53 kB) • 🔴 +42 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 2.15 MB (baseline 2.15 MB) • 🔴 +65 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 154 kB (baseline 154 kB) • 🟢 -5 BTop-level views, pages, and routed surfaces
Status: 12 added / 12 removed / 7 unchanged Panels & Settings — 671 kB (baseline 671 kB) • 🟢 -58 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 19 unchanged User & Accounts — 54.3 kB (baseline 54.6 kB) • 🟢 -235 BAuthentication, profile, and account management bundles
Status: 6 added / 7 removed / 8 unchanged Editors & Dialogs — 339 kB (baseline 339 kB) • 🔴 +42 BModals, dialogs, drawers, and in-app editors
Status: 9 added / 9 removed / 4 unchanged UI Components — 201 kB (baseline 201 kB) • ⚪ 0 BReusable component library chunks
Status: 7 added / 7 removed / 17 unchanged Data & Services — 3.06 MB (baseline 3.06 MB) • 🟢 -3.47 kBStores, services, APIs, and repositories
Status: 18 added / 18 removed / 4 unchanged Utilities & Hooks — 819 kB (baseline 819 kB) • 🔴 +98 BHelpers, composables, and utility bundles
Status: 22 added / 22 removed / 31 unchanged Vendor & Third-Party — 14.2 MB (baseline 14.2 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 18.8 MB (baseline 18.8 MB) • 🔴 +525 BBundles that do not match a named category
Status: 96 added / 96 removed / 252 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-10-09T02:46:26.735Z",
"gitSha": "f8b784cdb0d58a314ae7c74207dae9433f5ce81e",
"branch": "drjkl/api-auth-provider",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2020.0120000000084,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.7310000000000008,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 427.5399999999999,
"heapDeltaBytes": 5525024,
"heapUsedBytes": 62357732,
"domNodes": 0,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 7.710999999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2019.7839999999587,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.7860000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 302.725,
"heapDeltaBytes": 5507492,
"heapUsedBytes": 62000336,
"domNodes": 0,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 7.210000000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1722.0350000000053,
"styleRecalcs": 73,
"styleRecalcDurationMs": 14.008999999999999,
"layouts": 12,
"layoutDurationMs": 3.319,
"taskDurationMs": 764.871,
"heapDeltaBytes": 936448,
"heapUsedBytes": 57721952,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 145.05300000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666019417475724,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1699.0049999999428,
"styleRecalcs": 72,
"styleRecalcDurationMs": 14.179000000000002,
"layouts": 12,
"layoutDurationMs": 3.5100000000000002,
"taskDurationMs": 659.425,
"heapDeltaBytes": 984632,
"heapUsedBytes": 57462164,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 150.25,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66568627450981,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1722.2679999999855,
"styleRecalcs": 20,
"styleRecalcDurationMs": 6.105999999999999,
"layouts": 3,
"layoutDurationMs": 0.588,
"taskDurationMs": 360.055,
"heapDeltaBytes": -36889804,
"heapUsedBytes": 61512784,
"domNodes": -172,
"jsHeapTotalBytes": -262144,
"scriptDurationMs": 8.831999999999999,
"eventListeners": -87,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846156,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1694.0100000000484,
"styleRecalcs": 18,
"styleRecalcDurationMs": 5.389000000000001,
"layouts": 3,
"layoutDurationMs": 0.6809999999999999,
"taskDurationMs": 330.68499999999995,
"heapDeltaBytes": 6421468,
"heapUsedBytes": 63009136,
"domNodes": 45,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 8.617999999999997,
"eventListeners": 39,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 617.7959999999985,
"styleRecalcs": 12,
"styleRecalcDurationMs": 2.7030000000000007,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 448.519,
"heapDeltaBytes": 17430964,
"heapUsedBytes": 73912160,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 163.567,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667567567567588,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 598.5470000000532,
"styleRecalcs": 13,
"styleRecalcDurationMs": 3.0289999999999986,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 443.835,
"heapDeltaBytes": 17112948,
"heapUsedBytes": 73742448,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 167.072,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66857142857142,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1133.9469999999778,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 733.725,
"heapDeltaBytes": 16181176,
"heapUsedBytes": 98200712,
"domNodes": 0,
"jsHeapTotalBytes": 1998848,
"scriptDurationMs": 59.95499999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 499,
"frameDurationMs": 33.332352941176474,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1146.5420000000677,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 801.4180000000001,
"heapDeltaBytes": 16130964,
"heapUsedBytes": 98056524,
"domNodes": 0,
"jsHeapTotalBytes": 1998848,
"scriptDurationMs": 63.32599999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 512,
"frameDurationMs": 33.82058823529411,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 862.2480000000223,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 476.74700000000047,
"heapDeltaBytes": 20497484,
"heapUsedBytes": 108420032,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 157.47499999999997,
"eventListeners": 0,
"totalBlockingTimeMs": 216,
"frameDurationMs": 24.76000000000001,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 861.6070000000491,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 485.27899999999977,
"heapDeltaBytes": 20237920,
"heapUsedBytes": 98911168,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 172.389,
"eventListeners": 0,
"totalBlockingTimeMs": 228,
"frameDurationMs": 25.488235294117658,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 9455.955000000016,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8650.209,
"heapDeltaBytes": 14281292,
"heapUsedBytes": 87634768,
"domNodes": -141,
"jsHeapTotalBytes": -14290944,
"scriptDurationMs": 7060.71,
"eventListeners": -65,
"totalBlockingTimeMs": 570,
"frameDurationMs": 31.924324324324324,
"p95FrameDurationMs": 50.099999999999454
},
{
"name": "extension-clean-combined-draw",
"durationMs": 8584.503999999924,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7792.499000000001,
"heapDeltaBytes": 11666136,
"heapUsedBytes": 94755928,
"domNodes": 0,
"jsHeapTotalBytes": -21233664,
"scriptDurationMs": 6572.276000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 425,
"frameDurationMs": 32.63460076045627,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 8360.578999999972,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7557.336,
"heapDeltaBytes": -2028232,
"heapUsedBytes": 81098516,
"domNodes": 0,
"jsHeapTotalBytes": -21757952,
"scriptDurationMs": 6361.749000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 372,
"frameDurationMs": 32.74392156862746,
"p95FrameDurationMs": 50.099999999998545
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 8531.69600000001,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.42299999999999977,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7783.442,
"heapDeltaBytes": 2869464,
"heapUsedBytes": 75074692,
"domNodes": -140,
"jsHeapTotalBytes": -12718080,
"scriptDurationMs": 6582.023,
"eventListeners": -47,
"totalBlockingTimeMs": 538,
"frameDurationMs": 32.81884615384615,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "large-combo-open",
"durationMs": 188.84400000001733,
"styleRecalcs": 23,
"styleRecalcDurationMs": 15.111999999999998,
"layouts": 5,
"layoutDurationMs": 1.601,
"taskDurationMs": 142.37199999999999,
"heapDeltaBytes": 12148560,
"heapUsedBytes": 77581492,
"domNodes": 918,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 7.664999999999998,
"eventListeners": 202,
"totalBlockingTimeMs": 0,
"frameDurationMs": 22.912500000000023,
"p95FrameDurationMs": 66.69999999999982
},
{
"name": "large-combo-open",
"durationMs": 183.38700000003882,
"styleRecalcs": 23,
"styleRecalcDurationMs": 15.572000000000003,
"layouts": 5,
"layoutDurationMs": 1.4989999999999999,
"taskDurationMs": 141.804,
"heapDeltaBytes": 12074504,
"heapUsedBytes": 77680116,
"domNodes": 918,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 7.834999999999998,
"eventListeners": 202,
"totalBlockingTimeMs": 0,
"frameDurationMs": 22.912500000000023,
"p95FrameDurationMs": 66.80000000000018
},
{
"name": "large-graph-idle",
"durationMs": 2008.1579999999803,
"styleRecalcs": 9,
"styleRecalcDurationMs": 3.2359999999999993,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 511.514,
"heapDeltaBytes": -2439520,
"heapUsedBytes": 77656524,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 27.791000000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2046.6659999999592,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.9139999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 408.38400000000007,
"heapDeltaBytes": -44422936,
"heapUsedBytes": 85356824,
"domNodes": -313,
"jsHeapTotalBytes": -1933312,
"scriptDurationMs": 27.653,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2163.891000000035,
"styleRecalcs": 69,
"styleRecalcDurationMs": 6.480000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1524.137,
"heapDeltaBytes": -3018644,
"heapUsedBytes": 89707084,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 800.3480000000001,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.794573643410853,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2167.935000000057,
"styleRecalcs": 66,
"styleRecalcDurationMs": 5.325999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1477.137,
"heapDeltaBytes": 14992828,
"heapUsedBytes": 80922900,
"domNodes": 0,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 762.1790000000001,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665891472868214,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3332.4100000000385,
"styleRecalcs": 70,
"styleRecalcDurationMs": 6.710000000000001,
"layouts": 60,
"layoutDurationMs": 9.117999999999999,
"taskDurationMs": 1555.5559999999998,
"heapDeltaBytes": 8880072,
"heapUsedBytes": 75551632,
"domNodes": 24,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 719.1149999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666499999999996,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3450.772000000029,
"styleRecalcs": 70,
"styleRecalcDurationMs": 6.536999999999999,
"layouts": 60,
"layoutDurationMs": 8.991,
"taskDurationMs": 1600.557,
"heapDeltaBytes": 5179320,
"heapUsedBytes": 72222928,
"domNodes": -289,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 742.382,
"eventListeners": -126,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.747087378640778,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 2458.1719999999905,
"styleRecalcs": 43,
"styleRecalcDurationMs": 4.294,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1568.571,
"heapDeltaBytes": 17697376,
"heapUsedBytes": 85470372,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 889.236,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.78082191780822,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 2653.9439999999104,
"styleRecalcs": 42,
"styleRecalcDurationMs": 3.949000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1770.3339999999998,
"heapDeltaBytes": 16991752,
"heapUsedBytes": 85192492,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 902.9430000000001,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.771518987341775,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2044.204000000036,
"styleRecalcs": 8,
"styleRecalcDurationMs": 5.577,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 393.4929999999999,
"heapDeltaBytes": -47771852,
"heapUsedBytes": 85718416,
"domNodes": -313,
"jsHeapTotalBytes": -2981888,
"scriptDurationMs": 26.977999999999994,
"eventListeners": -126,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2009.078000000045,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.929000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 506.17599999999993,
"heapDeltaBytes": 23006020,
"heapUsedBytes": 93536928,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 27.563000000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 545.043000000021,
"styleRecalcs": 46,
"styleRecalcDurationMs": 4.589000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 337.30100000000004,
"heapDeltaBytes": 13192556,
"heapUsedBytes": 70364948,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 141.39300000000003,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.668750000000017,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 551.1359999999286,
"styleRecalcs": 45,
"styleRecalcDurationMs": 4.5649999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 340.22700000000003,
"heapDeltaBytes": 13247956,
"heapUsedBytes": 70251760,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 141.34400000000002,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2041.0889999999995,
"styleRecalcs": 9,
"styleRecalcDurationMs": 3.2329999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 458.61600000000004,
"heapDeltaBytes": -39183276,
"heapUsedBytes": 61927096,
"domNodes": -235,
"jsHeapTotalBytes": -1835008,
"scriptDurationMs": 7.046,
"eventListeners": -172,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66639344262295,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2014.538000000016,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.456999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 432.1889999999999,
"heapDeltaBytes": 5480236,
"heapUsedBytes": 62416372,
"domNodes": 0,
"jsHeapTotalBytes": 1572864,
"scriptDurationMs": 6.626,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666942148760327,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1696.1450000000013,
"styleRecalcs": 77,
"styleRecalcDurationMs": 13.888,
"layouts": 16,
"layoutDurationMs": 4.361999999999999,
"taskDurationMs": 718.3660000000001,
"heapDeltaBytes": 23903124,
"heapUsedBytes": 80729476,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 98.82,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1688.492999999994,
"styleRecalcs": 76,
"styleRecalcDurationMs": 14.373000000000001,
"layouts": 16,
"layoutDurationMs": 4.0809999999999995,
"taskDurationMs": 589.8090000000001,
"heapDeltaBytes": 23897660,
"heapUsedBytes": 80802088,
"domNodes": 0,
"jsHeapTotalBytes": 2097152,
"scriptDurationMs": 99.833,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666336633663366,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1384.6479999999701,
"styleRecalcs": 18,
"styleRecalcDurationMs": 28.254999999999995,
"layouts": 5,
"layoutDurationMs": 14.565000000000001,
"taskDurationMs": 896.2169999999999,
"heapDeltaBytes": 33899112,
"heapUsedBytes": 112005516,
"domNodes": 14650,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 28.898,
"eventListeners": 2456,
"totalBlockingTimeMs": 131,
"frameDurationMs": 19.44305555555555,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8241.729999999961,
"styleRecalcs": 250,
"styleRecalcDurationMs": 17.038,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5416.610000000001,
"heapDeltaBytes": -38907388,
"heapUsedBytes": 85968152,
"domNodes": -313,
"jsHeapTotalBytes": -2789376,
"scriptDurationMs": 2566.284,
"eventListeners": -124,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66599190283401,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8236.766999999985,
"styleRecalcs": 248,
"styleRecalcDurationMs": 16.65,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4725.13,
"heapDeltaBytes": -48504344,
"heapUsedBytes": 81958312,
"domNodes": -313,
"jsHeapTotalBytes": -1740800,
"scriptDurationMs": 2597.842,
"eventListeners": -124,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.733739837398378,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 16955.084999999995,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16306.653999999999,
"heapDeltaBytes": -47013720,
"heapUsedBytes": 183869200,
"domNodes": -3046,
"jsHeapTotalBytes": 6602752,
"scriptDurationMs": 233.79400000000004,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 29.172633390705677,
"p95FrameDurationMs": 66.59999999999854
},
{
"name": "vue-large-graph-idle",
"durationMs": 17126.853000000097,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16364.601999999997,
"heapDeltaBytes": -15591512,
"heapUsedBytes": 186262004,
"domNodes": -3046,
"jsHeapTotalBytes": 8699904,
"scriptDurationMs": 236.18799999999996,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 29.108673469387757,
"p95FrameDurationMs": 66.59999999999854
},
{
"name": "vue-large-graph-pan",
"durationMs": 15625.267000000007,
"styleRecalcs": 77,
"styleRecalcDurationMs": 6.762000000000018,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15010.116,
"heapDeltaBytes": -23803220,
"heapUsedBytes": 190743188,
"domNodes": -3047,
"jsHeapTotalBytes": 12398592,
"scriptDurationMs": 776.1120000000001,
"eventListeners": -14913,
"totalBlockingTimeMs": 3,
"frameDurationMs": 27.965652951699465,
"p95FrameDurationMs": 66.60000000000218
},
{
"name": "vue-large-graph-pan",
"durationMs": 21725.19,
"styleRecalcs": 178,
"styleRecalcDurationMs": 12.481999999999992,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21302.738,
"heapDeltaBytes": -37724844,
"heapUsedBytes": 190336896,
"domNodes": -3046,
"jsHeapTotalBytes": 10027008,
"scriptDurationMs": 871.3629999999999,
"eventListeners": -14913,
"totalBlockingTimeMs": 50,
"frameDurationMs": 39.58542805100182,
"p95FrameDurationMs": 83.30000000000291
},
{
"name": "vue-node-resize-workload",
"durationMs": 4580.356999999993,
"styleRecalcs": 20,
"styleRecalcDurationMs": 72.33600000000001,
"layouts": 20,
"layoutDurationMs": 20.706000000000003,
"taskDurationMs": 4369.558999999999,
"heapDeltaBytes": -2671772,
"heapUsedBytes": 214738252,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 77.263,
"eventListeners": 0,
"totalBlockingTimeMs": 18,
"frameDurationMs": 27.443712574850302,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "vue-node-resize-workload",
"durationMs": 6361.609000000044,
"styleRecalcs": 20,
"styleRecalcDurationMs": 73.231,
"layouts": 20,
"layoutDurationMs": 20.877999999999993,
"taskDurationMs": 6188.661,
"heapDeltaBytes": 4914004,
"heapUsedBytes": 220965260,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 99.425,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 37.44941176470587,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8743.39299999997,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8365.891,
"heapDeltaBytes": -41902116,
"heapUsedBytes": 183384844,
"domNodes": -3046,
"jsHeapTotalBytes": 1679360,
"scriptDurationMs": 187.13400000000007,
"eventListeners": -14915,
"totalBlockingTimeMs": 22,
"frameDurationMs": 29.207357859531772,
"p95FrameDurationMs": 66.69999999999709
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6256.16100000002,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5701.777999999999,
"heapDeltaBytes": -35632724,
"heapUsedBytes": 189802708,
"domNodes": -3046,
"jsHeapTotalBytes": 7446528,
"scriptDurationMs": 88.55999999999997,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 20.76345514950166,
"p95FrameDurationMs": 33.39999999999782
},
{
"name": "workflow-execution",
"durationMs": 124.73499999998694,
"styleRecalcs": 9,
"styleRecalcDurationMs": 11.54,
"layouts": 3,
"layoutDurationMs": 0.7180000000000001,
"taskDurationMs": 76.88400000000001,
"heapDeltaBytes": 4252860,
"heapUsedBytes": 64672664,
"domNodes": 101,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.573000000000001,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.671428571428546,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "workflow-execution",
"durationMs": 111.41799999995783,
"styleRecalcs": 8,
"styleRecalcDurationMs": 9.637,
"layouts": 3,
"layoutDurationMs": 1.211,
"taskDurationMs": 75.971,
"heapDeltaBytes": 4158612,
"heapUsedBytes": 60427088,
"domNodes": 98,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.233000000000001,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 785.6259999999793,
"styleRecalcs": 77,
"styleRecalcDurationMs": 83.194,
"layouts": 76,
"layoutDurationMs": 16.541,
"taskDurationMs": 750.164,
"heapDeltaBytes": 17312928,
"heapUsedBytes": 88638552,
"domNodes": 77,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 324.697,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66808510638297,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 692.5800000000208,
"styleRecalcs": 77,
"styleRecalcDurationMs": 75.881,
"layouts": 76,
"layoutDurationMs": 15.16,
"taskDurationMs": 649.6990000000001,
"heapDeltaBytes": 16251984,
"heapUsedBytes": 90750912,
"domNodes": 77,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 266.53900000000004,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 1281.2129999999797,
"styleRecalcs": 77,
"styleRecalcDurationMs": 230.984,
"layouts": 76,
"layoutDurationMs": 18.067,
"taskDurationMs": 1253.9260000000002,
"heapDeltaBytes": 9849364,
"heapUsedBytes": 120725672,
"domNodes": 77,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 429.15000000000003,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66493506493506,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 1342.8440000000137,
"styleRecalcs": 77,
"styleRecalcDurationMs": 234.881,
"layouts": 76,
"layoutDurationMs": 18.134999999999998,
"taskDurationMs": 1301.941,
"heapDeltaBytes": 10245648,
"heapUsedBytes": 121575116,
"domNodes": 77,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 456.54200000000003,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.875,
"p95FrameDurationMs": 16.799999999999272
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🔗 Website PreviewWebsite Preview: https://comfy-website-preview-pr-19118.vercel.app Models is built and gated by PostHog (workshop-enabled), using staging Cloud. This commit: https://website-frontend-7zzqk4rk5-comfyui.vercel.app Last updated: 2026-10-08T22:06:03Z for |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #19118 +/- ##
==========================================
+ Coverage 85.90% 86.75% +0.84%
==========================================
Files 3601 2550 -1051
Lines 172474 144201 -28273
Branches 45536 37468 -8068
==========================================
- Hits 148160 125098 -23062
+ Misses 22295 18717 -3578
+ Partials 2019 386 -1633
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1061 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…ab (Comfy-Org#19113) ## Summary Stacked on Comfy-Org#19111, in a chain rooted on `main` (Comfy-Org#19091 -> Comfy-Org#19107 -> Comfy-Org#19108 -> Comfy-Org#19111 -> Comfy-Org#19113). In the original stack it sat on Comfy-Org#19112. Tracks FE-2769 / FE-3037. `sidebarTabStore` hard-coded the model-library tab: when `Comfy.ModelLibrary.UseAssetBrowser` and the `assetsEnabled` flag were set, its toggle command opened the asset browser instead of the sidebar. That single tab pulled `openModelLibraryBrowser`, `useFeatureFlags`, and `settingStore` into the store and into the stores/scripts import cycle. Import cycles, measured with dependency-cruiser on `src` (the `pnpm lint:cycles` script arrives with Comfy-Org#19085) against Comfy-Org#19111's branch: cyclic modules 751 -> 747, largest cycle 698 -> 694, cyclic edges 3480 -> 3460. ## Changes - `SidebarTabExtension` gains an optional `onToggle?: () => boolean | Promise<boolean>` hook. The toggle command calls it first and only toggles the sidebar when the hook returns false or is absent. - `useModelLibrarySidebarTab` sets `onToggle` with the asset browser routing that used to live in the store. - `sidebarTabStore` loses the tab-id special case and its three imports. - Tests: the model-library cases move to `useModelLibrarySidebarTab.test.ts`; `sidebarTabStore.test.ts` covers the hook contract (absent, declines, handles) as a table. ## Review Focus - `onToggle` is new public API: `SidebarTabExtension` is exported from `src/types`, so the field ships in the published types package. Extensions that register a sidebar tab can now intercept the toggle by returning true; nothing else changes for them. - The routing now belongs to the core tab object, not to the `model-library` id. A tab registered under that id by anything other than `useModelLibrarySidebarTab` no longer opens the asset browser. - The tab and its `Workspace.ToggleSidebarTab.model-library` command keep their ids, so the keybinding default is unaffected. `missingModelDownload` sets `activeSidebarTabId` directly and never ran the toggle command, so it opens the sidebar tree as before. <!-- stack-table:start --> ## Stack Import-cycle progress for FE-3037, measured with `pnpm lint:cycles` (dependency-cruiser on `src`). ### Standalone PRs targeting `main` Each is one commit on current `main` and can merge on its own. Numbers are that PR alone against `origin/main` (1027 cyclic modules, largest cycle 983, 4562 cyclic edges). | PR | Base | Change | Cyclic modules | Largest cycle | Cyclic edges | | --- | --- | --- | --- | --- | --- | | Comfy-Org#19089 | `main` | `ServerFeatureFlag` enum to a leaf module | 1027 -> 884 | 983 -> 677 | 4562 -> 3382 | | Comfy-Org#19094 | `main` | Empty-workflow dialog out of `appModeStore` | 1027 -> 1026 | 983 -> 982 | 4562 -> 4558 | | Comfy-Org#19109 | `main` | Mask editor menu item into `Comfy.MaskEditor` extension | 1027 -> 1027 | 983 -> 983 | 4562 -> 4562 | | Comfy-Org#19112 | `main` | `PositionConfig` and layer editor dialog key to leaf modules | 1027 -> 1027 | 983 -> 983 | 4562 -> 4558 | | Comfy-Org#19122 | `main` | `settingStore` off `scripts/app`; `$el` to a leaf | 1027 -> 1025 | 983 -> 981 | 4562 -> 4552 | | Comfy-Org#19124 | `main` | `MissingNodeType` to the nodeReplacement leaf | 1027 -> 1027 | 983 -> 983 | 4562 -> 4555 | | Comfy-Org#19125 | `main` | Blueprint node defs owned by `nodeDefStore` | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | | Comfy-Org#19127 | `main` | Thumbnail and minimap data from explicit inputs | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | All eight together on `main`, plus Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19108, Comfy-Org#19111, Comfy-Org#19116 and Comfy-Org#19113 (checked locally; those six are not retargeted yet): 630 cyclic modules, largest cycle 412, 2476 cyclic edges. ### Remaining stack Bottom to top, with current bases. Numbers are from the original 26-PR stack, each PR against its parent at the time, on the older `main` the stack forked from (967 cyclic modules then). They have not been remeasured since the eight PRs above left the stack. Where the base changed, the parent the numbers were measured on is in parentheses. Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19111, Comfy-Org#19113 and Comfy-Org#19131 still carry the old commits of the PRs they were moved off (Comfy-Org#19131 carries Comfy-Org#19122, Comfy-Org#19124, Comfy-Org#19125 and Comfy-Org#19127), so their GitHub diffs are wider than one PR until the stack is rebased. | PR | Base | Change | Cyclic modules | Largest cycle | | --- | --- | --- | --- | --- | | Comfy-Org#19085 | `main` | Import-cycle baseline check (`pnpm lint:cycles`) | 967 (baseline) | 923 (baseline) | | Comfy-Org#19088 | Comfy-Org#19085 | Split litegraph `interfaces.ts` into leaf types | 967 -> 949 | 923 -> 905 | | Comfy-Org#19091 | Comfy-Org#19088 (measured on Comfy-Org#19089) | Register core sidebar tabs outside `sidebarTabStore` | 816 -> 669 | 618 -> 465 | | Comfy-Org#19092 | Comfy-Org#19091 | Load extensions from bootstrap, not `extensionService` | 669 -> 580 | 465 -> 371 | | Comfy-Org#19093 | Comfy-Org#19092 | Split `scripts/widgets.ts` registry, types, helpers | 580 -> 566 | 371 -> 357 | | Comfy-Org#19107 | Comfy-Org#19093 (measured on Comfy-Org#19094) | Register settings dialog from the app shell | 558 -> 509 | 349 -> 297 | | Comfy-Org#19108 | Comfy-Org#19107 | Register asset browser modal from the app shell | 509 -> 496 | 297 -> 284 | | Comfy-Org#19111 | Comfy-Org#19108 (measured on Comfy-Org#19109) | Register core bottom panel tabs from GraphView | 484 -> 476 | 272 -> 264 | | **Comfy-Org#19113** (this PR) | **Comfy-Org#19111 (measured on Comfy-Org#19112)** | **Model library asset-browser routing onto the sidebar tab** | **471 -> 467** | **257 -> 253** | | Comfy-Org#19116 | Comfy-Org#19113 | Progress text previews out of `executionStore` | 467 -> 464 | 253 -> 250 | | Comfy-Org#19118 | Comfy-Org#19116 | Inject the api auth provider from `main.ts` | 464 -> 447 | 250 -> 233 | | Comfy-Org#19121 | Comfy-Org#19118 | Install workspace api credentials from `main.ts` | 447 -> 428 | 233 -> 214 | | Comfy-Org#19131 | Comfy-Org#19121 (measured on Comfy-Org#19127) | Feature dialogs out of `dialogService` | 400 -> 391 | 181 -> 172 | | Comfy-Org#19143 | Comfy-Org#19131 | Invert `scripts/app` behind `useApp()` | 391 -> 352 | 172 -> 149 | | Comfy-Org#19148 | Comfy-Org#19143 | Billing rails announce refreshes; dialogs above the facade | 352 -> 324 | 149 (baseline) | | Comfy-Org#19153 | Comfy-Org#19148 | `types/comfy`, `comfyWorkflow`, dialog/workflow contracts as leaves | 324 -> 293 | 149 (baseline) | | Comfy-Org#19186 | Comfy-Org#19153 | Workbench cycles: `openManager` onto `useManagerDialog`, agent leaves | 293 -> 259 | 149 (baseline) | | Comfy-Org#19189 | Comfy-Org#19186 | Thirteen small app cycles: ui, nodeDef, auth dialogs, menu, and more | 259 -> 211 | 149 (baseline) | <!-- stack-table:end --> --------- Co-authored-by: Amp <amp@ampcode.com>
f6f1b6d to
c5b6b9b
Compare
c5b6b9b to
05395c3
Compare
ComfyApi lazily imported authStore for the Firebase header and WebSocket token and imported remintRetry for the 401 re-mint fetch, pulling the cloud auth graph into the most imported module in src. The client now takes an ApiAuthProvider (leaf interface plus an anonymous default); the cloud provider carries the moved logic and main.ts installs it before any request. The web-session path and the isCloud gates stay in api.ts unchanged. Import cycles: 632 -> 567 cyclic modules, largest SCC 422 -> 347. Amp-Thread-ID: https://ampcode.com/threads/T-48281e51-8943-471f-a41a-1ec4d4eab295
api.ts imports the toast store, and the toast store took its option types from types/extensionTypes, which reaches the workflow store, dialog service and command store through type imports. That edge put api.ts back into the application cycle. The option types now live in types/toastOptions and extensionTypes re-exports them. Amp-Thread-ID: https://ampcode.com/threads/T-01a0dcdd-4461-71d3-be73-0705e36d5297
05395c3 to
4e31bda
Compare
…ce (Comfy-Org#19092) ## Summary Targets `main` (Comfy-Org#19088, Comfy-Org#19089 and Comfy-Org#19091 merged; rebased onto `main` at 0ef0276). Moves `loadExtensions` out of `extensionService` into `src/services/extensionLoader.ts`, called from `GraphCanvas.vue` before `app.setup()`. `extensionService` imported `extensions/core/index` so `loadExtensions` could pull the core extensions in. Every core extension imports `app`, which imports `extensionService`, so the whole `extensions/core` tree and the UI it reaches (load3d, mask editor, painter, image compare, agent panel, ...) sat in the same import cycle as the app object. `GraphCanvas.vue` already owns the bootstrap sequence and is outside the cycle, so it is the right owner of the "load extensions" step. Measured with dependency-cruiser on `src` (the Comfy-Org#19085 config, run locally), against `main` at 0ef0276: | | before | after | | --- | --- | --- | | modules in any cycle | 631 | 500 | | largest cycle | 421 | 285 | | cyclic edges | 2451 | 2034 | Tracks FE-2769 / FE-3037. ## Changes - New `src/services/extensionLoader.ts` with `loadExtensions()`, `shouldLoadExtension()`, `importCustomExtension()` and `reportExtensionLoadFailures()` (moved verbatim from `main`, including the `extensions-load-core` / `extensions-load-custom` subphases from Comfy-Org#19888 and the aggregate failure report). `extensionService.test.ts` becomes `extensionLoader.test.ts`. - `extensionService` drops `loadExtensions` and its `api`, `bootstrapTracer`, `reportError` and `getErrorMessage` imports; it keeps `registerExtension`, `invokeExtensions`, `invokeExtensionsAsync`. - Comfy-Org#19730 (subphase timings, previously merged into this branch) is dropped from the branch because `main` carries the same instrumentation via Comfy-Org#19888. - `GraphCanvas.vue` runs `bootstrapTracer.settle('bootstrap/extensions-load', loadExtensions)` right before `comfyApp.setup()`. `app.setup()` no longer loads extensions. - `GraphCanvas.test.ts` mocks the loader; `SelectionToolbox.test.ts` drops `loadExtensions` from its service mock. - `browser_tests/types/globals.d.ts` imports `@/types` explicitly. The browser typecheck (`lint-pr / typecheck-aux`) only reached the app's `Window` augmentation through `app -> extensionService -> extensions/core`, and that path is gone. ## Review Focus - Ordering change: extension modules now import before `app.setup()` runs `syncWorkflows()` and `fetchSubgraphs()` and before `bodyTop`/`canvasContainer`/`canvasElRef` are assigned, instead of after. Extension hooks (`init`, `setup`, `registerCustomNodes`, `addCustomNodeDefs`) still run inside `app.setup()` exactly as before, so an extension only notices if it reads those at module top level. Nothing in `extensions/core` does. - The `bootstrap/extensions-load` tracer phase keeps its name and position between `workflows` and `extensions-init`. - `src/services/` is a frozen directory per the pre-commit hook; the loader sits next to `extensionService`, which it was split from. <!-- stack-table:start --> ## Stack Import-cycle progress for FE-3037, measured with `pnpm lint:cycles` (dependency-cruiser on `src`). ### Standalone PRs targeting `main` Each is one commit on current `main` and can merge on its own. Numbers are that PR alone against `origin/main` (1027 cyclic modules, largest cycle 983, 4562 cyclic edges). | PR | Base | Change | Cyclic modules | Largest cycle | Cyclic edges | | --- | --- | --- | --- | --- | --- | | Comfy-Org#19089 | `main` | `ServerFeatureFlag` enum to a leaf module | 1027 -> 884 | 983 -> 677 | 4562 -> 3382 | | Comfy-Org#19094 | `main` | Empty-workflow dialog out of `appModeStore` | 1027 -> 1026 | 983 -> 982 | 4562 -> 4558 | | Comfy-Org#19109 | `main` | Mask editor menu item into `Comfy.MaskEditor` extension | 1027 -> 1027 | 983 -> 983 | 4562 -> 4562 | | Comfy-Org#19112 | `main` | `PositionConfig` and layer editor dialog key to leaf modules | 1027 -> 1027 | 983 -> 983 | 4562 -> 4558 | | Comfy-Org#19122 | `main` | `settingStore` off `scripts/app`; `$el` to a leaf | 1027 -> 1025 | 983 -> 981 | 4562 -> 4552 | | Comfy-Org#19124 | `main` | `MissingNodeType` to the nodeReplacement leaf | 1027 -> 1027 | 983 -> 983 | 4562 -> 4555 | | Comfy-Org#19125 | `main` | Blueprint node defs owned by `nodeDefStore` | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | | Comfy-Org#19127 | `main` | Thumbnail and minimap data from explicit inputs | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | All eight together on `main`, plus Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19108, Comfy-Org#19111, Comfy-Org#19116 and Comfy-Org#19113 (checked locally; those six are not retargeted yet): 630 cyclic modules, largest cycle 412, 2476 cyclic edges. ### Remaining stack Bottom to top, with current bases. Numbers are from the original 26-PR stack, each PR against its parent at the time, on the older `main` the stack forked from (967 cyclic modules then). They have not been remeasured since the eight PRs above left the stack. Where the base changed, the parent the numbers were measured on is in parentheses. Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19111, Comfy-Org#19113 and Comfy-Org#19131 still carry the old commits of the PRs they were moved off (Comfy-Org#19131 carries Comfy-Org#19122, Comfy-Org#19124, Comfy-Org#19125 and Comfy-Org#19127), so their GitHub diffs are wider than one PR until the stack is rebased. | PR | Base | Change | Cyclic modules | Largest cycle | | --- | --- | --- | --- | --- | | Comfy-Org#19085 | `main` | Import-cycle baseline check (`pnpm lint:cycles`) | 967 (baseline) | 923 (baseline) | | Comfy-Org#19088 | Comfy-Org#19085 | Split litegraph `interfaces.ts` into leaf types | 967 -> 949 | 923 -> 905 | | Comfy-Org#19091 | Comfy-Org#19088 (measured on Comfy-Org#19089) | Register core sidebar tabs outside `sidebarTabStore` | 816 -> 669 | 618 -> 465 | | **Comfy-Org#19092** (this PR) | **Comfy-Org#19091** | **Load extensions from bootstrap, not `extensionService`** | **669 -> 580** | **465 -> 371** | | Comfy-Org#19093 | Comfy-Org#19092 | Split `scripts/widgets.ts` registry, types, helpers | 580 -> 566 | 371 -> 357 | | Comfy-Org#19107 | Comfy-Org#19093 (measured on Comfy-Org#19094) | Register settings dialog from the app shell | 558 -> 509 | 349 -> 297 | | Comfy-Org#19108 | Comfy-Org#19107 | Register asset browser modal from the app shell | 509 -> 496 | 297 -> 284 | | Comfy-Org#19111 | Comfy-Org#19108 (measured on Comfy-Org#19109) | Register core bottom panel tabs from GraphView | 484 -> 476 | 272 -> 264 | | Comfy-Org#19113 | Comfy-Org#19111 (measured on Comfy-Org#19112) | Model library asset-browser routing onto the sidebar tab | 471 -> 467 | 257 -> 253 | | Comfy-Org#19116 | Comfy-Org#19113 | Progress text previews out of `executionStore` | 467 -> 464 | 253 -> 250 | | Comfy-Org#19118 | Comfy-Org#19116 | Inject the api auth provider from `main.ts` | 464 -> 447 | 250 -> 233 | | Comfy-Org#19121 | Comfy-Org#19118 | Install workspace api credentials from `main.ts` | 447 -> 428 | 233 -> 214 | | Comfy-Org#19131 | Comfy-Org#19121 (measured on Comfy-Org#19127) | Feature dialogs out of `dialogService` | 400 -> 391 | 181 -> 172 | | Comfy-Org#19143 | Comfy-Org#19131 | Invert `scripts/app` behind `useApp()` | 391 -> 352 | 172 -> 149 | | Comfy-Org#19148 | Comfy-Org#19143 | Billing rails announce refreshes; dialogs above the facade | 352 -> 324 | 149 (baseline) | | Comfy-Org#19153 | Comfy-Org#19148 | `types/comfy`, `comfyWorkflow`, dialog/workflow contracts as leaves | 324 -> 293 | 149 (baseline) | | Comfy-Org#19186 | Comfy-Org#19153 | Workbench cycles: `openManager` onto `useManagerDialog`, agent leaves | 293 -> 259 | 149 (baseline) | | Comfy-Org#19189 | Comfy-Org#19186 | Thirteen small app cycles: ui, nodeDef, auth dialogs, menu, and more | 259 -> 211 | 149 (baseline) | <!-- stack-table:end --> Co-authored-by: Amp <amp@ampcode.com>
AustinMroz
left a comment
There was a problem hiding this comment.
Another PR where auth still feels pretty tangled even after the imports have been cleaned up. I suspect auth may benefit from another pass once all the other untangling has been done.
NOTE: PR also includes unrelated toast untangling. The changes of which have also been reviewed and are acceptable.
… of scripts/widgets (Comfy-Org#19093) ## Summary Targets `main` (Comfy-Org#19092 merged). Splits `src/scripts/widgets.ts` into the `ComfyWidgets` registry, a leaf type module, and the control_after_generate helpers. `widgets.ts` imported all 22 widget composables to build the registry, and every composable imported `ComfyWidgetConstructorV2` from `widgets.ts`. That type edge put the whole `vueNodes/widgets/composables` tree into the app import cycle even though the type only needs `LGraphNode`, `InputSpec` and `IBaseWidget`. Measured with dependency-cruiser on `src` (the Comfy-Org#19085 config, run locally), against `main` at 18a9c42: | | before | after | | --- | --- | --- | | modules in any cycle | 511 | 496 | | largest cycle | 296 | 281 | | cyclic edges | 2121 | 2085 | Tracks FE-2769 / FE-3037. ## Changes - New `src/types/widgetConstructor.ts` with `ComfyWidgetConstructorV2`. The 22 composables and `widgets.ts` import it from there. `ComfyWidgetConstructor` (V1) and `CustomComfyWidgetConstructor` stay in `widgets.ts` because they take `ComfyApp`. - New `src/core/graph/widgets/valueControlWidgets.ts` with `addValueControlWidget`, `addValueControlWidgets`, `updateControlWidgetLabel` and their private helpers, moved verbatim from current `main` (including `controlAfterGenerateNameOverride` and the `isValueControlMode` handling added since the branch forked). `useIntWidget`, `useFloatWidget`, `useComboWidget`, `widgetInputs.ts` and `GraphCanvas.vue` import from it. `widgets.controlAfterGenerateName.test.ts` moves with them as `valueControlWidgets.controlAfterGenerateName.test.ts`. - `useLightInfoWidget.ts` (added on `main` since the original PR) imports `ComfyWidgetConstructorV2` from `@/types/widgetConstructor` like the other composables. - `widgets.ts` no longer re-exports `IS_CONTROL_WIDGET`; `GraphCanvas.vue` imports it from `core/graph/widgets/controlWidgetMarker`. - `valueControl.ts`, `controlWidgetMarker.ts` and `promotedWidgetControl.ts` move out of `scripts/` into `core/graph/widgets` and `core/graph/subgraph`; `health.json` follows `valueControl.ts`. - `widgets.ts` keeps `export const` declarations of the three value-control helpers because `comfyAPIPlugin` only exposes declarations through the `scripts/widgets.js` shim that custom nodes import (`.fallowrc.jsonc` lists them as public, `build/plugins/comfyAPIPlugin.test.ts` asserts them). `useComboWidget.test.ts` mocks all three, since the shim reads them at module load. - `useIntWidget.test.ts` and `useFloatWidget.test.ts` add `vi.mock(import('@/scripts/app'))` (the repo's manual mock). Their old `vi.mock('@/scripts/widgets')` had also been preventing the registry from evaluating; with the registry no longer mocked, the pre-existing `settingStore -> app -> extensionService -> widgetStore -> widgets` runtime cycle reached `useIntWidget()` before its definition. Production import order is unaffected: `app.ts` is entered first there, as before. ## Review Focus - `valueControlWidgets.ts` stays in the cycle (it needs `useSettingStore`); it did not go into `valueControl.ts` because that would have pulled `valueControl.ts` and `promotedWidgetControl.ts` into the cycle too. - The 7 composables still in the cycle (`useComboWidget`, `useIntWidget`, `useFloatWidget`, `useImageUploadWidget`, ...) reach it through `settingStore`, `assetService` or node output stores, not through `widgets.ts`. - `src/types/` was chosen for the type because `simplifiedWidget.ts` and `widgetState.ts` already live there as widget leaf types. <!-- stack-table:start --> ## Stack Import-cycle progress for FE-3037, measured with `pnpm lint:cycles` (dependency-cruiser on `src`). ### Standalone PRs targeting `main` Each is one commit on current `main` and can merge on its own. Numbers are that PR alone against `origin/main` (1027 cyclic modules, largest cycle 983, 4562 cyclic edges). | PR | Base | Change | Cyclic modules | Largest cycle | Cyclic edges | | --- | --- | --- | --- | --- | --- | | Comfy-Org#19089 | `main` | `ServerFeatureFlag` enum to a leaf module | 1027 -> 884 | 983 -> 677 | 4562 -> 3382 | | Comfy-Org#19094 | `main` | Empty-workflow dialog out of `appModeStore` | 1027 -> 1026 | 983 -> 982 | 4562 -> 4558 | | Comfy-Org#19109 | `main` | Mask editor menu item into `Comfy.MaskEditor` extension | 1027 -> 1027 | 983 -> 983 | 4562 -> 4562 | | Comfy-Org#19112 | `main` | `PositionConfig` and layer editor dialog key to leaf modules | 1027 -> 1027 | 983 -> 983 | 4562 -> 4558 | | Comfy-Org#19122 | `main` | `settingStore` off `scripts/app`; `$el` to a leaf | 1027 -> 1025 | 983 -> 981 | 4562 -> 4552 | | Comfy-Org#19124 | `main` | `MissingNodeType` to the nodeReplacement leaf | 1027 -> 1027 | 983 -> 983 | 4562 -> 4555 | | Comfy-Org#19125 | `main` | Blueprint node defs owned by `nodeDefStore` | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | | Comfy-Org#19127 | `main` | Thumbnail and minimap data from explicit inputs | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | All eight together on `main`, plus Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19108, Comfy-Org#19111, Comfy-Org#19116 and Comfy-Org#19113 (checked locally; those six are not retargeted yet): 630 cyclic modules, largest cycle 412, 2476 cyclic edges. ### Remaining stack Bottom to top, with current bases. Numbers are from the original 26-PR stack, each PR against its parent at the time, on the older `main` the stack forked from (967 cyclic modules then). They have not been remeasured since the eight PRs above left the stack. Where the base changed, the parent the numbers were measured on is in parentheses. Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19111, Comfy-Org#19113 and Comfy-Org#19131 still carry the old commits of the PRs they were moved off (Comfy-Org#19131 carries Comfy-Org#19122, Comfy-Org#19124, Comfy-Org#19125 and Comfy-Org#19127), so their GitHub diffs are wider than one PR until the stack is rebased. | PR | Base | Change | Cyclic modules | Largest cycle | | --- | --- | --- | --- | --- | | Comfy-Org#19085 | `main` | Import-cycle baseline check (`pnpm lint:cycles`) | 967 (baseline) | 923 (baseline) | | Comfy-Org#19088 | Comfy-Org#19085 | Split litegraph `interfaces.ts` into leaf types | 967 -> 949 | 923 -> 905 | | Comfy-Org#19091 | Comfy-Org#19088 (measured on Comfy-Org#19089) | Register core sidebar tabs outside `sidebarTabStore` | 816 -> 669 | 618 -> 465 | | Comfy-Org#19092 | Comfy-Org#19091 | Load extensions from bootstrap, not `extensionService` | 669 -> 580 | 465 -> 371 | | **Comfy-Org#19093** (this PR) | **Comfy-Org#19092** | **Split `scripts/widgets.ts` registry, types, helpers** | **580 -> 566** | **371 -> 357** | | Comfy-Org#19107 | Comfy-Org#19093 (measured on Comfy-Org#19094) | Register settings dialog from the app shell | 558 -> 509 | 349 -> 297 | | Comfy-Org#19108 | Comfy-Org#19107 | Register asset browser modal from the app shell | 509 -> 496 | 297 -> 284 | | Comfy-Org#19111 | Comfy-Org#19108 (measured on Comfy-Org#19109) | Register core bottom panel tabs from GraphView | 484 -> 476 | 272 -> 264 | | Comfy-Org#19113 | Comfy-Org#19111 (measured on Comfy-Org#19112) | Model library asset-browser routing onto the sidebar tab | 471 -> 467 | 257 -> 253 | | Comfy-Org#19116 | Comfy-Org#19113 | Progress text previews out of `executionStore` | 467 -> 464 | 253 -> 250 | | Comfy-Org#19118 | Comfy-Org#19116 | Inject the api auth provider from `main.ts` | 464 -> 447 | 250 -> 233 | | Comfy-Org#19121 | Comfy-Org#19118 | Install workspace api credentials from `main.ts` | 447 -> 428 | 233 -> 214 | | Comfy-Org#19131 | Comfy-Org#19121 (measured on Comfy-Org#19127) | Feature dialogs out of `dialogService` | 400 -> 391 | 181 -> 172 | | Comfy-Org#19143 | Comfy-Org#19131 | Invert `scripts/app` behind `useApp()` | 391 -> 352 | 172 -> 149 | | Comfy-Org#19148 | Comfy-Org#19143 | Billing rails announce refreshes; dialogs above the facade | 352 -> 324 | 149 (baseline) | | Comfy-Org#19153 | Comfy-Org#19148 | `types/comfy`, `comfyWorkflow`, dialog/workflow contracts as leaves | 324 -> 293 | 149 (baseline) | | Comfy-Org#19186 | Comfy-Org#19153 | Workbench cycles: `openManager` onto `useManagerDialog`, agent leaves | 293 -> 259 | 149 (baseline) | | Comfy-Org#19189 | Comfy-Org#19186 | Thirteen small app cycles: ui, nodeDef, auth dialogs, menu, and more | 259 -> 211 | 149 (baseline) | <!-- stack-table:end --> --------- Co-authored-by: Amp <amp@ampcode.com>
…Comfy-Org#19121) ## Summary Re-implemented on current `main` (the original commit no longer applied after `workspaceApi` gained the web-session adapter path). Comfy-Org#19118 has merged, so this is now one commit on `main`. Tracks FE-2769 / FE-3037. `workspaceApi` imported `authStore` for its request headers and `remintRetry` to attach the 401 re-mint interceptor at module load. Both edges put the workspace billing SDK, capability composables, and churnkey modules inside the auth cycle. The client now receives its credentials through `setWorkspaceApiAuth`, wired from `main.ts`, the same shape as Comfy-Org#19118. Import cycles (dependency-cruiser on `src`, against `origin/main` at b835c9d): 459 -> 439 cyclic modules, largest SCC 234 -> 214, cyclic edges 1815 -> 1730. ## Changes - `workspaceApi.ts`: module-private `WorkspaceApiAuth` (`getWorkspaceAuthHeader`, `getFirebaseAuthHeader`, `attachRetryInterceptor`) and exported `setWorkspaceApiAuth`, which stores the auth and attaches the interceptor to the axios client. `requestAuth` keeps its web-session adapter branch and falls back to the installed workspace header; `acceptInvite` uses the installed Firebase header. Calls that reach the token path before installation throw `WorkspaceApiError('Workspace API auth is not installed', 401)`. No more `authStore` or `remintRetry` imports; `capabilityRevision` still attaches at module load because it has no auth dependency. - New `workspaceApiAuth.ts`: `installWorkspaceApiAuth()` binds the auth-store `*OrThrow` getters and `attachUnifiedRemintInterceptor`. - `main.ts` calls `installWorkspaceApiAuth()` on every distribution, right after the cloud block. It cannot share the `isCloud` gate with `installCloudApiAuth()`: `authStore.getWorkspaceAuthToken` initializes `teamWorkspaceStore` (and so calls `workspaceApi.list()`) for a signed-in user on desktop/local too. - `workspaceApi.test.ts` installs the auth once at module scope; the store actions it stubs are the same ones the installer binds. `webSessionFlagOn.test.ts` installs it next to `installCloudApiAuth()` so the suite runs the production wiring. ## Review Focus - The interceptor is attached in `setWorkspaceApiAuth`, so calling it twice attaches two re-mint interceptors. `main.ts` calls it once; the test files install once at module scope for the same reason. - Unconfigured state only exists before `main.ts` runs. Previously a header lookup in that window would have thrown `AuthStoreError`; it now throws `WorkspaceApiError`. The web-session path never needed the auth store and is unaffected. - `WorkspaceApiAuth` is module-private; nothing outside `workspaceApi.ts` names the type. <!-- stack-table:start --> ## Stack Import-cycle progress for FE-3037, measured with `pnpm lint:cycles` (dependency-cruiser on `src`). ### Standalone PRs targeting `main` Each is one commit on current `main` and can merge on its own. Numbers are that PR alone against `origin/main` (1027 cyclic modules, largest cycle 983, 4562 cyclic edges). | PR | Base | Change | Cyclic modules | Largest cycle | Cyclic edges | | --- | --- | --- | --- | --- | --- | | Comfy-Org#19089 | `main` | `ServerFeatureFlag` enum to a leaf module | 1027 -> 884 | 983 -> 677 | 4562 -> 3382 | | Comfy-Org#19094 | `main` | Empty-workflow dialog out of `appModeStore` | 1027 -> 1026 | 983 -> 982 | 4562 -> 4558 | | Comfy-Org#19109 | `main` | Mask editor menu item into `Comfy.MaskEditor` extension | 1027 -> 1027 | 983 -> 983 | 4562 -> 4562 | | Comfy-Org#19112 | `main` | `PositionConfig` and layer editor dialog key to leaf modules | 1027 -> 1027 | 983 -> 983 | 4562 -> 4558 | | Comfy-Org#19122 | `main` | `settingStore` off `scripts/app`; `$el` to a leaf | 1027 -> 1025 | 983 -> 981 | 4562 -> 4552 | | Comfy-Org#19124 | `main` | `MissingNodeType` to the nodeReplacement leaf | 1027 -> 1027 | 983 -> 983 | 4562 -> 4555 | | Comfy-Org#19125 | `main` | Blueprint node defs owned by `nodeDefStore` | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | | Comfy-Org#19127 | `main` | Thumbnail and minimap data from explicit inputs | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | All eight together on `main`, plus Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19108, Comfy-Org#19111, Comfy-Org#19116 and Comfy-Org#19113 (checked locally; those six are not retargeted yet): 630 cyclic modules, largest cycle 412, 2476 cyclic edges. ### Remaining stack Bottom to top, with current bases. Numbers are from the original 26-PR stack, each PR against its parent at the time, on the older `main` the stack forked from (967 cyclic modules then). They have not been remeasured since the eight PRs above left the stack. Where the base changed, the parent the numbers were measured on is in parentheses. Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19111, Comfy-Org#19113 and Comfy-Org#19131 still carry the old commits of the PRs they were moved off (Comfy-Org#19131 carries Comfy-Org#19122, Comfy-Org#19124, Comfy-Org#19125 and Comfy-Org#19127), so their GitHub diffs are wider than one PR until the stack is rebased. | PR | Base | Change | Cyclic modules | Largest cycle | | --- | --- | --- | --- | --- | | Comfy-Org#19085 | `main` | Import-cycle baseline check (`pnpm lint:cycles`) | 967 (baseline) | 923 (baseline) | | Comfy-Org#19088 | Comfy-Org#19085 | Split litegraph `interfaces.ts` into leaf types | 967 -> 949 | 923 -> 905 | | Comfy-Org#19091 | Comfy-Org#19088 (measured on Comfy-Org#19089) | Register core sidebar tabs outside `sidebarTabStore` | 816 -> 669 | 618 -> 465 | | Comfy-Org#19092 | Comfy-Org#19091 | Load extensions from bootstrap, not `extensionService` | 669 -> 580 | 465 -> 371 | | Comfy-Org#19093 | Comfy-Org#19092 | Split `scripts/widgets.ts` registry, types, helpers | 580 -> 566 | 371 -> 357 | | Comfy-Org#19107 | Comfy-Org#19093 (measured on Comfy-Org#19094) | Register settings dialog from the app shell | 558 -> 509 | 349 -> 297 | | Comfy-Org#19108 | Comfy-Org#19107 | Register asset browser modal from the app shell | 509 -> 496 | 297 -> 284 | | Comfy-Org#19111 | Comfy-Org#19108 (measured on Comfy-Org#19109) | Register core bottom panel tabs from GraphView | 484 -> 476 | 272 -> 264 | | Comfy-Org#19113 | Comfy-Org#19111 (measured on Comfy-Org#19112) | Model library asset-browser routing onto the sidebar tab | 471 -> 467 | 257 -> 253 | | Comfy-Org#19116 | Comfy-Org#19113 | Progress text previews out of `executionStore` | 467 -> 464 | 253 -> 250 | | Comfy-Org#19118 | Comfy-Org#19116 | Inject the api auth provider from `main.ts` | 464 -> 447 | 250 -> 233 | | **Comfy-Org#19121** (this PR) | **Comfy-Org#19118** | **Install workspace api credentials from `main.ts`** | **447 -> 428** | **233 -> 214** | | Comfy-Org#19131 | Comfy-Org#19121 (measured on Comfy-Org#19127) | Feature dialogs out of `dialogService` | 400 -> 391 | 181 -> 172 | | Comfy-Org#19143 | Comfy-Org#19131 | Invert `scripts/app` behind `useApp()` | 391 -> 352 | 172 -> 149 | | Comfy-Org#19148 | Comfy-Org#19143 | Billing rails announce refreshes; dialogs above the facade | 352 -> 324 | 149 (baseline) | | Comfy-Org#19153 | Comfy-Org#19148 | `types/comfy`, `comfyWorkflow`, dialog/workflow contracts as leaves | 324 -> 293 | 149 (baseline) | | Comfy-Org#19186 | Comfy-Org#19153 | Workbench cycles: `openManager` onto `useManagerDialog`, agent leaves | 293 -> 259 | 149 (baseline) | | Comfy-Org#19189 | Comfy-Org#19186 | Thirteen small app cycles: ui, nodeDef, auth dialogs, menu, and more | 259 -> 211 | 149 (baseline) | <!-- stack-table:end -->
…g#19116) ## Summary Targets `main`; the rest of this chain (Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19108, Comfy-Org#19111, Comfy-Org#19113) has merged. Tracks FE-2769 / FE-3037. `executionStore` drove the node text preview widget itself: it bound the `progress_text` socket event, resolved the node on the canvas, called `showTextPreview`, and on job reset walked the job's nodes to `removeTextPreview`. That pulled `useNodeProgressText` (and through it the widget layer and `app`) plus `canvasStore` into the store. Separately, `workflowStore` imported `executionStore` to rewrite session job paths on rename, while `executionStore` imports `workflowStore`; fallow flags that two-module cycle once this PR touches `executionStore`. Import cycles, measured with dependency-cruiser on `src` (the `pnpm lint:cycles` script arrives with Comfy-Org#19085) against `main`: cyclic modules 421 -> 418, largest cycle 196 -> 193, cyclic edges 1687 -> 1679. The rename change removes one of those edges; both stores stay in the large cycle through other paths. ## Changes - `executionStore` exposes `onJobReset` (vueuse `createEventHook`) and triggers it with the finished `QueuedJob` inside `resetExecutionState`, before the job is dropped. `QueuedJob` is exported for the listener type. The store no longer imports `useNodeProgressText`, `canvasStore`, or `parseNodeId`, and `progress_text` is no longer bound in `bindExecutionEvents`. - New `useProgressTextPreviews` composable listens to `api` `progress_text` and `executionStore.onJobReset` and owns the widget calls. GraphView mounts it next to `useProgressFavicon`. `GraphView.test.ts` is unchanged. - `workflowStore` no longer imports `executionStore`. `renameWorkflow` triggers a new `onWorkflowRenamed` hook where it used to call `rewriteSessionWorkflowPaths`, and `executionStore` subscribes in its setup. `rewriteSessionWorkflowPaths` is now private. - Tests: the progress_text and widget-removal cases move to `useProgressTextPreviews.test.ts` (real execution store, the shared `api` automock, fixtures built in each test, scope stopped with `onTestFinished`), which adds cases for the active-prompt filter, for mapping a nested execution id, and for disposal removing both listeners. Removal there is driven through `clearActiveJobIfStale`. `executionStore.test.ts` keeps one table asserting `onJobReset` fires with the job after success, interrupt, and error, and drops `progress_text` from the unbind list. Its session-path tests now drive a real `renameWorkflow`; the matching rename test in `workflowStore.test.ts` is removed and its duplicate-graph-id case lives in `executionStore.test.ts`. - E2E: the Flux2 rerun spec's progress-text test now checks the status line is visible on the node while it runs, then hidden and gone from the widget store after `execution_success`. Before, it only checked removal, so it passed even if the preview never appeared. ## Review Focus - `createEventHook` follows the existing pattern in `cloudWebSessionStore` (`onSignedOutElsewhere`). Its `on` auto-unsubscribes when the calling scope (GraphView) is disposed, and `trigger` calls listeners synchronously, so the listener sees the job before `resetExecutionState` deletes it. - Listener lifetime: `useEventListener(api, 'progress_text')` binds at GraphView setup and unbinds when GraphView's scope is disposed. Before, the store bound it in `bindExecutionEvents` (GraphView `onMounted`) and unbound it in `unbindExecutionEvents` (`onBeforeUnmount`). `progress_text` only matters once the canvas exists, and the handler already ignores events with no canvas. - Rename timing: the hook fires synchronously at the point the direct call ran, right after `workflow.rename` and before the lookup swap and bookmark awaits, so linear-mode outputs keep matching the renamed workflow. When `executionStore` does not exist yet there is no session state to rewrite. - Behavior is otherwise unchanged. The filters (active prompt only, nested execution ids mapped through `workflowStore`, active workflow only on reset) keep the same logic; node lookup is now one shared `findNode` helper. <!-- stack-table:start --> ## Stack Import-cycle progress for FE-3037, measured with `pnpm lint:cycles` (dependency-cruiser on `src`). ### Standalone PRs targeting `main` Each is one commit on current `main` and can merge on its own. Numbers are that PR alone against `origin/main` (1027 cyclic modules, largest cycle 983, 4562 cyclic edges). | PR | Base | Change | Cyclic modules | Largest cycle | Cyclic edges | | --- | --- | --- | --- | --- | --- | | Comfy-Org#19089 | `main` | `ServerFeatureFlag` enum to a leaf module | 1027 -> 884 | 983 -> 677 | 4562 -> 3382 | | Comfy-Org#19094 | `main` | Empty-workflow dialog out of `appModeStore` | 1027 -> 1026 | 983 -> 982 | 4562 -> 4558 | | Comfy-Org#19109 | `main` | Mask editor menu item into `Comfy.MaskEditor` extension | 1027 -> 1027 | 983 -> 983 | 4562 -> 4562 | | Comfy-Org#19112 | `main` | `PositionConfig` and layer editor dialog key to leaf modules | 1027 -> 1027 | 983 -> 983 | 4562 -> 4558 | | Comfy-Org#19122 | `main` | `settingStore` off `scripts/app`; `$el` to a leaf | 1027 -> 1025 | 983 -> 981 | 4562 -> 4552 | | Comfy-Org#19124 | `main` | `MissingNodeType` to the nodeReplacement leaf | 1027 -> 1027 | 983 -> 983 | 4562 -> 4555 | | Comfy-Org#19125 | `main` | Blueprint node defs owned by `nodeDefStore` | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | | Comfy-Org#19127 | `main` | Thumbnail and minimap data from explicit inputs | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | All eight together on `main`, plus Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19108, Comfy-Org#19111, Comfy-Org#19116 and Comfy-Org#19113 (checked locally; those six are not retargeted yet): 630 cyclic modules, largest cycle 412, 2476 cyclic edges. ### Remaining stack Bottom to top, with current bases. Numbers are from the original 26-PR stack, each PR against its parent at the time, on the older `main` the stack forked from (967 cyclic modules then). They have not been remeasured since the eight PRs above left the stack. Where the base changed, the parent the numbers were measured on is in parentheses. Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19111, Comfy-Org#19113 and Comfy-Org#19131 still carry the old commits of the PRs they were moved off (Comfy-Org#19131 carries Comfy-Org#19122, Comfy-Org#19124, Comfy-Org#19125 and Comfy-Org#19127), so their GitHub diffs are wider than one PR until the stack is rebased. | PR | Base | Change | Cyclic modules | Largest cycle | | --- | --- | --- | --- | --- | | Comfy-Org#19085 | `main` | Import-cycle baseline check (`pnpm lint:cycles`) | 967 (baseline) | 923 (baseline) | | Comfy-Org#19088 | Comfy-Org#19085 | Split litegraph `interfaces.ts` into leaf types | 967 -> 949 | 923 -> 905 | | Comfy-Org#19091 | Comfy-Org#19088 (measured on Comfy-Org#19089) | Register core sidebar tabs outside `sidebarTabStore` | 816 -> 669 | 618 -> 465 | | Comfy-Org#19092 | Comfy-Org#19091 | Load extensions from bootstrap, not `extensionService` | 669 -> 580 | 465 -> 371 | | Comfy-Org#19093 | Comfy-Org#19092 | Split `scripts/widgets.ts` registry, types, helpers | 580 -> 566 | 371 -> 357 | | Comfy-Org#19107 | Comfy-Org#19093 (measured on Comfy-Org#19094) | Register settings dialog from the app shell | 558 -> 509 | 349 -> 297 | | Comfy-Org#19108 | Comfy-Org#19107 | Register asset browser modal from the app shell | 509 -> 496 | 297 -> 284 | | Comfy-Org#19111 | Comfy-Org#19108 (measured on Comfy-Org#19109) | Register core bottom panel tabs from GraphView | 484 -> 476 | 272 -> 264 | | Comfy-Org#19113 | Comfy-Org#19111 (measured on Comfy-Org#19112) | Model library asset-browser routing onto the sidebar tab | 471 -> 467 | 257 -> 253 | | **Comfy-Org#19116** (this PR) | **Comfy-Org#19113** | **Progress text previews out of `executionStore`** | **467 -> 464** | **253 -> 250** | | Comfy-Org#19118 | Comfy-Org#19116 | Inject the api auth provider from `main.ts` | 464 -> 447 | 250 -> 233 | | Comfy-Org#19121 | Comfy-Org#19118 | Install workspace api credentials from `main.ts` | 447 -> 428 | 233 -> 214 | | Comfy-Org#19131 | Comfy-Org#19121 (measured on Comfy-Org#19127) | Feature dialogs out of `dialogService` | 400 -> 391 | 181 -> 172 | | Comfy-Org#19143 | Comfy-Org#19131 | Invert `scripts/app` behind `useApp()` | 391 -> 352 | 172 -> 149 | | Comfy-Org#19148 | Comfy-Org#19143 | Billing rails announce refreshes; dialogs above the facade | 352 -> 324 | 149 (baseline) | | Comfy-Org#19153 | Comfy-Org#19148 | `types/comfy`, `comfyWorkflow`, dialog/workflow contracts as leaves | 324 -> 293 | 149 (baseline) | | Comfy-Org#19186 | Comfy-Org#19153 | Workbench cycles: `openManager` onto `useManagerDialog`, agent leaves | 293 -> 259 | 149 (baseline) | | Comfy-Org#19189 | Comfy-Org#19186 | Thirteen small app cycles: ui, nodeDef, auth dialogs, menu, and more | 259 -> 211 | 149 (baseline) | <!-- stack-table:end --> --------- Co-authored-by: Amp <amp@ampcode.com>
## Summary Targets `main` directly, rebased onto cb72d45 after Comfy-Org#19093 merged (6067dee). The original sat on Comfy-Org#19121; Comfy-Org#19118 and Comfy-Org#19121 are no longer in this chain. Tracks FE-2769 / FE-3037. `dialogService` bundled the core prompt/confirm/error dialogs with every auth, billing, workspace, cloud-notification and ComfyHub dialog. Any module that called `confirm()` transitively imported the billing and workspace layers, and `workspaceStore -> dialogService -> useBillingContext -> ... -> workspaceStore` held the whole platform layer in the app SCC. The core service keeps `showExecutionErrorDialog`, `showErrorDialog`, `prompt`, `confirm`, `showExtensionDialog`, `showLayoutDialog` and `showSmallLayoutDialog`. Feature dialogs move verbatim into per-feature composables. Extensions still see every dialog on `app.extensionManager.dialog`. Import cycles on `main` cb72d45: 421 -> 412 cyclic modules, largest SCC 196 -> 187, 1687 -> 1648 cyclic edges. ## Changes - `dialogService.ts`: core dialogs only. Declares `ExtensionDialogService` (core + feature signatures, leaf types only), `registerExtensionDialogService()` and `useExtensionDialogService()`. - `extensionDialogService.ts`: `createExtensionDialogService()` spreads the core service and the feature composables. `App.vue` registers it before `useWorkspaceStore()` is created; `workspaceStore.dialog` reads the registry. `ExtensionManager.dialog` is typed `ExtensionDialogService`. - New composables, functions moved unchanged: `composables/auth/useAuthDialogs.ts`, `composables/billing/useBillingDialogs.ts`, `platform/workspace/composables/useWorkspaceDialogs.ts`, `platform/cloud/notification/composables/useCloudNotificationDialog.ts`; `showPublishDialog` joins `useComfyHubPublishDialog`. The shared `workspaceDialogProps` object becomes `SELF_STYLED_PANEL_DIALOG_PROPS` in `components/ui/dialog/dialog.variants.ts`, next to `HUG_CONTENT_CLASS` and `SELF_STYLED_PANEL_CONTENT_CLASS`, which `main` already has there. - `composables/billing/types.ts` gains `TopUpCreditsDialogOptions`, `SubscriptionDialogOptions`, `DowngradeToPersonalResult`. `ConfirmationDialogType` moves to `components/dialog/content/confirmationDialogTypes.ts`. - `useSettingsDialog` calls `dialogStore.showDialog` directly with the same renderer/headless/closable props `showLayoutDialog` applied. - Callers switch from `useDialogService().showX` to the owning composable. Tests get a `__mocks__` per feature composable; billing dialog tests move next to `useBillingDialogs` (`git mv`), and the two `showCancelSubscriptionDialog` guard tests move from `dialogService.concurrency.test.ts` into `useBillingDialogs.cancelSubscription.test.ts`. `useInviteUrlLoader` and `UserPanel` (added on `main` since the original) switch to `useWorkspaceDialogs` / `useAuthDialogs` too. The downgrade-failure toast in `useBillingDialogs` uses the `useToast()` API from Comfy-Org#16313, as the moved code on `main` does. ## Review Focus - Registry over direct import: `workspaceStore` importing the aggregator directly keeps every feature composable in the SCC (in the original stack, simulated 185 vs 172). The registry is a module-level `let` guarded by `assert` from `@/base/assert`; `App.vue` is the only registration site. - `useExtensionDialogService()` before registration is a programming error: `assert` throws in DEV and reports in production. - Browser test fixtures (`PublishDialog.ts`, `CloudNotification.ts`) call `window.app.extensionManager.dialog.showPublishDialog/showCloudNotification`; both remain on the extension surface. - Feature dialog composables are still in the SCC through their dialog components, which import `app`. That is the next PR (`app` -> root graph leaf). - `.fallow-baselines/health.json`: one `crap_high` entry added for `useBillingDialogs.ts`; `showTopUpCreditsDialog` moved verbatim, fallow re-estimates coverage per file from export references, and the composable has fewer importers than `dialogService`. <!-- stack-table:start --> ## Stack Import-cycle progress for FE-3037, measured with `pnpm lint:cycles` (dependency-cruiser on `src`). ### Standalone PRs targeting `main` Each is one commit on current `main` and can merge on its own. Numbers are that PR alone against `origin/main` (1027 cyclic modules, largest cycle 983, 4562 cyclic edges). | PR | Base | Change | Cyclic modules | Largest cycle | Cyclic edges | | --- | --- | --- | --- | --- | --- | | Comfy-Org#19089 | `main` | `ServerFeatureFlag` enum to a leaf module | 1027 -> 884 | 983 -> 677 | 4562 -> 3382 | | Comfy-Org#19094 | `main` | Empty-workflow dialog out of `appModeStore` | 1027 -> 1026 | 983 -> 982 | 4562 -> 4558 | | Comfy-Org#19109 | `main` | Mask editor menu item into `Comfy.MaskEditor` extension | 1027 -> 1027 | 983 -> 983 | 4562 -> 4562 | | Comfy-Org#19112 | `main` | `PositionConfig` and layer editor dialog key to leaf modules | 1027 -> 1027 | 983 -> 983 | 4562 -> 4558 | | Comfy-Org#19122 | `main` | `settingStore` off `scripts/app`; `$el` to a leaf | 1027 -> 1025 | 983 -> 981 | 4562 -> 4552 | | Comfy-Org#19124 | `main` | `MissingNodeType` to the nodeReplacement leaf | 1027 -> 1027 | 983 -> 983 | 4562 -> 4555 | | Comfy-Org#19125 | `main` | Blueprint node defs owned by `nodeDefStore` | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | | Comfy-Org#19127 | `main` | Thumbnail and minimap data from explicit inputs | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | All eight together on `main`, plus Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19108, Comfy-Org#19111, Comfy-Org#19116 and Comfy-Org#19113 (checked locally; those six are not retargeted yet): 630 cyclic modules, largest cycle 412, 2476 cyclic edges. ### Remaining stack Bottom to top, with current bases. Numbers are from the original 26-PR stack, each PR against its parent at the time, on the older `main` the stack forked from (967 cyclic modules then). They have not been remeasured since the eight PRs above left the stack. Where the base changed, the parent the numbers were measured on is in parentheses. Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19111, Comfy-Org#19113 and Comfy-Org#19131 still carry the old commits of the PRs they were moved off (Comfy-Org#19131 carries Comfy-Org#19122, Comfy-Org#19124, Comfy-Org#19125 and Comfy-Org#19127), so their GitHub diffs are wider than one PR until the stack is rebased. | PR | Base | Change | Cyclic modules | Largest cycle | | --- | --- | --- | --- | --- | | Comfy-Org#19085 | `main` | Import-cycle baseline check (`pnpm lint:cycles`) | 967 (baseline) | 923 (baseline) | | Comfy-Org#19088 | Comfy-Org#19085 | Split litegraph `interfaces.ts` into leaf types | 967 -> 949 | 923 -> 905 | | Comfy-Org#19091 | Comfy-Org#19088 (measured on Comfy-Org#19089) | Register core sidebar tabs outside `sidebarTabStore` | 816 -> 669 | 618 -> 465 | | Comfy-Org#19092 | Comfy-Org#19091 | Load extensions from bootstrap, not `extensionService` | 669 -> 580 | 465 -> 371 | | Comfy-Org#19093 | Comfy-Org#19092 | Split `scripts/widgets.ts` registry, types, helpers | 580 -> 566 | 371 -> 357 | | Comfy-Org#19107 | Comfy-Org#19093 (measured on Comfy-Org#19094) | Register settings dialog from the app shell | 558 -> 509 | 349 -> 297 | | Comfy-Org#19108 | Comfy-Org#19107 | Register asset browser modal from the app shell | 509 -> 496 | 297 -> 284 | | Comfy-Org#19111 | Comfy-Org#19108 (measured on Comfy-Org#19109) | Register core bottom panel tabs from GraphView | 484 -> 476 | 272 -> 264 | | Comfy-Org#19113 | Comfy-Org#19111 (measured on Comfy-Org#19112) | Model library asset-browser routing onto the sidebar tab | 471 -> 467 | 257 -> 253 | | Comfy-Org#19116 | Comfy-Org#19113 | Progress text previews out of `executionStore` | 467 -> 464 | 253 -> 250 | | Comfy-Org#19118 | Comfy-Org#19116 | Inject the api auth provider from `main.ts` | 464 -> 447 | 250 -> 233 | | Comfy-Org#19121 | Comfy-Org#19118 | Install workspace api credentials from `main.ts` | 447 -> 428 | 233 -> 214 | | **Comfy-Org#19131** (this PR) | **Comfy-Org#19121 (measured on Comfy-Org#19127)** | **Feature dialogs out of `dialogService`** | **400 -> 391** | **181 -> 172** | | Comfy-Org#19143 | Comfy-Org#19131 | Invert `scripts/app` behind `useApp()` | 391 -> 352 | 172 -> 149 | | Comfy-Org#19148 | Comfy-Org#19143 | Billing rails announce refreshes; dialogs above the facade | 352 -> 324 | 149 (baseline) | | Comfy-Org#19153 | Comfy-Org#19148 | `types/comfy`, `comfyWorkflow`, dialog/workflow contracts as leaves | 324 -> 293 | 149 (baseline) | | Comfy-Org#19186 | Comfy-Org#19153 | Workbench cycles: `openManager` onto `useManagerDialog`, agent leaves | 293 -> 259 | 149 (baseline) | | Comfy-Org#19189 | Comfy-Org#19186 | Thirteen small app cycles: ui, nodeDef, auth dialogs, menu, and more | 259 -> 211 | 149 (baseline) | <!-- stack-table:end --> Co-authored-by: Amp <amp@ampcode.com>
…omfy-Org#19143) ## Summary Modules below `scripts/app.ts` in the import graph stop importing the `app` value from it. They call `useApp()` from `scripts/appInstance`, which reads a registry that `app.ts` fills right after constructing `ComfyApp`. Type-only consumers import the new `ComfyApp` interface from `types/comfy`. Clipspace state moves out of the class into `scripts/clipspace`. Import cycles: 409 -> 371 cyclic modules, largest SCC 184 -> 154 (litegraph is now the largest), 1640 -> 1451 cyclic edges, measured with dependency-cruiser on `main` a2dba8f. Targets `main` directly, rebased onto a2dba8f. Tracks FE-2769 / FE-3037. ## Changes - `types/comfy.ts`: `ComfyApp` interface (public instance surface), `QueuePromptOptions`, `LoadGraphDataOptions`. `types/index.ts` re-exports the type from here instead of from `scripts/app`. - `scripts/appRegistry.ts`: `registerApp` / `useApp` (asserts registration). `scripts/appInstance.ts` re-exports `useApp` as the consumer-facing seam so tests can mock it without re-entering `app.ts`. - `scripts/clipspace.ts`: clipspace state plus `copyToClipspace` / `pasteFromClipspace`. `ComfyApp` statics stay as accessors for custom-node compatibility; `litegraphService` and `changeTracker` use the leaf directly. - `class ComfyApp implements ComfyApp` (aliased `IComfyApp` inside `app.ts`). `ANIM_PREVIEW_WIDGET` now lives in `useNodeAnimatedImage.ts` and is re-exported from `app.ts`. - ~40 SCC importers switched to `useApp()` (all call sites are inside functions). On the current base that includes the mask editor composables, `useNodeProgressText` and `useProgressTextWidget`, which joined the SCC after the original PR. Type positions use `ComfyApp['rootGraph']` / `Parameters<ComfyApp['loadGraphData']>[0]`. - `commandStore.loadExtensionCommands` takes `{ name; commands? }` so it no longer imports `ComfyExtension`. - `vitest.setup.ts`: global mock of `@/scripts/appInstance` that resolves `useApp()` to whatever `@/scripts/app` is in the test file (real or per-file mock), awaited in `beforeAll` / `beforeEach`. `firstRunEntry.test.ts`'s `createSharedComposable` stand-in now resets every composable it created rather than only the last one registered. - `scripts/README.md`: documents the interface / `useApp()` / clipspace pattern. - Baselines: `.fallow-baselines/dead-code.json` gains 32 pre-existing cycles (auth, billing, `workflowStore` <-> `executionStore`, the billing paths through `useBillingDialogs`, and `comfyWorkflow -> changeTracker -> workflowStore`) that fallow only enumerates once the hub edges are gone; every entry's modules sit in one SCC on `main`; the entries use fallow's sorted-path key. `health.json` entry for `clipspace.ts`. ## Review Focus - Only modules below `app.ts` use `useApp()`. Top-level code (extensions, components, `App.vue`) keeps `import { app }`. - `useApp()` asserts that `registerApp` has run; every migrated call site runs after `app.ts` evaluates. `appRegistry.test.ts` covers both branches. - The vitest bridge loads `@/scripts/app` asynchronously, so modules in its tree now evaluate after the test subject's imports. `firstRunEntry.test.ts` was the one test sensitive to that ordering. <!-- stack-table:start --> ## Stack Import-cycle progress for FE-3037, measured with `pnpm lint:cycles` (dependency-cruiser on `src`). ### Standalone PRs targeting `main` Each is one commit on current `main` and can merge on its own. Numbers are that PR alone against `origin/main` (1027 cyclic modules, largest cycle 983, 4562 cyclic edges). | PR | Base | Change | Cyclic modules | Largest cycle | Cyclic edges | | --- | --- | --- | --- | --- | --- | | Comfy-Org#19089 | `main` | `ServerFeatureFlag` enum to a leaf module | 1027 -> 884 | 983 -> 677 | 4562 -> 3382 | | Comfy-Org#19094 | `main` | Empty-workflow dialog out of `appModeStore` | 1027 -> 1026 | 983 -> 982 | 4562 -> 4558 | | Comfy-Org#19109 | `main` | Mask editor menu item into `Comfy.MaskEditor` extension | 1027 -> 1027 | 983 -> 983 | 4562 -> 4562 | | Comfy-Org#19112 | `main` | `PositionConfig` and layer editor dialog key to leaf modules | 1027 -> 1027 | 983 -> 983 | 4562 -> 4558 | | Comfy-Org#19122 | `main` | `settingStore` off `scripts/app`; `$el` to a leaf | 1027 -> 1025 | 983 -> 981 | 4562 -> 4552 | | Comfy-Org#19124 | `main` | `MissingNodeType` to the nodeReplacement leaf | 1027 -> 1027 | 983 -> 983 | 4562 -> 4555 | | Comfy-Org#19125 | `main` | Blueprint node defs owned by `nodeDefStore` | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | | Comfy-Org#19127 | `main` | Thumbnail and minimap data from explicit inputs | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | All eight together on `main`, plus Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19108, Comfy-Org#19111, Comfy-Org#19116 and Comfy-Org#19113 (checked locally; those six are not retargeted yet): 630 cyclic modules, largest cycle 412, 2476 cyclic edges. ### Remaining stack Bottom to top, with current bases. Numbers are from the original 26-PR stack, each PR against its parent at the time, on the older `main` the stack forked from (967 cyclic modules then). They have not been remeasured since the eight PRs above left the stack. Where the base changed, the parent the numbers were measured on is in parentheses. Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19111, Comfy-Org#19113 and Comfy-Org#19131 still carry the old commits of the PRs they were moved off (Comfy-Org#19131 carries Comfy-Org#19122, Comfy-Org#19124, Comfy-Org#19125 and Comfy-Org#19127), so their GitHub diffs are wider than one PR until the stack is rebased. | PR | Base | Change | Cyclic modules | Largest cycle | | --- | --- | --- | --- | --- | | Comfy-Org#19085 | `main` | Import-cycle baseline check (`pnpm lint:cycles`) | 967 (baseline) | 923 (baseline) | | Comfy-Org#19088 | Comfy-Org#19085 | Split litegraph `interfaces.ts` into leaf types | 967 -> 949 | 923 -> 905 | | Comfy-Org#19091 | Comfy-Org#19088 (measured on Comfy-Org#19089) | Register core sidebar tabs outside `sidebarTabStore` | 816 -> 669 | 618 -> 465 | | Comfy-Org#19092 | Comfy-Org#19091 | Load extensions from bootstrap, not `extensionService` | 669 -> 580 | 465 -> 371 | | Comfy-Org#19093 | Comfy-Org#19092 | Split `scripts/widgets.ts` registry, types, helpers | 580 -> 566 | 371 -> 357 | | Comfy-Org#19107 | Comfy-Org#19093 (measured on Comfy-Org#19094) | Register settings dialog from the app shell | 558 -> 509 | 349 -> 297 | | Comfy-Org#19108 | Comfy-Org#19107 | Register asset browser modal from the app shell | 509 -> 496 | 297 -> 284 | | Comfy-Org#19111 | Comfy-Org#19108 (measured on Comfy-Org#19109) | Register core bottom panel tabs from GraphView | 484 -> 476 | 272 -> 264 | | Comfy-Org#19113 | Comfy-Org#19111 (measured on Comfy-Org#19112) | Model library asset-browser routing onto the sidebar tab | 471 -> 467 | 257 -> 253 | | Comfy-Org#19116 | Comfy-Org#19113 | Progress text previews out of `executionStore` | 467 -> 464 | 253 -> 250 | | Comfy-Org#19118 | Comfy-Org#19116 | Inject the api auth provider from `main.ts` | 464 -> 447 | 250 -> 233 | | Comfy-Org#19121 | Comfy-Org#19118 | Install workspace api credentials from `main.ts` | 447 -> 428 | 233 -> 214 | | Comfy-Org#19131 | Comfy-Org#19121 (measured on Comfy-Org#19127) | Feature dialogs out of `dialogService` | 400 -> 391 | 181 -> 172 | | **Comfy-Org#19143** (this PR) | **Comfy-Org#19131** | **Invert `scripts/app` behind `useApp()`** | **391 -> 352** | **172 -> 149** | | Comfy-Org#19148 | Comfy-Org#19143 | Billing rails announce refreshes; dialogs above the facade | 352 -> 324 | 149 (baseline) | | Comfy-Org#19153 | Comfy-Org#19148 | `types/comfy`, `comfyWorkflow`, dialog/workflow contracts as leaves | 324 -> 293 | 149 (baseline) | | Comfy-Org#19186 | Comfy-Org#19153 | Workbench cycles: `openManager` onto `useManagerDialog`, agent leaves | 293 -> 259 | 149 (baseline) | | Comfy-Org#19189 | Comfy-Org#19186 | Thirteen small app cycles: ui, nodeDef, auth dialogs, menu, and more | 259 -> 211 | 149 (baseline) | <!-- stack-table:end --> --------- Co-authored-by: Amp <amp@ampcode.com>
## Summary `types/comfy.ts` is the public extension contract, yet it imported `scripts/widgets`, `scripts/ui`, and the workflow store, so every module that typed against `ComfyApp` was pulled into the app's largest import cycle. This PR makes `types/comfy.ts`, `types/extensionTypes.ts`, and `comfyWorkflow.ts` leaves: they no longer reach `scripts/appInstance`. Before the review fixes, depcruise measured the 273-module app SCC splitting into 119 + 58 modules. Import-cycle measurements before the review fixes: 371 -> 341 cyclic modules, largest SCC 154 -> 154 (litegraph), 1451 -> 1335 cyclic edges, on `main` df4ea6d (Comfy-Org#19143 merged as cdc9fe0). These counts have not been remeasured after restoring the extension hooks. `workflowStoreTypes.ts` carries main's `nodeLocatorIdToNodeId: ... => NodeId | null` signature, which landed on `main` after the interface moved. Targets `main` directly, rebased onto df4ea6d after Comfy-Org#19143 merged (cdc9fe0). Tracks FE-2769 / FE-3037. ## Changes - `ComfyWidgetConstructor` / `CustomComfyWidgetConstructor` are declared in `types/comfy.ts`; `scripts/widgets.ts` imports them. `ComfyApp.widgets` is typed as `Record<string, ComfyWidgetConstructor | CustomComfyWidgetConstructor>` instead of `typeof ComfyWidgets`, and `dynamicComboWidget` narrows the result of `app.widgets.COMBO`. - `MissingModelPipelineResult` moves to `platform/missingModel/types.ts`; `groupCandidatesByName` moves into `missingModelGrouping.ts` so grouping stops importing scan. - `scripts/ui.ts`: `ComfyUI(app, host)` takes the app and a `LegacyMenuHost` (`resetView`, `restoreOutputs`, `trackRunButton`, `enterFocusMode`) instead of calling `useApp()`, `litegraphService`, `nodeOutputStore`, `workspaceStore`, and `useRunButtonTelemetry`. `app.ts` wires the host. - `comfyWorkflow.ts` becomes a leaf. `WorkflowChangeTracker` is an interface `ChangeTracker` implements. A `WorkflowRuntime` (`createChangeTracker`, draft get/remove/markUsed, `isDraftPersistenceEnabled`) is registered by `workflowStore.ts` at module scope, replacing the dynamic `import('@/scripts/changeTracker')` and the direct settings/draft-store imports. - `ComfyWorkflow.promptSave()` remains an extension override point. Its default delegates to the registered `WorkflowRuntime`, which opens the dialog using `saveNamePrompt` i18n keys, overridden by `SubgraphBlueprint`. `workflowService.saveWorkflowAs` continues calling the hook. - Clipspace editor save honors `ComfyApp.pasteFromClipspace` overrides. Image paste updates store-backed outputs without requiring legacy previews and skips absent selections while still pasting widget values. - New leaf `workflowStoreTypes.ts` exports the `WorkflowStore` interface; `ExtensionManager.workflow` is typed as `WorkflowStore`. - New leaf `services/dialogServiceTypes.ts` with `CoreDialogService`, `ExtensionDialogService`, `ConfirmOptions`, `ExecutionErrorDialogInput`; `useDialogService()` returns `CoreDialogService` and `extensionTypes.ts` imports the leaf. `ExtensionDialogService` carries main's current signatures (`showCancelSubscriptionDialog` scope/confirmed args, `paymentIntentSource`, `showInviteLinkInvalidDialog`, `showInviteWrongAccountDialog`). - `comfyWorkflow.test.ts` deleted (it tested the dynamic-import failure path that no longer exists); `workflowService.test.ts` mocks `useDialogService().prompt` and asserts the save-name copy; `ui.test.ts` / `ui.setStatus.test.ts` pass the app and a stub host. ## Review Focus - `ComfyApp.widgets` loses the `typeof ComfyWidgets` key typing. Core widget constructors are still reachable as `useWidgetStore().coreWidgets`; extension code indexing `app.widgets.<Name>` now gets the union type. - `ExtensionManager.workflow` no longer exposes Pinia `$`-methods on the public type. Extensions calling `app.extensionManager.workflow.$patch` would be a type break (runtime unchanged). - `ComfyWorkflow.promptSave` is preserved because [RigShare](https://github.com/xiaodoudou/ComfyUI-RigShare/blob/3de3cc32e2a5bd266879dd6b346f8960ad4dd619/web/rigshare/save-dialog.js#L22) and [Bada-Utils](https://github.com/bada-ya/ComfyUI-Bada-Utils/blob/0898b33e803df8e169501d8fe0cf1fd04044f7bf/web/workflow_organizer.js#L2996) wrap its prototype implementation to customize Save As. A regression test checks that an override's filename reaches the save path. - `workflowStore.ts` now imports `ChangeTracker` statically. fallow sees the previously dynamic `comfyWorkflow -> workflowStore -> changeTracker` 3-cycle reshaped into two short `workflowStore <-> changeTracker` cycles; this plus 28 pre-existing cycles fallow newly enumerates (auth/session, api <-> authStore <-> dialogService, promotionUtils through canvasStore and litegraphService, useAppMode -> workflowStore -> changeTracker -> executionStore, workflowStore <-> executionStore, canvasStore <-> litegraphUtil) are baselined in `.fallow-baselines/dead-code.json`. Breaking `changeTracker -> workflowStore` needs a host injection into `ChangeTracker` and a rewrite of its 1400-line test, so it is left for a follow-up. - `dynamicComboWidget` keeps the runtime lookup through `app.widgets.COMBO`. A static import of `useComboWidget` or `widgetStore` from `dynamicWidgets.ts` creates a module-evaluation cycle with `scripts/widgets.ts` (`...dynamicWidgets` spread sees an uninitialised binding), which is why the assert-based narrowing is used instead. <!-- stack-table:start --> ## Stack Import-cycle progress for FE-3037, measured with `pnpm lint:cycles` (dependency-cruiser on `src`). ### Standalone PRs targeting `main` Each is one commit on current `main` and can merge on its own. Numbers are that PR alone against `origin/main` (1027 cyclic modules, largest cycle 983, 4562 cyclic edges). | PR | Base | Change | Cyclic modules | Largest cycle | Cyclic edges | | --- | --- | --- | --- | --- | --- | | Comfy-Org#19089 | `main` | `ServerFeatureFlag` enum to a leaf module | 1027 -> 884 | 983 -> 677 | 4562 -> 3382 | | Comfy-Org#19094 | `main` | Empty-workflow dialog out of `appModeStore` | 1027 -> 1026 | 983 -> 982 | 4562 -> 4558 | | Comfy-Org#19109 | `main` | Mask editor menu item into `Comfy.MaskEditor` extension | 1027 -> 1027 | 983 -> 983 | 4562 -> 4562 | | Comfy-Org#19112 | `main` | `PositionConfig` and layer editor dialog key to leaf modules | 1027 -> 1027 | 983 -> 983 | 4562 -> 4558 | | Comfy-Org#19122 | `main` | `settingStore` off `scripts/app`; `$el` to a leaf | 1027 -> 1025 | 983 -> 981 | 4562 -> 4552 | | Comfy-Org#19124 | `main` | `MissingNodeType` to the nodeReplacement leaf | 1027 -> 1027 | 983 -> 983 | 4562 -> 4555 | | Comfy-Org#19125 | `main` | Blueprint node defs owned by `nodeDefStore` | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | | Comfy-Org#19127 | `main` | Thumbnail and minimap data from explicit inputs | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | All eight together on `main`, plus Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19108, Comfy-Org#19111, Comfy-Org#19116 and Comfy-Org#19113 (checked locally; those six are not retargeted yet): 630 cyclic modules, largest cycle 412, 2476 cyclic edges. ### Remaining stack Bottom to top, with current bases. Numbers are from the original 26-PR stack, each PR against its parent at the time, on the older `main` the stack forked from (967 cyclic modules then). They have not been remeasured since the eight PRs above left the stack. Where the base changed, the parent the numbers were measured on is in parentheses. Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19111, Comfy-Org#19113 and Comfy-Org#19131 still carry the old commits of the PRs they were moved off (Comfy-Org#19131 carries Comfy-Org#19122, Comfy-Org#19124, Comfy-Org#19125 and Comfy-Org#19127), so their GitHub diffs are wider than one PR until the stack is rebased. | PR | Base | Change | Cyclic modules | Largest cycle | | --- | --- | --- | --- | --- | | Comfy-Org#19085 | `main` | Import-cycle baseline check (`pnpm lint:cycles`) | 967 (baseline) | 923 (baseline) | | Comfy-Org#19088 | Comfy-Org#19085 | Split litegraph `interfaces.ts` into leaf types | 967 -> 949 | 923 -> 905 | | Comfy-Org#19091 | Comfy-Org#19088 (measured on Comfy-Org#19089) | Register core sidebar tabs outside `sidebarTabStore` | 816 -> 669 | 618 -> 465 | | Comfy-Org#19092 | Comfy-Org#19091 | Load extensions from bootstrap, not `extensionService` | 669 -> 580 | 465 -> 371 | | Comfy-Org#19093 | Comfy-Org#19092 | Split `scripts/widgets.ts` registry, types, helpers | 580 -> 566 | 371 -> 357 | | Comfy-Org#19107 | Comfy-Org#19093 (measured on Comfy-Org#19094) | Register settings dialog from the app shell | 558 -> 509 | 349 -> 297 | | Comfy-Org#19108 | Comfy-Org#19107 | Register asset browser modal from the app shell | 509 -> 496 | 297 -> 284 | | Comfy-Org#19111 | Comfy-Org#19108 (measured on Comfy-Org#19109) | Register core bottom panel tabs from GraphView | 484 -> 476 | 272 -> 264 | | Comfy-Org#19113 | Comfy-Org#19111 (measured on Comfy-Org#19112) | Model library asset-browser routing onto the sidebar tab | 471 -> 467 | 257 -> 253 | | Comfy-Org#19116 | Comfy-Org#19113 | Progress text previews out of `executionStore` | 467 -> 464 | 253 -> 250 | | Comfy-Org#19118 | Comfy-Org#19116 | Inject the api auth provider from `main.ts` | 464 -> 447 | 250 -> 233 | | Comfy-Org#19121 | Comfy-Org#19118 | Install workspace api credentials from `main.ts` | 447 -> 428 | 233 -> 214 | | Comfy-Org#19131 | Comfy-Org#19121 (measured on Comfy-Org#19127) | Feature dialogs out of `dialogService` | 400 -> 391 | 181 -> 172 | | Comfy-Org#19143 | Comfy-Org#19131 | Invert `scripts/app` behind `useApp()` | 391 -> 352 | 172 -> 149 | | Comfy-Org#19148 | Comfy-Org#19143 | Billing rails announce refreshes; dialogs above the facade | 352 -> 324 | 149 (baseline) | | **Comfy-Org#19153** (this PR) | **Comfy-Org#19148** | **`types/comfy`, `comfyWorkflow`, dialog/workflow contracts as leaves** | **324 -> 293** | **149 (baseline)** | | Comfy-Org#19186 | Comfy-Org#19153 | Workbench cycles: `openManager` onto `useManagerDialog`, agent leaves | 293 -> 259 | 149 (baseline) | | Comfy-Org#19189 | Comfy-Org#19186 | Thirteen small app cycles: ui, nodeDef, auth dialogs, menu, and more | 259 -> 211 | 149 (baseline) | <!-- stack-table:end --> --------- Co-authored-by: Amp <amp@ampcode.com>
## Summary Removes the import cycles left inside `src/workbench`: the 28-module manager cycle and the agent CRDT status cycle. `workbench/` is now cycle-free, which is a prerequisite for giving it its own TypeScript project reference. Import cycles: 341 -> 311 cyclic modules, 20 -> 18 cycles, largest SCC 154 -> 154 (litegraph), 1335 -> 1262 cyclic edges, on top of Comfy-Org#19153 (rebased onto `main` df4ea6d). Stacked on Comfy-Org#19153 (rebased onto the `drjkl/comfy-types-leaf` chain). Tracks FE-2769 / FE-3037. ## Changes - Manager: `useManagerState` had two responsibilities, deriving the manager UI state and opening the manager. Opening needs `useManagerDialog`, which imports `ManagerDialog.vue`, whose subtree imports `useManagerState` again. `openManager` moves to `useManagerDialog`, which already owns `show()`/`hide()`. `useManagerState` keeps the state derivations and the once-per-session upgrade toast, and exports `showIncompatibleManagerToast({ force })` so the explicit-click re-emit lives with `openManager`. - Callers (`useCoreCommands`, `TopMenuSection`, `ComfyMenuButton`, `HelpCenterMenuContent`, `ErrorGroupList`, `MissingPackGroupRow`) call `useManagerDialog().openManager(...)`. `ComfyMenuButton` no longer needs `useManagerState`. The legacy-menu error toast in `openManager` uses the `useToast()` API from Comfy-Org#16313, as `useManagerState` does on `main`. - Tests: `openManager` coverage moves from `useManagerState.test.ts` to `useManagerDialog.test.ts` and now covers all four states (DISABLED, INCOMPATIBLE, LEGACY_UI with and without `showToastOnLegacyError`, NEW_UI with and without `isLegacyOnly`) by driving the real `useManagerState` through `systemStatsStore` and spied `api` feature flags. The shared `__mocks__/useManagerState.ts` drops `openManager`; a new `__mocks__/useManagerDialog.ts` covers component tests. - Agent composer: the `ComposerAttachment` leaf this PR originally introduced already landed on main (`types/composerAttachment.ts`), so that part is dropped. - Agent CRDT: `AgentCrdtStatus` and `AgentCrdtOutcomeCounters` move to a new leaf `crdt/agentCrdtStatus.ts` so `crdtSnapshot.ts` stops importing `useAgentCrdtFollower.ts`. - fallow baselines: `dead-code.json` is unchanged (the stale manager entries stay as unused baseline rows); the `crap_high` entry for `openManager` moves from `useManagerState.ts` to `useManagerDialog.ts` in `health.json` (same function, new file). ## Review Focus - `openManager` now calls `useManagerState()` per invocation. Its `watch(..., { immediate: true })` runs once per call and can fire the once-per-session INCOMPATIBLE toast if no component had instantiated the composable yet. That matches the previous behaviour, where every caller instantiated `useManagerState()` before calling `openManager`. - `useManagerDialog` now imports `useManagerState`; the dependency direction is dialog -> state, matching `useManagerDialog -> ManagerDialog.vue -> ... -> useManagerState`. <!-- stack-table:start --> ## Stack Import-cycle progress for FE-3037, measured with `pnpm lint:cycles` (dependency-cruiser on `src`). ### Standalone PRs targeting `main` Each is one commit on current `main` and can merge on its own. Numbers are that PR alone against `origin/main` (1027 cyclic modules, largest cycle 983, 4562 cyclic edges). | PR | Base | Change | Cyclic modules | Largest cycle | Cyclic edges | | --- | --- | --- | --- | --- | --- | | Comfy-Org#19089 | `main` | `ServerFeatureFlag` enum to a leaf module | 1027 -> 884 | 983 -> 677 | 4562 -> 3382 | | Comfy-Org#19094 | `main` | Empty-workflow dialog out of `appModeStore` | 1027 -> 1026 | 983 -> 982 | 4562 -> 4558 | | Comfy-Org#19109 | `main` | Mask editor menu item into `Comfy.MaskEditor` extension | 1027 -> 1027 | 983 -> 983 | 4562 -> 4562 | | Comfy-Org#19112 | `main` | `PositionConfig` and layer editor dialog key to leaf modules | 1027 -> 1027 | 983 -> 983 | 4562 -> 4558 | | Comfy-Org#19122 | `main` | `settingStore` off `scripts/app`; `$el` to a leaf | 1027 -> 1025 | 983 -> 981 | 4562 -> 4552 | | Comfy-Org#19124 | `main` | `MissingNodeType` to the nodeReplacement leaf | 1027 -> 1027 | 983 -> 983 | 4562 -> 4555 | | Comfy-Org#19125 | `main` | Blueprint node defs owned by `nodeDefStore` | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | | Comfy-Org#19127 | `main` | Thumbnail and minimap data from explicit inputs | 1027 -> 1027 | 983 -> 983 | 4562 -> 4561 | All eight together on `main`, plus Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19108, Comfy-Org#19111, Comfy-Org#19116 and Comfy-Org#19113 (checked locally; those six are not retargeted yet): 630 cyclic modules, largest cycle 412, 2476 cyclic edges. ### Remaining stack Bottom to top, with current bases. Numbers are from the original 26-PR stack, each PR against its parent at the time, on the older `main` the stack forked from (967 cyclic modules then). They have not been remeasured since the eight PRs above left the stack. Where the base changed, the parent the numbers were measured on is in parentheses. Comfy-Org#19091, Comfy-Org#19107, Comfy-Org#19111, Comfy-Org#19113 and Comfy-Org#19131 still carry the old commits of the PRs they were moved off (Comfy-Org#19131 carries Comfy-Org#19122, Comfy-Org#19124, Comfy-Org#19125 and Comfy-Org#19127), so their GitHub diffs are wider than one PR until the stack is rebased. | PR | Base | Change | Cyclic modules | Largest cycle | | --- | --- | --- | --- | --- | | Comfy-Org#19085 | `main` | Import-cycle baseline check (`pnpm lint:cycles`) | 967 (baseline) | 923 (baseline) | | Comfy-Org#19088 | Comfy-Org#19085 | Split litegraph `interfaces.ts` into leaf types | 967 -> 949 | 923 -> 905 | | Comfy-Org#19091 | Comfy-Org#19088 (measured on Comfy-Org#19089) | Register core sidebar tabs outside `sidebarTabStore` | 816 -> 669 | 618 -> 465 | | Comfy-Org#19092 | Comfy-Org#19091 | Load extensions from bootstrap, not `extensionService` | 669 -> 580 | 465 -> 371 | | Comfy-Org#19093 | Comfy-Org#19092 | Split `scripts/widgets.ts` registry, types, helpers | 580 -> 566 | 371 -> 357 | | Comfy-Org#19107 | Comfy-Org#19093 (measured on Comfy-Org#19094) | Register settings dialog from the app shell | 558 -> 509 | 349 -> 297 | | Comfy-Org#19108 | Comfy-Org#19107 | Register asset browser modal from the app shell | 509 -> 496 | 297 -> 284 | | Comfy-Org#19111 | Comfy-Org#19108 (measured on Comfy-Org#19109) | Register core bottom panel tabs from GraphView | 484 -> 476 | 272 -> 264 | | Comfy-Org#19113 | Comfy-Org#19111 (measured on Comfy-Org#19112) | Model library asset-browser routing onto the sidebar tab | 471 -> 467 | 257 -> 253 | | Comfy-Org#19116 | Comfy-Org#19113 | Progress text previews out of `executionStore` | 467 -> 464 | 253 -> 250 | | Comfy-Org#19118 | Comfy-Org#19116 | Inject the api auth provider from `main.ts` | 464 -> 447 | 250 -> 233 | | Comfy-Org#19121 | Comfy-Org#19118 | Install workspace api credentials from `main.ts` | 447 -> 428 | 233 -> 214 | | Comfy-Org#19131 | Comfy-Org#19121 (measured on Comfy-Org#19127) | Feature dialogs out of `dialogService` | 400 -> 391 | 181 -> 172 | | Comfy-Org#19143 | Comfy-Org#19131 | Invert `scripts/app` behind `useApp()` | 391 -> 352 | 172 -> 149 | | Comfy-Org#19148 | Comfy-Org#19143 | Billing rails announce refreshes; dialogs above the facade | 352 -> 324 | 149 (baseline) | | Comfy-Org#19153 | Comfy-Org#19148 | `types/comfy`, `comfyWorkflow`, dialog/workflow contracts as leaves | 324 -> 293 | 149 (baseline) | | **Comfy-Org#19186** (this PR) | **Comfy-Org#19153** | **Workbench cycles: `openManager` onto `useManagerDialog`, agent leaves** | **293 -> 259** | **149 (baseline)** | | Comfy-Org#19189 | Comfy-Org#19186 | Thirteen small app cycles: ui, nodeDef, auth dialogs, menu, and more | 259 -> 211 | 149 (baseline) | <!-- stack-table:end --> --------- Co-authored-by: Amp <amp@ampcode.com>
Summary
Re-implemented on current
main(the original commit no longer applied afterapi.tsgainedauthCredential, the web-session fetch and unified remint). Now targetsmaindirectly. Tracks FE-2769 / FE-3037.ComfyApireached into the auth layer itself: it lazily importedauthStorefor the Firebase header and WebSocket token, and importedremintRetryfor the 401 re-mint fetch. Both pull the cloud auth graph (workspace store, session cookie, feature flags, SSO dialogs) intoapi.ts, the most imported module insrc/. The client now takes anApiAuthProvider; the cloud provider is installed frommain.ts.Import cycles (dependency-cruiser on
src, againstmainat 18a9c42): 511 -> 457 cyclic modules, largest SCC 296 -> 232, cyclic edges 2121 -> 1811 (15 -> 17 cycles: the big SCC splits).Changes
src/platform/auth/apiAuthProvider.ts(leaf):ApiAuthProviderinterface (waitForInitialization,getAuthHeader,getAuthToken,shouldRetryOn401,fetch),RetrySignalLifecycle, andanonymousApiAuthProvider(no header, no token, no retry, plainfetch).src/platform/auth/cloudApiAuthProvider.ts: the moved token logic (auth-store wait bounded byAUTH_INIT_TIMEOUT_MSfrom@/scripts/apiTimeouts, header/token lookup with the sameconsole.warnfallbacks, WebSocket token telemetry,shouldRemintCloudRequest,fetchWithUnifiedRemint).installCloudApiAuth()sets it onapi.api.ts:setAuthProvider;addCloudAuthHeader,addSocketAuthand the token-pathfetchdelegate to the provider. No moreauthStoreorremintRetryimports. The web-session path (webSessionRequests,scopeMediaRoute),authCredentialOf/notifyAuthCredentialreporting and theisCloudgates stay where they are: those modules are leaves.main.ts:installCloudApiAuth()in the existingisCloudblock, before any request.remintRetry.tsimportsRetrySignalLifecyclefrom the leaf instead of declaring it.ToastAction/ToastOptionsmove fromtypes/extensionTypes.tsto a new leaftypes/toastOptions.ts(extensionTypesre-exports them, so@/typesis unchanged). [Phase 6a] Replace PrimeVue Toast with design-system toast #16313 madeapi.tsimportcomponents/ui/toast/toastStore, which took these types fromextensionTypes, andextensionTypesreachesworkflowStore,dialogServiceandcommandStorethrough type imports. Without this move the provider split leavesapi.tsinside the application SCC and the numbers above do not change at all.api.fetchApi,api.socketReset,webSessionFlagOff,webSessionFlagOn,nonWebClientsStayOnTokens) callinstallCloudApiAuth()where they previously relied on the lazy import; the localhost row installs the anonymous provider, as a local build does. Newit.fortable inapi.fetchApi.test.tschecks the header is applied, the retry decision is consulted only for authenticated requests, and the request goes through the provider'sfetch.Review Focus
installCloudApiAuth()are anonymous.main.tsinstalls it first thing in the cloud block;refreshRemoteConfig({ useAuth: false })uses barefetch, so nothing earlier needs credentials.fetchApiandcreateSocketkeep theirisCloudgates. Onmainthe web session is switched on by a server feature flag, not by distribution, so dropping the gate could route a local build's requests through the session. Keeping it also leaves the localcreateSocketpath synchronous, soapi.featureFlags.test.tsneeds no change.api.tsalready importeduseTelemetrystatically, so the old dynamic import saved nothing.Stack
Import-cycle progress for FE-3037, measured with
pnpm lint:cycles(dependency-cruiser onsrc).Standalone PRs targeting
mainEach is one commit on current
mainand can merge on its own. Numbers are that PR alone againstorigin/main(1027 cyclic modules, largest cycle 983, 4562 cyclic edges).mainServerFeatureFlagenum to a leaf modulemainappModeStoremainComfy.MaskEditorextensionmainPositionConfigand layer editor dialog key to leaf modulesmainsettingStoreoffscripts/app;$elto a leafmainMissingNodeTypeto the nodeReplacement leafmainnodeDefStoremainAll eight together on
main, plus #19091, #19107, #19108, #19111, #19116 and #19113 (checked locally; those six are not retargeted yet): 630 cyclic modules, largest cycle 412, 2476 cyclic edges.Remaining stack
Bottom to top, with current bases. Numbers are from the original 26-PR stack, each PR against its parent at the time, on the older
mainthe stack forked from (967 cyclic modules then). They have not been remeasured since the eight PRs above left the stack. Where the base changed, the parent the numbers were measured on is in parentheses.#19091, #19107, #19111, #19113 and #19131 still carry the old commits of the PRs they were moved off (#19131 carries #19122, #19124, #19125 and #19127), so their GitHub diffs are wider than one PR until the stack is rebased.
mainpnpm lint:cycles)interfaces.tsinto leaf typessidebarTabStoreextensionServicescripts/widgets.tsregistry, types, helpersexecutionStoremain.tsmain.tsdialogServicescripts/appbehinduseApp()types/comfy,comfyWorkflow, dialog/workflow contracts as leavesopenManagerontouseManagerDialog, agent leaves