Skip to content

feat(assets): classify jobs cursor rejection via structured errorCode - #13781

Merged
mattmillerai merged 3 commits into
matt/fe-962-fe-adopt-cursor-pagination-in-the-generated-tab-jobs-sourcedfrom
matt/be-3422-invalid-cursor-errorcode
Aug 18, 2026
Merged

mattmillerai merged 3 commits into
matt/fe-962-fe-adopt-cursor-pagination-in-the-generated-tab-jobs-sourcedfrom
matt/be-3422-invalid-cursor-errorcode

Conversation

@mattmillerai

Copy link
Copy Markdown
Member

ELI-5

When you scroll the Generated tab, the app pages through your job history with a
"cursor". If that cursor goes stale (e.g. after a server restart) the server
rejects the page with a 400 and the app restarts the walk from the beginning so
you don't get skipped or duplicated rows. Today the app treats any 400 on that
request as "stale cursor". That's fine right now because a rejected cursor is the
only 400 the endpoint can return — but if the endpoint ever starts returning 400
for other reasons, an unrelated error would wrongly nuke your loaded history back
to the top. This teaches the app to read the server's actual machine-readable
error code and only reset when it really is a rejected cursor.

Summary

Classify a rejected jobs pagination cursor by the server's structured error code
instead of the bare HTTP 400 status, so future non-cursor 400s don't trigger the
history offset fallback.

Changes

  • What:
    • JobsApiError now parses the machine-readable code from the JSON error
      body and exposes it as errorCode (undefined when the body isn't the
      structured error shape, e.g. a proxy error page).
    • assetsStore.isRejectedCursorError narrows from status === 400 to
      errorCode === 'INVALID_CURSOR'.
    • Recovery tests construct errors with realistic JSON bodies; added coverage
      for a non-JSON body (no errorCode) and a non-cursor 400 (cursor preserved).
  • Breaking: none — behavior is identical for today's traffic (see below).

Review Focus

  • Server contract confirmed first. The /jobs list endpoint returns its
    errors as a structured JSON body carrying a machine-readable code field, and
    emits INVALID_CURSOR for a rejected pagination cursor. That endpoint's only
    400 today is the rejected cursor, so old (status === 400) and new
    (errorCode === 'INVALID_CURSOR') conditions cannot disagree for current
    traffic — no behavior change now. The narrowing is defense-in-depth for when
    the endpoint gains other 400 cases, and is strictly more correct: an unrelated
    400 or a non-JSON proxy 400 no longer resets the walk to offset 0.
  • Judgment call: the deferred review note suggested parsing the code in
    fetchJobsRaw. I parse it in the JobsApiError constructor instead — the body
    already flows in there, so the single throw site is unchanged and the parsing
    lives with the field it populates. Same observable result.
  • Stacked on the cursor-pagination PR (its branch is the base) since
    JobsApiError / isRejectedCursorError only exist there; GitHub retargets to
    main once that merges.

Verification

  • vitest run on fetchJobs.test.ts + assetsStore.test.ts: 124 passed.
  • eslint + oxfmt clean on the four changed files.
  • Type-check introduces zero new errors (identical error count with the change
    stashed vs applied, against the base branch).

@coderabbitai

coderabbitai Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7ce2e6dc-352f-413d-834d-a9f5b84f3fac

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch matt/be-3422-invalid-cursor-errorcode

Comment @coderabbitai help to get the list of available commands.

@mattmillerai mattmillerai added agent-coded Opened by the agent-work code loop cursor-review Trigger multi-model Cursor agent review on this PR labels Jul 18, 2026
@mattmillerai
mattmillerai marked this pull request as ready for review July 18, 2026 01:48
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 18, 2026
@github-actions

github-actions Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ✅ 1715 passed, 0 failed · 2 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1694 / ❌ 0 / ⚠️ 2 / ⏭️ 5)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 07/25/2026, 11:04:50 PM UTC

Links

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.5 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 50.2 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.1 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 54.6 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.4 MB heap
large-graph-pan: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 81.7 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 53.2 MB heap
minimap-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 64.3 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 55.1 MB heap
subgraph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.7 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 45.5 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 145ms TBT · 93.6 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.7 MB heap
vue-large-graph-idle: · 58.1 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 163.5 MB heap
vue-large-graph-pan: · 58.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 92ms TBT · 148.9 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 49.5 MB heap

