Files
ComfyUI_frontend/src
Matt Miller 5ef89c73e6 feat(assets): adopt cursor pagination in the Generated tab jobs walk
The Generated tab walks GET /jobs with offset paging, which drifts when
jobs complete mid-scroll, and every status event resets the loaded list
back to page one. Core and cloud now share a keyset cursor contract on
/jobs (after / next_cursor), so:

- fetchHistoryPage accepts { after } and sends it instead of offset;
  next_cursor is surfaced from the pagination response
- the assets store walks history by cursor, bootstraps into cursor mode
  from the first offset page (the server mints a cursor either way), and
  keeps offset as the fallback for backends that don't mint cursors
- a rejected cursor (e.g. 400 INVALID_CURSOR after a server restart)
  drops the cursor and resumes once via the offset fallback
- fetchJobsRaw now throws on failure instead of fabricating an empty
  hasMore:false page, so a failed fetch is distinguishable from the end
  of the timeline and infinite scroll stays resumable after errors
- job-completion refreshes call refreshHistoryHead, which merge-prepends
  the head page instead of resetting scroll state; it replaces the list
  when the page spans the whole timeline (pruning server-side deletions)
  and restarts the walk when more than a page of new jobs would leave an
  unfillable gap
- in-flight page fetches are invalidated by an epoch counter when the
  list resets, so stale continuations can't pollute a fresh walk

hasMoreHistory is now server-authoritative instead of inferred from
batch length.
2026-06-17 11:49:02 -07:00
..
2026-01-27 17:59:19 -08:00