Repository navigation
test(assets): cover pagination failure retries - #16254
christian-byrne wants to merge 83 commits into
Conversation
Need to put some further thought into loadNew invalidation. Ideal case is that output is flagged stale and async fetch doesn't occur if there isn't active dependent? But per current design specs, all existent views should be subscribed and thus require update. That a new 'output' asset might farm out 3 requests (all: load node, outputs, outputs+temp) leaves a bad taste in my mouth
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1997 passed, 0 failed · 1 flaky📊 Browser Reports
📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-08-29T20:43:09.526Z",
"gitSha": "2b15b271e5f23ae76a677c2032e577d3fc419408",
"branch": "test/assets-pagination-retry",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2068.3689999999897,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.784000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 609.293,
"heapDeltaBytes": -3908900,
"heapUsedBytes": 65540792,
"domNodes": -284,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 11.754999999999997,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2018.231999999898,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.263999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 493.15,
"heapDeltaBytes": 12935600,
"heapUsedBytes": 82130708,
"domNodes": -284,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 8.765,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2396.355000000028,
"styleRecalcs": 80,
"styleRecalcDurationMs": 47.867999999999995,
"layouts": 12,
"layoutDurationMs": 4.002999999999999,
"taskDurationMs": 1441.7230000000002,
"heapDeltaBytes": 449532,
"heapUsedBytes": 62776220,
"domNodes": -282,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 177.83900000000003,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2149.6799999999894,
"styleRecalcs": 78,
"styleRecalcDurationMs": 38.242,
"layouts": 12,
"layoutDurationMs": 3.5649999999999995,
"taskDurationMs": 1183.601,
"heapDeltaBytes": 5936464,
"heapUsedBytes": 75247068,
"domNodes": -283,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 145.79699999999997,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1742.9139999999848,
"styleRecalcs": 31,
"styleRecalcDurationMs": 17.476,
"layouts": 6,
"layoutDurationMs": 0.7129999999999999,
"taskDurationMs": 386.08,
"heapDeltaBytes": 4356120,
"heapUsedBytes": 73970292,
"domNodes": 75,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 13.633000000000001,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1747.5749999999834,
"styleRecalcs": 31,
"styleRecalcDurationMs": 17.938000000000002,
"layouts": 6,
"layoutDurationMs": 0.7340000000000001,
"taskDurationMs": 405.40899999999993,
"heapDeltaBytes": 4331204,
"heapUsedBytes": 73709720,
"domNodes": 74,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 13.924000000000001,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 719.0679999999929,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.338000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 440.47200000000004,
"heapDeltaBytes": -6823176,
"heapUsedBytes": 62237320,
"domNodes": 16,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 33.73800000000001,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 707.7800000000707,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.21,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 417.09,
"heapDeltaBytes": -6772100,
"heapUsedBytes": 62327124,
"domNodes": 16,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 32.108,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2060.6789999999933,
"styleRecalcs": 3,
"styleRecalcDurationMs": 2.855,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 641.8909999999998,
"heapDeltaBytes": -17987332,
"heapUsedBytes": 73219592,
"domNodes": -273,
"jsHeapTotalBytes": -2101248,
"scriptDurationMs": 41.121,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2009.5720000000483,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 526.3979999999999,
"heapDeltaBytes": 8804316,
"heapUsedBytes": 73259140,
"domNodes": -278,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 38.038999999999994,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 3419.8499999999967,
"styleRecalcs": 67,
"styleRecalcDurationMs": 13.239,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2792.694,
"heapDeltaBytes": -24323272,
"heapUsedBytes": 67082088,
"domNodes": -280,
"jsHeapTotalBytes": 4190208,
"scriptDurationMs": 958.7479999999999,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 3278.652000000079,
"styleRecalcs": 64,
"styleRecalcDurationMs": 10.091,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2575.44,
"heapDeltaBytes": -7749860,
"heapUsedBytes": 84441928,
"domNodes": -278,
"jsHeapTotalBytes": -1875968,
"scriptDurationMs": 906.467,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 4583.964999999978,
"styleRecalcs": 66,
"styleRecalcDurationMs": 12.638,
"layouts": 60,
"layoutDurationMs": 8.466999999999999,
"taskDurationMs": 2736.673,
"heapDeltaBytes": 10646476,
"heapUsedBytes": 79861392,
"domNodes": 24,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 911.841,
"eventListeners": 12,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 4269.729999999981,
"styleRecalcs": 66,
"styleRecalcDurationMs": 11.772000000000002,
"layouts": 60,
"layoutDurationMs": 7.882,
"taskDurationMs": 2512.3100000000004,
"heapDeltaBytes": 10380632,
"heapUsedBytes": 80063604,
"domNodes": 24,
"jsHeapTotalBytes": 2883584,
"scriptDurationMs": 873.005,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3268.525000000011,
"styleRecalcs": 41,
"styleRecalcDurationMs": 5.291999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2224.765,
"heapDeltaBytes": 3270048,
"heapUsedBytes": 71016352,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 226.11000000000004,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3225.8489999999256,
"styleRecalcs": 41,
"styleRecalcDurationMs": 5.985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2058.632,
"heapDeltaBytes": -4013616,
"heapUsedBytes": 70299604,
"domNodes": -285,
"jsHeapTotalBytes": -827392,
"scriptDurationMs": 200.561,
"eventListeners": -1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2013.4180000000015,
"styleRecalcs": 2,
"styleRecalcDurationMs": 1.6499999999999986,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 567.4770000000001,
"heapDeltaBytes": 9543840,
"heapUsedBytes": 74374860,
"domNodes": -274,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 41.946000000000005,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2059.855999999968,
"styleRecalcs": 4,
"styleRecalcDurationMs": 4.083,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 688.164,
"heapDeltaBytes": -21493668,
"heapUsedBytes": 71224508,
"domNodes": -276,
"jsHeapTotalBytes": 3403776,
"scriptDurationMs": 45.03699999999999,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 725.0020000000177,
"styleRecalcs": 46,
"styleRecalcDurationMs": 9.288999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 504.9380000000001,
"heapDeltaBytes": 17479868,
"heapUsedBytes": 87608884,
"domNodes": 18,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 137.618,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 744.2889999999807,
"styleRecalcs": 45,
"styleRecalcDurationMs": 8.857999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 519.324,
"heapDeltaBytes": 18199772,
"heapUsedBytes": 88106808,
"domNodes": 16,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 145.641,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2021.7979999999898,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.296,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 561.985,
"heapDeltaBytes": -12508788,
"heapUsedBytes": 57673812,
"domNodes": -295,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 9.592,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2051.2500000000955,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.084000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 561.3770000000001,
"heapDeltaBytes": -544160,
"heapUsedBytes": 69631496,
"domNodes": -297,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 9.743,
"eventListeners": -231,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1926.2679999999932,
"styleRecalcs": 78,
"styleRecalcDurationMs": 41.297,
"layouts": 16,
"layoutDurationMs": 4.66,
"taskDurationMs": 1154.2180000000003,
"heapDeltaBytes": 8189596,
"heapUsedBytes": 78994156,
"domNodes": -295,
"jsHeapTotalBytes": 6807552,
"scriptDurationMs": 115.357,
"eventListeners": -231,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1916.3560000000643,
"styleRecalcs": 78,
"styleRecalcDurationMs": 40.26,
"layouts": 16,
"layoutDurationMs": 4.678,
"taskDurationMs": 1155.9759999999999,
"heapDeltaBytes": -4322416,
"heapUsedBytes": 65806644,
"domNodes": -298,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 114.773,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1416.0699999999906,
"styleRecalcs": 19,
"styleRecalcDurationMs": 31.979999999999993,
"layouts": 14,
"layoutDurationMs": 14.101000000000003,
"taskDurationMs": 1018.2020000000002,
"heapDeltaBytes": -1837596,
"heapUsedBytes": 94591956,
"domNodes": 13671,
"jsHeapTotalBytes": 10223616,
"scriptDurationMs": 30.899000000000004,
"eventListeners": 2381,
"totalBlockingTimeMs": 123,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 12389.96000000003,
"styleRecalcs": 246,
"styleRecalcDurationMs": 39.00099999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9180.979,
"heapDeltaBytes": 1427760,
"heapUsedBytes": 92117540,
"domNodes": -282,
"jsHeapTotalBytes": 4907008,
"scriptDurationMs": 3092.473,
"eventListeners": -129,
"totalBlockingTimeMs": 10,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 12395.019000000048,
"styleRecalcs": 248,
"styleRecalcDurationMs": 41.993,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9030.500999999998,
"heapDeltaBytes": -23499648,
"heapUsedBytes": 67850200,
"domNodes": -281,
"jsHeapTotalBytes": 4976640,
"scriptDurationMs": 3087.518,
"eventListeners": -159,
"totalBlockingTimeMs": 18,
"frameDurationMs": 16.670000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17957.78999999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17254.983000000004,
"heapDeltaBytes": -35799700,
"heapUsedBytes": 176432980,
"domNodes": -6548,
"jsHeapTotalBytes": 3919872,
"scriptDurationMs": 371.852,
"eventListeners": -7471,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.77333333333336,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 18419.808999999987,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17929.501,
"heapDeltaBytes": -30343176,
"heapUsedBytes": 180677712,
"domNodes": -6548,
"jsHeapTotalBytes": 188416,
"scriptDurationMs": 360.68999999999994,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.329999999999927,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 21903.33500000003,
"styleRecalcs": 170,
"styleRecalcDurationMs": 20.32499999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21588.128999999997,
"heapDeltaBytes": -28474412,
"heapUsedBytes": 175955328,
"domNodes": -6548,
"jsHeapTotalBytes": 249856,
"scriptDurationMs": 903.844,
"eventListeners": -7469,
"totalBlockingTimeMs": 83,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 22908.397000000037,
"styleRecalcs": 175,
"styleRecalcDurationMs": 25.144999999999975,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22638.947,
"heapDeltaBytes": -28355636,
"heapUsedBytes": 176188696,
"domNodes": -6548,
"jsHeapTotalBytes": 512000,
"scriptDurationMs": 938.331,
"eventListeners": -7469,
"totalBlockingTimeMs": 88,
"frameDurationMs": 18.333333333333453,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 473.4760000000051,
"styleRecalcs": 20,
"styleRecalcDurationMs": 23.154999999999994,
"layouts": 4,
"layoutDurationMs": 1.5729999999999997,
"taskDurationMs": 131.182,
"heapDeltaBytes": 5628460,
"heapUsedBytes": 72874096,
"domNodes": 148,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 8.048,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 482.49199999997927,
"styleRecalcs": 15,
"styleRecalcDurationMs": 28.192999999999994,
"layouts": 4,
"layoutDurationMs": 1.496,
"taskDurationMs": 133.316,
"heapDeltaBytes": 5477164,
"heapUsedBytes": 72438420,
"domNodes": 121,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 8.654999999999998,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## test/assets-delete-cache-refetch-coverage #16254 +/- ##
=============================================================================
+ Coverage 80.02% 82.41% +2.39%
=============================================================================
Files 2251 1923 -328
Lines 114236 109333 -4903
Branches 31608 30775 -833
=============================================================================
- Hits 91413 90103 -1310
+ Misses 22355 18887 -3468
+ Partials 468 343 -125
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 349 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
TL;DR: retargeting is blocked because current Full context for agent readersAt exact source head |
|
Re-verified against current Two options: (1) rewrite the retry test's assertions against the new void-returning |
fddf035 to
3c83887
Compare
|
The target test seam was deleted by the updated stack base. Safe options: close this PR as superseded, or explicitly port its extra failure-mode matrix to the replacement store tests. Full context for agent readers
|
3c83887 to
fb2948e
Compare
DrJKL
left a comment
There was a problem hiding this comment.
Against the current stacked base, the true diff is 77 files and +2,684/-2,621, not the intended 56-line test addition. The base was rewritten, the range now contains 83 commits, and the PR has 38 local merge conflicts. The replacement assetsStore tests already cover retaining rows, hasMore, and cursor reuse after a failed pagination request. I found no new point beyond the existing supersession feedback. Close this as superseded, or port only the additional HTTP/decode/offline distinctions to the current service/store tests. Typecheck, scoped lint/format, 69 focused unit tests, and Playwright --list pass on the current head.
fb2948e to
614cc93
Compare
|
Queue bookkeeping is blocked: the task ID exists twice, and the program-repo lock timed out twice while removing only the stale duplicate. No PR branch mutation occurred. Full context for agent readers
Exact commander action: remove the stale duplicate |
Ports the transient-failure retry coverage from fe #16254 (606c2ac) -- the sole 56-line delta that PR added on top of a now-rewritten stacked base. Re-authored against current main's loadMore()/hasMore contract: - loadMore() resolves void (src/utils/pagedList.ts usePreemptableQueue), not the boolean the original test asserted on. - backingOff (refAutoReset, useAssetsQuery.ts) only arms for the 5xx/network-reject branches of doQuery, not for a malformed-but- received JSON body, so hasMore recovery timing differs per case. Tests use fake timers to advance past the real 2000ms backoff window instead of assuming an immediate reset. Per christian-byrne/blocked-on-christian#292: "if the distinctions mean tests, port." HTTP 500 / malformed JSON / offline are three distinct test cases, so ported rather than closed. Only the retry tests are restored; the rest of the deleted test file's pagination-dedup assertions (loadNew overlap handling, loadMore overlap dedup) no longer match current doLoadMore/loadNew behavior and would need separate, unrelated fixes -- out of scope here.
|
Closing as superseded — retry coverage ported to fe #16641. Full context for agent readersThe sole content delta of this PR (56-line |
…omfy-Org#16641) ## Summary Ports the transient-failure retry coverage for `useAssetsQuery`'s `loadMore()` from [fe Comfy-Org#16254](Comfy-Org#16254), which sat on a now-rewritten stacked base (`test/assets-delete-cache-refetch-coverage`) and had drifted to 83 commits / 38 conflicts against it. The PR's actual content was a single 56-line test addition to the now-deleted `useAssetsQuery.test.ts`. Per [christian-byrne/blocked-on-christian#292](christian-byrne/blocked-on-christian#292 (comment)): "If the distinctions mean tests, port." The three transient-failure cases (HTTP 500, malformed JSON, offline request) are distinct test cases, so this ports them rather than closing the source PR outright. ## Re-authoring notes (not a mechanical port) The original test asserted `loadMore()` resolves to a `boolean` success signal and that `hasMore` stays `true` immediately after every failure. Neither holds against current `main`: - `loadMore()` now resolves `void` via `usePreemptableQueue().enqueue` (`src/utils/pagedList.ts`), so assertions here check `items`/`hasMore` state instead of a resolved boolean. - `backingOff` (`refAutoReset(false, 2000)` in `useAssetsQuery.ts`) only arms for the 5xx/429 and network-reject branches of `doQuery` — not for a successfully-received-but-malformed JSON body. So `hasMore` only drops immediately for the HTTP-500 and offline cases; the malformed-JSON case never backs off. Tests use fake timers to advance past the real 2000ms window for the cases that do back off, rather than assuming an immediate reset. Only the retry tests are restored. The rest of the deleted file's pagination-dedup assertions (`loadNew` overlap handling, `loadMore` overlap dedup) no longer match current `doLoadMore`/`loadNew` behavior (no overlap dedup today, `knownIds` not updated mid-walk in `loadNew`) — re-adding those would mean fixing unrelated behavior, out of scope here. ## Evidence ``` $ pnpm exec vitest run src/platform/assets/composables/useAssetsQuery.test.ts Test Files 1 passed (1) Tests 3 passed (3) $ pnpm exec oxlint --type-aware --no-error-on-unmatched-pattern src/platform/assets/composables/useAssetsQuery.test.ts (clean) $ pnpm exec vue-tsc --noEmit -p tsconfig.json (no errors in useAssetsQuery files) ``` Supersedes [fe Comfy-Org#16254](Comfy-Org#16254), which will be closed referencing this PR. <!-- authored-by:agent lane-act-fe-16254-rebase-b75ef91a -->
Full context for agent readers
Adds parameterized query-layer regression coverage for the pagination failure/recovery case.
The tests verify that HTTP 500, malformed JSON, and rejected/offline requests:
hasMoreso recovery remains available;after=page-2cursor;Validation:
Stacked on #16253 to preserve the active Assets test stack.