Repository navigation
refactor(account): make the scheduled-refresh outcome a discriminated result - #17648
Conversation
… result The onScheduledOutcome callback took an outcome string and an optional SessionFailure as two independent arguments, so the type allowed impossible pairs: a permanent failure without an error, or a success with one. Replace the pair with a single discriminated ScheduledRefreshReport whose failure-bearing variants (permanent_failure, expired) require the failure payload and whose other variants carry none, so those pairs can no longer be represented. Behavior is unchanged. Fixes FE-2185
🌐 Website E2ETip All tests passed.
🎭 Playwright: ❌ 1977 passed, 8 failed · 3 flaky❌ Failed Tests📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 10 MB gzip 🔴 +312 kBDetailsSummary
Category Glance App Entry Points — 3.73 kB (baseline 3.73 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.44 MB (baseline 1.43 MB) • 🔴 +14.5 kBGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 132 kB (baseline 124 kB) • 🔴 +7.89 kBTop-level views, pages, and routed surfaces
Status: 17 added / 16 removed / 1 unchanged Panels & Settings — 622 kB (baseline 621 kB) • 🔴 +972 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 16 unchanged User & Accounts — 26.2 kB (baseline 27.8 kB) • 🟢 -1.62 kBAuthentication, profile, and account management bundles
Status: 8 added / 8 removed / 3 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • 🔴 +740 BModals, dialogs, drawers, and in-app editors
Status: 8 added / 8 removed UI Components — 123 kB (baseline 117 kB) • 🔴 +6.26 kBReusable component library chunks
Status: 16 added / 15 removed Data & Services — 3.71 MB (baseline 3.6 MB) • 🔴 +111 kBStores, services, APIs, and repositories
Status: 16 added / 16 removed Utilities & Hooks — 560 kB (baseline 559 kB) • 🔴 +1.35 kBHelpers, composables, and utility bundles
Status: 29 added / 28 removed / 8 unchanged Vendor & Third-Party — 18.2 MB (baseline 18.1 MB) • 🔴 +137 kBExternal libraries and shared vendor chunks
Status: 9 added / 9 removed / 9 unchanged Other — 17.5 MB (baseline 16.4 MB) • 🔴 +1.11 MBBundles that do not match a named category
Status: 171 added / 171 removed / 125 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-14T18:07:45.427Z",
"gitSha": "12655f718e038b999cfdf93c98752d9538cc2214",
"branch": "maanil/fe-2185-discriminated-outcome",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2041.5250000000356,
"styleRecalcs": 6,
"styleRecalcDurationMs": 5.665000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 628.918,
"heapDeltaBytes": 4741404,
"heapUsedBytes": 66655936,
"domNodes": -269,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 11.415000000000001,
"eventListeners": -156,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 2003.4919999999943,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.538000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 364.42900000000003,
"heapDeltaBytes": 10807568,
"heapUsedBytes": 72991352,
"domNodes": -261,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 8.791,
"eventListeners": -154,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1905.7680000000232,
"styleRecalcs": 78,
"styleRecalcDurationMs": 34.151,
"layouts": 14,
"layoutDurationMs": 5.142,
"taskDurationMs": 935.9399999999998,
"heapDeltaBytes": -911388,
"heapUsedBytes": 61270676,
"domNodes": -261,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 161.853,
"eventListeners": -186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1909.3030000000226,
"styleRecalcs": 76,
"styleRecalcDurationMs": 29.615,
"layouts": 14,
"layoutDurationMs": 4.782,
"taskDurationMs": 921.1709999999998,
"heapDeltaBytes": 9990096,
"heapUsedBytes": 72127632,
"domNodes": -262,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 163.84799999999998,
"eventListeners": -156,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1754.2600000000448,
"styleRecalcs": 31,
"styleRecalcDurationMs": 17.796000000000003,
"layouts": 6,
"layoutDurationMs": 1.313,
"taskDurationMs": 383.55999999999995,
"heapDeltaBytes": 2169416,
"heapUsedBytes": 64273320,
"domNodes": 75,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 14.179,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1738.7270000000399,
"styleRecalcs": 31,
"styleRecalcDurationMs": 17.196999999999996,
"layouts": 6,
"layoutDurationMs": 1.2519999999999998,
"taskDurationMs": 364.45000000000005,
"heapDeltaBytes": 2225820,
"heapUsedBytes": 64402944,
"domNodes": 75,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 12.456999999999999,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 701.769000000013,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.500999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 470.47299999999996,
"heapDeltaBytes": 17407672,
"heapUsedBytes": 78428012,
"domNodes": 16,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 165.12099999999998,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 667.0480000000225,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.716000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 448.30099999999993,
"heapDeltaBytes": 17901936,
"heapUsedBytes": 79997436,
"domNodes": 18,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 163.47899999999998,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2040.6839999999988,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.423999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 734.897,
"heapDeltaBytes": 3363784,
"heapUsedBytes": 82944436,
"domNodes": -248,
"jsHeapTotalBytes": -794624,
"scriptDurationMs": 36.767999999999994,
"eventListeners": -154,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-idle",
"durationMs": 2040.8639999999423,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.087000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 607.253,
"heapDeltaBytes": 3755444,
"heapUsedBytes": 82925972,
"domNodes": -250,
"jsHeapTotalBytes": -270336,
"scriptDurationMs": 36.178999999999995,
"eventListeners": -182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2345.3059999999937,
"styleRecalcs": 63,
"styleRecalcDurationMs": 10.348000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1693.394,
"heapDeltaBytes": 13582604,
"heapUsedBytes": 78679348,
"domNodes": 2,
"jsHeapTotalBytes": 1011712,
"scriptDurationMs": 831.489,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2261.363000000074,
"styleRecalcs": 66,
"styleRecalcDurationMs": 11.861,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1629.7189999999998,
"heapDeltaBytes": 15635280,
"heapUsedBytes": 79804584,
"domNodes": -250,
"jsHeapTotalBytes": 749568,
"scriptDurationMs": 842.348,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3810.879,
"styleRecalcs": 60,
"styleRecalcDurationMs": 12.254000000000001,
"layouts": 60,
"layoutDurationMs": 16.348000000000003,
"taskDurationMs": 1876.197,
"heapDeltaBytes": 9819764,
"heapUsedBytes": 73565036,
"domNodes": -263,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 857.6120000000001,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "large-graph-zoom",
"durationMs": 3612.622999999985,
"styleRecalcs": 61,
"styleRecalcDurationMs": 12.245000000000003,
"layouts": 60,
"layoutDurationMs": 15.1,
"taskDurationMs": 1748.7920000000001,
"heapDeltaBytes": 8519508,
"heapUsedBytes": 74199632,
"domNodes": 2,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 803.662,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3218.2150000000433,
"styleRecalcs": 41,
"styleRecalcDurationMs": 6.775999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2130.011,
"heapDeltaBytes": 23863684,
"heapUsedBytes": 89707424,
"domNodes": -256,
"jsHeapTotalBytes": 679936,
"scriptDurationMs": 1067.642,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3199.434999999994,
"styleRecalcs": 44,
"styleRecalcDurationMs": 9.458000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2046.6190000000001,
"heapDeltaBytes": -2255212,
"heapUsedBytes": 81130616,
"domNodes": -256,
"jsHeapTotalBytes": 1196032,
"scriptDurationMs": 1038.535,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2058.7260000000356,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.720000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 640.8679999999999,
"heapDeltaBytes": -10460276,
"heapUsedBytes": 77344520,
"domNodes": -261,
"jsHeapTotalBytes": 552960,
"scriptDurationMs": 35.214000000000006,
"eventListeners": -184,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2011.5330000000995,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.240999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 571.24,
"heapDeltaBytes": 19344448,
"heapUsedBytes": 83708192,
"domNodes": -249,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 41.61200000000001,
"eventListeners": -154,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 636.3699999999994,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.894999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 433.09,
"heapDeltaBytes": 13407884,
"heapUsedBytes": 76926552,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 148.134,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 619.2970000000741,
"styleRecalcs": 45,
"styleRecalcDurationMs": 10.185999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 417.357,
"heapDeltaBytes": 14064272,
"heapUsedBytes": 76959676,
"domNodes": 16,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 149.728,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2024.2900000000077,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.169999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 571.342,
"heapDeltaBytes": 8421196,
"heapUsedBytes": 71880008,
"domNodes": -275,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 12.021,
"eventListeners": -200,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2022.3210000000336,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.244,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 531.356,
"heapDeltaBytes": 14319696,
"heapUsedBytes": 77656264,
"domNodes": -275,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 10.265999999999998,
"eventListeners": -200,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1716.372999999976,
"styleRecalcs": 77,
"styleRecalcDurationMs": 29.419,
"layouts": 18,
"layoutDurationMs": 5.848,
"taskDurationMs": 851.0589999999999,
"heapDeltaBytes": 5901708,
"heapUsedBytes": 69263948,
"domNodes": -277,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 115.173,
"eventListeners": -202,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1699.5889999999463,
"styleRecalcs": 77,
"styleRecalcDurationMs": 30.319000000000003,
"layouts": 18,
"layoutDurationMs": 5.884,
"taskDurationMs": 827.774,
"heapDeltaBytes": 7372808,
"heapUsedBytes": 70851908,
"domNodes": -277,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 112.00999999999999,
"eventListeners": -202,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1368.1059999999547,
"styleRecalcs": 16,
"styleRecalcDurationMs": 30.144000000000005,
"layouts": 5,
"layoutDurationMs": 12.326,
"taskDurationMs": 936.6920000000001,
"heapDeltaBytes": 19286988,
"heapUsedBytes": 100903660,
"domNodes": 13587,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 30.18,
"eventListeners": 2387,
"totalBlockingTimeMs": 138,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8519.045000000006,
"styleRecalcs": 247,
"styleRecalcDurationMs": 42.702999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6096.834000000001,
"heapDeltaBytes": -12429404,
"heapUsedBytes": 66795108,
"domNodes": -248,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 2765.793,
"eventListeners": -136,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8294.45899999996,
"styleRecalcs": 249,
"styleRecalcDurationMs": 43.928999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5790.037,
"heapDeltaBytes": -13208616,
"heapUsedBytes": 66617464,
"domNodes": -247,
"jsHeapTotalBytes": 2351104,
"scriptDurationMs": 2701.805,
"eventListeners": -168,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 18091.057999999975,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17898.281,
"heapDeltaBytes": -7979152,
"heapUsedBytes": 186466296,
"domNodes": -6542,
"jsHeapTotalBytes": 466944,
"scriptDurationMs": 308.38500000000005,
"eventListeners": -7478,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 18134.855000000018,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17922.708,
"heapDeltaBytes": -7492088,
"heapUsedBytes": 194201936,
"domNodes": -6542,
"jsHeapTotalBytes": 2039808,
"scriptDurationMs": 298.559,
"eventListeners": -7478,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 22063.58599999999,
"styleRecalcs": 162,
"styleRecalcDurationMs": 22.919999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21867.176,
"heapDeltaBytes": -17910012,
"heapUsedBytes": 185310904,
"domNodes": -6542,
"jsHeapTotalBytes": 1585152,
"scriptDurationMs": 936.127,
"eventListeners": -7472,
"totalBlockingTimeMs": 103,
"frameDurationMs": 18.330000000000048,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 21939.79300000001,
"styleRecalcs": 158,
"styleRecalcDurationMs": 20.19499999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21714.403000000002,
"heapDeltaBytes": -49758264,
"heapUsedBytes": 164192228,
"domNodes": -6542,
"jsHeapTotalBytes": 1007616,
"scriptDurationMs": 879.251,
"eventListeners": -7470,
"totalBlockingTimeMs": 162,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6445.086000000003,
"styleRecalcs": 20,
"styleRecalcDurationMs": 95.53900000000002,
"layouts": 20,
"layoutDurationMs": 39.13000000000001,
"taskDurationMs": 6390.907999999999,
"heapDeltaBytes": -15449208,
"heapUsedBytes": 186521868,
"domNodes": -6542,
"jsHeapTotalBytes": 11476992,
"scriptDurationMs": 143.249,
"eventListeners": -7474,
"totalBlockingTimeMs": 563,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-node-resize-workload",
"durationMs": 6373.706000000084,
"styleRecalcs": 20,
"styleRecalcDurationMs": 79.42399999999999,
"layouts": 20,
"layoutDurationMs": 27.872999999999994,
"taskDurationMs": 6327.674,
"heapDeltaBytes": -50580340,
"heapUsedBytes": 167932500,
"domNodes": -6542,
"jsHeapTotalBytes": 9216000,
"scriptDurationMs": 119.559,
"eventListeners": -7476,
"totalBlockingTimeMs": 543,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8949.23399999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8839.977,
"heapDeltaBytes": -20402224,
"heapUsedBytes": 169030668,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 148.40600000000003,
"eventListeners": -12,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8952.10099999997,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8705.440999999999,
"heapDeltaBytes": -10545564,
"heapUsedBytes": 176524252,
"domNodes": 0,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 149.53800000000007,
"eventListeners": -12,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 115.9120000000371,
"styleRecalcs": 9,
"styleRecalcDurationMs": 20.316000000000003,
"layouts": 3,
"layoutDurationMs": 1.7930000000000004,
"taskDurationMs": 95.26899999999999,
"heapDeltaBytes": 3260576,
"heapUsedBytes": 65119452,
"domNodes": 137,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 8.947000000000001,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 112.28799999992134,
"styleRecalcs": 7,
"styleRecalcDurationMs": 14.9,
"layouts": 2,
"layoutDurationMs": 1.4690000000000003,
"taskDurationMs": 80.648,
"heapDeltaBytes": 3000336,
"heapUsedBytes": 64793696,
"domNodes": 126,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 5.988,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.659999999999975,
"p95FrameDurationMs": 16.699999999999818
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe refresh scheduler now reports outcomes through typed ChangesScheduled refresh reports
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~15 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to The typed scheduled-refresh report contract is updated consistently across producers, consumers, telemetry, and tests, with no established merge-blocking risk. Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (6 passed)
Full details: End-To-End Regression Coverage For FixesExplanation The changed-file metadata is available and shows changes under Resolution Provide the PR title and exact commit subjects, then re-evaluate the bug-fix signal. If either contains the specified bug-fix language, add or update a Playwright regression test under ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #17648 +/- ##
==========================================
- Coverage 82.80% 82.79% -0.01%
==========================================
Files 2756 2756
Lines 138964 138963 -1
Branches 35722 37560 +1838
==========================================
- Hits 115069 115059 -10
- Misses 22802 22811 +9
Partials 1093 1093
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes 🚀 New features to boost your workflow:
|
dante01yoon
left a comment
There was a problem hiding this comment.
Approving. Making the illegal (outcome, failure?) pairs unrepresentable is the right shape, and the change is complete: both permanent_failure sites and the expired site pass the committed failure, so dropping the ?? 'TOKEN_EXCHANGE_FAILED' fallback in workspaceAuthStore is now guaranteed by the type rather than by convention.
Validation on de29d90:
packages/accountvue-tsc --noEmitclean. That also confirms both@ts-expect-errordirectives in the illegal-pair test are load-bearing — an unused directive is itself a compile error, so the typecheck passing proves the compiler really does rejectpermanent_failurewithout a failure andsucceededwith one.session.scheduler.test.ts: 35/35 pass.- All 44 CI checks green.
Two non-blocking notes inline.
| | { readonly outcome: 'expired'; readonly failure: SessionFailure } | ||
|
|
||
| /** The outcome discriminants a scheduled refresh can report. */ | ||
| export type SessionRefreshOutcome = ScheduledRefreshReport['outcome'] |
There was a problem hiding this comment.
suggestion (non-blocking): after this PR SessionRefreshOutcome has no remaining consumer in the repo — the callback signature at the old line 135 was its only use, and the host side reads report.outcome directly now. Meanwhile src/platform/telemetry/types.ts:82 declares UnifiedAuthRefreshOutcome as a hand-maintained copy of the same five discriminants, including the same doc comment on expired.
Since the stated goal here is that the discriminants live in one place, would you consider closing that last gap in a follow-up by making the telemetry type an alias — export type UnifiedAuthRefreshOutcome = SessionRefreshOutcome — instead of a parallel literal union? That gives the derived type a real consumer and means adding a sixth outcome to ScheduledRefreshReport can't silently leave the telemetry union behind. Happy for it to stay out of this PR's scope.
There was a problem hiding this comment.
Done in 9119a1b. UnifiedAuthRefreshOutcome is now export type UnifiedAuthRefreshOutcome = SessionRefreshOutcome (imported from @comfyorg/account/session), so the five discriminants live in one place and a sixth outcome can't leave the telemetry union behind. The union is structurally identical, so no consumer changes; typecheck passes.
| failure: { status: 'error', code: 'ACCESS_DENIED' } | ||
| } | ||
|
|
||
| expect(permanentFailure.failure.code).toBe('ACCESS_DENIED') |
There was a problem hiding this comment.
nit-pick (non-blocking): these three expects don't really assert anything — permanentFailure.failure.code is 'ACCESS_DENIED' because the literal three lines above says so, and the other two just read back their own discriminant. The entire value of this case is the two @ts-expect-error directives, which the typecheck already enforces.
Not worth a push on its own; if you touch the file again, collapsing this to a short comment saying the assertions are compile-time only (or keeping just one expect so the case isn't assertion-free) would make the intent clearer to the next reader.
There was a problem hiding this comment.
Done in 99e1216. Collapsed the three reads into one assertion that still references all three constructed values (so the illegal declarations aren't unused), with a message noting the two @ts-expect-error directives are the real coverage.
…t package The telemetry union duplicated the five scheduled-refresh discriminants by hand. Alias it to the package's SessionRefreshOutcome so a sixth outcome can't leave the telemetry type behind.
… check The runtime reads only echoed their own discriminants; the two @ts-expect-error directives are the real coverage. Keep one assertion that references the constructed values so the case is not assertion-free.
99e1216
…account-contracts The same FE-2185 refactor landed on main as #17648 (ScheduledRefreshReport). Resolve all three conflicts in favour of main's landed contract; keep this branch's stronger scheduler assertions, which compare whole report objects so the expired report's failure payload is covered.
…omfy-Org#17618) ## Summary Completes FE-2185. The discriminated-result refactor itself landed on `main` as Comfy-Org#17648 (`ScheduledRefreshReport`) while this PR was open, so what remains here is the half that makes the contract enforce rather than document: `failure?: never` on the outcomes that carry no failure. ## Changes - `sessionContracts.ts` restores `failure?: never` on `succeeded`, `retry_scheduled`, and `retries_exhausted`. Without it, excess-property checking rejects a bad object literal, but a report built in a variable or returned from a helper assigns cleanly — so the union named which outcomes carry a failure without preventing one being attached elsewhere. - `session.scheduler.test.ts` asserts whole report objects rather than outcome strings, which pins that `expired` actually carries its `SessionFailure`, and adds the variable-assignment case the existing literal-only test could not reach. Not a live bug: all six producers in `refreshScheduler.ts` construct their reports as object literals at the call site, so nothing on `main` today can emit an invalid report. This closes the path a future producer would take — a telemetry wrapper or a test factory that builds a report before passing it on. ## Review Focus The two `@ts-expect-error` directives are load-bearing. Removing `failure?: never` fails the account typecheck with `TS2578: Unused '@ts-expect-error' directive` at the new test, which is the evidence that the guard, not excess-property checking, is what rejects that assignment. ## QA - [x] account: 589 tests pass; typecheck, eslint, oxfmt clean - [x] host consumers: 331 tests pass across 5 suites - [x] repo gates: `pnpm typecheck` (root + account + billing-web + account-ui) and `pnpm knip` pass - [x] Verified the guard's effect directly: compiled both unions under `--strict` and confirmed assignment through a variable and return from a helper are accepted without it and rejected with it [FE-2185](https://linear.app/comfyorg/issue/FE-2185/refactor-make-account-package-contracts-represent-only-valid-states) --------- Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Maanil Verma <vermaMaanil97@gmail.com>
Summary
The scheduled-refresh outcome callback took an outcome string and an optional failure, which let impossible pairs exist: a permanent failure with no error, or a success carrying one. It now takes a single discriminated result whose failure variants require the failure payload.
Fixes FE-2185
Changes
sessionContracts.tsreplaces the(outcome, failure?)callback pair with one taggedScheduledRefreshReport. Thepermanent_failureandexpiredvariants requirefailure: SessionFailure;succeeded,retry_scheduled, andretries_exhaustedcarry none.SessionRefreshOutcomestays as the telemetry property type but is now derived from the union, so the discriminants live in one place.refreshScheduler.tsconstructs the tagged object at all six report sites;session.tsre-exports the type;workspaceAuthStore.tsnarrows onreport.outcomeand readsreport.failure.codedirectly.Review Focus
retries_exhaustedcarries no failure on purpose. It commits nothing and the credential stays valid until expiry, so onlypermanent_failureandexpiredcarry the committed failure. This matches the existing doc comment.QA
@ts-expect-errordirectives in the illegal-pair test are load-bearing. The typecheck passes only because the compiler rejects apermanent_failurewithout a failure and asucceededwith one.Resolves review comment from @DrJKL on #17283: r3984130877.
Linear: FE-2185