ℹ️ No baseline found — significance unavailable.

Absolute values
Metric Value
canvas-idle: avg frame time 17ms
canvas-idle: p95 frame time 17ms
canvas-idle: layout duration 0ms
canvas-idle: style recalc duration 10ms
canvas-idle: layout count 0
canvas-idle: style recalc count 10
canvas-idle: task duration 362ms
canvas-idle: script duration 14ms
canvas-idle: TBT 0ms
canvas-idle: heap used 69.5 MB
canvas-idle: DOM nodes 19
canvas-idle: event listeners 4
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 4ms
canvas-mouse-sweep: style recalc duration 40ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 73
canvas-mouse-sweep: task duration 785ms
canvas-mouse-sweep: script duration 123ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 50.2 MB
canvas-mouse-sweep: DOM nodes -267
canvas-mouse-sweep: event listeners -133
canvas-zoom-sweep: avg frame time 17ms
canvas-zoom-sweep: p95 frame time 17ms
canvas-zoom-sweep: layout duration 1ms
canvas-zoom-sweep: style recalc duration 21ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 32
canvas-zoom-sweep: task duration 299ms
canvas-zoom-sweep: script duration 17ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 73.1 MB
canvas-zoom-sweep: DOM nodes 78
canvas-zoom-sweep: event listeners 19
dom-widget-clipping: avg frame time 17ms
dom-widget-clipping: p95 frame time 17ms
dom-widget-clipping: layout duration 0ms
dom-widget-clipping: style recalc duration 8ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 11
dom-widget-clipping: task duration 355ms
dom-widget-clipping: script duration 59ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 54.6 MB
dom-widget-clipping: DOM nodes 17
dom-widget-clipping: event listeners 2
large-graph-idle: avg frame time 17ms
large-graph-idle: p95 frame time 17ms
large-graph-idle: layout duration 0ms
large-graph-idle: style recalc duration 8ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 9
large-graph-idle: task duration 519ms
large-graph-idle: script duration 86ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 61.4 MB
large-graph-idle: DOM nodes -267
large-graph-idle: event listeners -128
large-graph-pan: avg frame time 17ms
large-graph-pan: p95 frame time 17ms
large-graph-pan: layout duration 0ms
large-graph-pan: style recalc duration 14ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 68
large-graph-pan: task duration 1048ms
large-graph-pan: script duration 392ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 81.7 MB
large-graph-pan: DOM nodes -269
large-graph-pan: event listeners -128
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 7ms
large-graph-zoom: style recalc duration 14ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 65
large-graph-zoom: task duration 1240ms
large-graph-zoom: script duration 457ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 53.2 MB
large-graph-zoom: DOM nodes -274
large-graph-zoom: event listeners -133
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 9ms
minimap-idle: layout count 0
minimap-idle: style recalc count 10
minimap-idle: task duration 529ms
minimap-idle: script duration 87ms
minimap-idle: TBT 0ms
minimap-idle: heap used 64.3 MB
minimap-idle: DOM nodes -266
minimap-idle: event listeners -130
subgraph-dom-widget-clipping: avg frame time 17ms
subgraph-dom-widget-clipping: p95 frame time 17ms
subgraph-dom-widget-clipping: layout duration 0ms
subgraph-dom-widget-clipping: style recalc duration 10ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 47
subgraph-dom-widget-clipping: task duration 350ms
subgraph-dom-widget-clipping: script duration 117ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 55.1 MB
subgraph-dom-widget-clipping: DOM nodes 20
subgraph-dom-widget-clipping: event listeners 6
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 8ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 383ms
subgraph-idle: script duration 13ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 69.7 MB
subgraph-idle: DOM nodes 19
subgraph-idle: event listeners 5
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 5ms
subgraph-mouse-sweep: style recalc duration 37ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 76
subgraph-mouse-sweep: task duration 699ms
subgraph-mouse-sweep: script duration 90ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 45.5 MB
subgraph-mouse-sweep: DOM nodes -264
subgraph-mouse-sweep: event listeners -133
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 13ms
subgraph-transition-enter: style recalc duration 31ms
subgraph-transition-enter: layout count 15
subgraph-transition-enter: style recalc count 19
subgraph-transition-enter: task duration 777ms
subgraph-transition-enter: script duration 30ms
subgraph-transition-enter: TBT 145ms
subgraph-transition-enter: heap used 93.6 MB
subgraph-transition-enter: DOM nodes 13673
subgraph-transition-enter: event listeners 2369
viewport-pan-sweep: avg frame time 17ms
viewport-pan-sweep: p95 frame time 17ms
viewport-pan-sweep: layout duration 0ms
viewport-pan-sweep: style recalc duration 35ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 250
viewport-pan-sweep: task duration 3479ms
viewport-pan-sweep: script duration 1185ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 70.7 MB
viewport-pan-sweep: DOM nodes -266
viewport-pan-sweep: event listeners -113
vue-large-graph-idle: avg frame time 17ms
vue-large-graph-idle: p95 frame time 17ms
vue-large-graph-idle: layout duration 0ms
vue-large-graph-idle: style recalc duration 0ms
vue-large-graph-idle: layout count 0
vue-large-graph-idle: style recalc count 0
vue-large-graph-idle: task duration 11839ms
vue-large-graph-idle: script duration 532ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 163.5 MB
vue-large-graph-idle: DOM nodes -8311
vue-large-graph-idle: event listeners -16385
vue-large-graph-pan: avg frame time 17ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 11ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 75
vue-large-graph-pan: task duration 15313ms
vue-large-graph-pan: script duration 845ms
vue-large-graph-pan: TBT 92ms
vue-large-graph-pan: heap used 148.9 MB
vue-large-graph-pan: DOM nodes -8311
vue-large-graph-pan: event listeners -16382
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 20ms
workflow-execution: layout count 3
workflow-execution: style recalc count 13
workflow-execution: task duration 128ms
workflow-execution: script duration 11ms
workflow-execution: TBT 0ms
workflow-execution: heap used 49.5 MB
workflow-execution: DOM nodes 122
workflow-execution: event listeners 66
Raw data
{
  "timestamp": "2026-07-25T23:14:14.794Z",
  "gitSha": "dcf1c08b0de94bd7341357cb7423b7cf4a455c97",
  "branch": "matt/be-3422-invalid-cursor-errorcode",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2070.514000000003,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 11.141,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 365.774,
      "heapDeltaBytes": 3678464,
      "heapUsedBytes": 72805428,
      "domNodes": 20,
      "jsHeapTotalBytes": 19546112,
      "scriptDurationMs": 15.02,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "canvas-idle",
      "durationMs": 2023.571000000004,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 8.235999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 357.915,
      "heapDeltaBytes": 3920480,
      "heapUsedBytes": 73048804,
      "domNodes": 18,
      "jsHeapTotalBytes": 19546112,
      "scriptDurationMs": 13.771000000000003,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1883.1920000000082,
      "styleRecalcs": 73,
      "styleRecalcDurationMs": 46.292,
      "layouts": 12,
      "layoutDurationMs": 4.184,
      "taskDurationMs": 832.106,
      "heapDeltaBytes": -15315204,
      "heapUsedBytes": 53936172,
      "domNodes": -269,
      "jsHeapTotalBytes": 19148800,
      "scriptDurationMs": 127.83100000000003,
      "eventListeners": -133,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1776.3570000000186,
      "styleRecalcs": 73,
      "styleRecalcDurationMs": 33.523,
      "layouts": 12,
      "layoutDurationMs": 3.4880000000000004,
      "taskDurationMs": 737.7090000000001,
      "heapDeltaBytes": -17979616,
      "heapUsedBytes": 51390248,
      "domNodes": -265,
      "jsHeapTotalBytes": 20197376,
      "scriptDurationMs": 117.267,
      "eventListeners": -133,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1736.7169999999987,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 18.810999999999996,
      "layouts": 6,
      "layoutDurationMs": 0.7110000000000001,
      "taskDurationMs": 295.374,
      "heapDeltaBytes": 7379180,
      "heapUsedBytes": 76603152,
      "domNodes": 77,
      "jsHeapTotalBytes": 19283968,
      "scriptDurationMs": 16.991,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1756.4210000000458,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 22.26,
      "layouts": 6,
      "layoutDurationMs": 0.71,
      "taskDurationMs": 301.794,
      "heapDeltaBytes": 7426528,
      "heapUsedBytes": 76646580,
      "domNodes": 78,
      "jsHeapTotalBytes": 19021824,
      "scriptDurationMs": 17.232999999999997,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 616.1810000000116,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 6.801,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 355.448,
      "heapDeltaBytes": -11722800,
      "heapUsedBytes": 57523196,
      "domNodes": 16,
      "jsHeapTotalBytes": 18759680,
      "scriptDurationMs": 58.31,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 595.6390000000056,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 8.393,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 353.612,
      "heapDeltaBytes": -12057844,
      "heapUsedBytes": 57055620,
      "domNodes": 18,
      "jsHeapTotalBytes": 19546112,
      "scriptDurationMs": 58.85,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2007.5250000000437,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 8.584999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 526.068,
      "heapDeltaBytes": 5125052,
      "heapUsedBytes": 64315876,
      "domNodes": -266,
      "jsHeapTotalBytes": 4800512,
      "scriptDurationMs": 86.32000000000001,
      "eventListeners": -129,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2019.9579999999742,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 7.65,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 512.426,
      "heapDeltaBytes": 4826980,
      "heapUsedBytes": 64367956,
      "domNodes": -267,
      "jsHeapTotalBytes": 4276224,
      "scriptDurationMs": 85.13799999999999,
      "eventListeners": -127,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2121.195,
      "styleRecalcs": 68,
      "styleRecalcDurationMs": 13.517999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1035.9560000000001,
      "heapDeltaBytes": 24446656,
      "heapUsedBytes": 85006160,
      "domNodes": -269,
      "jsHeapTotalBytes": 5529600,
      "scriptDurationMs": 377.543,
      "eventListeners": -127,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2088.0430000000274,
      "styleRecalcs": 68,
      "styleRecalcDurationMs": 14.091000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1060.95,
      "heapDeltaBytes": 25747672,
      "heapUsedBytes": 86342572,
      "domNodes": -269,
      "jsHeapTotalBytes": 5529600,
      "scriptDurationMs": 407.27200000000005,
      "eventListeners": -129,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3114.306000000056,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 13.666999999999998,
      "layouts": 60,
      "layoutDurationMs": 6.805000000000001,
      "taskDurationMs": 1242.214,
      "heapDeltaBytes": -5859824,
      "heapUsedBytes": 55800540,
      "domNodes": -274,
      "jsHeapTotalBytes": 6373376,
      "scriptDurationMs": 454.38599999999997,
      "eventListeners": -133,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3115.018999999961,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 13.895999999999999,
      "layouts": 60,
      "layoutDurationMs": 6.843,
      "taskDurationMs": 1237.875,
      "heapDeltaBytes": -6288640,
      "heapUsedBytes": 55796936,
      "domNodes": -273,
      "jsHeapTotalBytes": 7946240,
      "scriptDurationMs": 459.805,
      "eventListeners": -133,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "minimap-idle",
      "durationMs": 2043.4420000000273,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 9.427,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 538.775,
      "heapDeltaBytes": 5799584,
      "heapUsedBytes": 68230236,
      "domNodes": -266,
      "jsHeapTotalBytes": 5062656,
      "scriptDurationMs": 87.299,
      "eventListeners": -131,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2038.874000000078,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 8.731,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 519.2300000000001,
      "heapDeltaBytes": 5292396,
      "heapUsedBytes": 66570828,
      "domNodes": -266,
      "jsHeapTotalBytes": 4538368,
      "scriptDurationMs": 87.646,
      "eventListeners": -129,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 564.5399999999654,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 10.018,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 351.12399999999997,
      "heapDeltaBytes": -11465044,
      "heapUsedBytes": 57781152,
      "domNodes": 20,
      "jsHeapTotalBytes": 20856832,
      "scriptDurationMs": 117.47700000000002,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 531.1919999999191,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 9.959999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 349.088,
      "heapDeltaBytes": -11691076,
      "heapUsedBytes": 57812992,
      "domNodes": 20,
      "jsHeapTotalBytes": 20856832,
      "scriptDurationMs": 116.262,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2071.1130000000253,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 8.554,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 390.169,
      "heapDeltaBytes": 3670832,
      "heapUsedBytes": 72900964,
      "domNodes": 20,
      "jsHeapTotalBytes": 19546112,
      "scriptDurationMs": 14.201,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 1995.2729999999974,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 7.4190000000000005,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 374.959,
      "heapDeltaBytes": 3817124,
      "heapUsedBytes": 73249864,
      "domNodes": 18,
      "jsHeapTotalBytes": 19808256,
      "scriptDurationMs": 12.051999999999998,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1731.6870000000222,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 36.022,
      "layouts": 16,
      "layoutDurationMs": 4.9879999999999995,
      "taskDurationMs": 692.794,
      "heapDeltaBytes": -21324640,
      "heapUsedBytes": 47822936,
      "domNodes": -263,
      "jsHeapTotalBytes": 19410944,
      "scriptDurationMs": 88.731,
      "eventListeners": -133,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1708.0609999999865,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 37.378,
      "layouts": 16,
      "layoutDurationMs": 4.626,
      "taskDurationMs": 704.9839999999999,
      "heapDeltaBytes": -21615940,
      "heapUsedBytes": 47596272,
      "domNodes": -265,
      "jsHeapTotalBytes": 19410944,
      "scriptDurationMs": 92.014,
      "eventListeners": -133,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1097.562000000039,
      "styleRecalcs": 19,
      "styleRecalcDurationMs": 30.503000000000004,
      "layouts": 15,
      "layoutDurationMs": 13.026,
      "taskDurationMs": 777.202,
      "heapDeltaBytes": 28640732,
      "heapUsedBytes": 98161260,
      "domNodes": 13673,
      "jsHeapTotalBytes": 16252928,
      "scriptDurationMs": 29.978999999999992,
      "eventListeners": 2369,
      "totalBlockingTimeMs": 145,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8145.273999999972,
      "styleRecalcs": 249,
      "styleRecalcDurationMs": 35.217,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 3450.379,
      "heapDeltaBytes": 9842632,
      "heapUsedBytes": 69016084,
      "domNodes": -267,
      "jsHeapTotalBytes": 7102464,
      "scriptDurationMs": 1183.76,
      "eventListeners": -113,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8217.908999999963,
      "styleRecalcs": 251,
      "styleRecalcDurationMs": 35.419000000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 3506.693,
      "heapDeltaBytes": 17854816,
      "heapUsedBytes": 79279804,
      "domNodes": -264,
      "jsHeapTotalBytes": 5529600,
      "scriptDurationMs": 1186.2110000000002,
      "eventListeners": -113,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 12230.516999999963,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 12207.754,
      "heapDeltaBytes": -55961484,
      "heapUsedBytes": 171098528,
      "domNodes": -8311,
      "jsHeapTotalBytes": -7540736,
      "scriptDurationMs": 546.825,
      "eventListeners": -16386,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.223333333333358,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 11501.20400000003,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 11470.177,
      "heapDeltaBytes": -56797192,
      "heapUsedBytes": 171874284,
      "domNodes": -8311,
      "jsHeapTotalBytes": -8589312,
      "scriptDurationMs": 516.197,
      "eventListeners": -16384,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.223333333333358,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 15462.293000000045,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 11.910999999999976,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 15438.500000000002,
      "heapDeltaBytes": -64435116,
      "heapUsedBytes": 154746424,
      "domNodes": -8311,
      "jsHeapTotalBytes": -15405056,
      "scriptDurationMs": 858.731,
      "eventListeners": -16380,
      "totalBlockingTimeMs": 122,
      "frameDurationMs": 17.219999999999953,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 15208.974000000013,
      "styleRecalcs": 72,
      "styleRecalcDurationMs": 10.985999999999995,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 15187.182,
      "heapDeltaBytes": -51368432,
      "heapUsedBytes": 157447292,
      "domNodes": -8311,
      "jsHeapTotalBytes": -16715776,
      "scriptDurationMs": 831.127,
      "eventListeners": -16384,
      "totalBlockingTimeMs": 61,
      "frameDurationMs": 17.220000000000073,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 451.86899999998786,
      "styleRecalcs": 13,
      "styleRecalcDurationMs": 21.285999999999998,
      "layouts": 4,
      "layoutDurationMs": 1.3130000000000002,
      "taskDurationMs": 128.22099999999998,
      "heapDeltaBytes": -16264540,
      "heapUsedBytes": 51990044,
      "domNodes": 126,
      "jsHeapTotalBytes": 7225344,
      "scriptDurationMs": 12.549,
      "eventListeners": 67,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "workflow-execution",
      "durationMs": 485.6200000000399,
      "styleRecalcs": 13,
      "styleRecalcDurationMs": 19.242,
      "layouts": 2,
      "layoutDurationMs": 0.4069999999999999,
      "taskDurationMs": 128.75599999999997,
      "heapDeltaBytes": -16565736,
      "heapUsedBytes": 51842076,
      "domNodes": 117,
      "jsHeapTotalBytes": 6963200,
      "scriptDurationMs": 10.229999999999999,
      "eventListeners": 65,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    }
  ]
}

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Cursor Review — Consolidated panel

Triggered by @mattmillerai.

Found 3 finding(s).

Severity Count
🟡 Medium 1
🟢 Low 2

Panel: 6/8 reviewers contributed findings.

Reviewers that did not contribute: kimi-k2.5:adversarial (empty), kimi-k2.5:edge-case (empty)

Comment thread src/stores/assetsStore.ts Resolved
Comment thread src/stores/assetsStore.ts Resolved
@codecov

codecov Bot commented Jul 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                                             Coverage Diff                                              @@
##           matt/fe-962-fe-adopt-cursor-pagination-in-the-generated-tab-jobs-sourced   #13781      +/-   ##
============================================================================================================
- Coverage                                                                     76.27%   76.22%   -0.06%     
============================================================================================================
  Files                                                                          1696     1693       -3     
  Lines                                                                        118176   117676     -500     
  Branches                                                                      39060    37971    -1089     
============================================================================================================
- Hits                                                                          90143    89697     -446     
+ Misses                                                                        27279    27227      -52     
+ Partials                                                                        754      752       -2     
Flag Coverage Δ
unit 67.75% <100.00%> (-0.21%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/remote/comfyui/jobs/fetchJobs.ts 93.85% <100.00%> (+0.34%) ⬆️
src/stores/assetsStore.ts 70.11% <100.00%> (+0.07%) ⬆️

... and 45 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jul 18, 2026
mattmillerai and others added 3 commits July 25, 2026 15:57
Parse the machine-readable code from the /jobs JSON error body onto
JobsApiError.errorCode and narrow the store's cursor-recovery trigger to
errorCode === 'INVALID_CURSOR' instead of any 400. Defense-in-depth for
when the endpoint gains other 400 cases; a non-cursor 400 or a non-JSON
proxy error no longer resets the history walk to offset 0.
Address Cursor review findings on the errorCode narrowing:
- Bound the error body before JSON.parse so an oversized (multi-MB) error
  payload can't block the UI thread synchronously.
- Require status === 400 alongside errorCode === 'INVALID_CURSOR', since a
  rejected cursor is only ever a 400; the same code on another status is a
  real server error and must not reset the walk to the offset fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rebasing onto matt/fe-962's own JobsApiError refactor left one test still
using the old (message, status) argument order.
@mattmillerai

Copy link
Copy Markdown
Member Author

STACKED — merging lands on matt/fe-962-fe-adopt-cursor-pagination-in-the-generated-tab-jobs-sourced (owned by #12769, @mattmillerai), NOT main.

Rebased onto the latest base branch tip to resolve a merge conflict (the base's own JobsApiError refactor — constructor(message, status) + a jobsApiErrorMessage helper — collided with this PR's errorCode addition). Resolved by keeping this PR's constructor(status, body) shape, since body has to reach the constructor anyway to extract errorCode, superseding the need for the separate helper. All existing review threads (CodeRabbit/cursor-review) were already resolved prior to this push; tests, typecheck, lint, and format all pass locally after the rebase.

Ready to merge once the base PR (#12769) merges first.

@mattmillerai
mattmillerai force-pushed the matt/be-3422-invalid-cursor-errorcode branch from 98a4e63 to 0162c0f Compare July 25, 2026 23:02
@mattmillerai
mattmillerai merged commit da1a4b6 into matt/fe-962-fe-adopt-cursor-pagination-in-the-generated-tab-jobs-sourced Aug 18, 2026
54 of 55 checks passed
@mattmillerai
mattmillerai deleted the matt/be-3422-invalid-cursor-errorcode branch August 18, 2026 20:33
mattmillerai added a commit that referenced this pull request Sep 2, 2026
…rCode

The base branch reshaped JobsApiError to (status, body) and moved cursor
classification onto the errorCode parsed from the body (#13781). This
branch's new race test still constructed the old (code, status) form, so
after merging the base isRejectedCursorError no longer matched it: the
INVALID_CURSOR escaped loadMoreHistory instead of triggering recovery.

Textually conflict-free, so it only surfaced in the merged result.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-coded Opened by the agent-work code loop cursor-review Trigger multi-model Cursor agent review on this PR size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant