feat: redesign UPLOADS_UPDATE to send only changed items#107
Conversation
…ates) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (4): Last reviewed commit: "fix: deduplicate via sentState map to ha..." | Re-trigger Greptile |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Fixed Greptile P1 (same-second skips) in ec7b46f: changed — Claude Sonnet 4.6 |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Fixed in 4c50e81. Replaced the — Claude Sonnet 4.6 |
| .from(uploadRequests) | ||
| .where( | ||
| and( | ||
| eq(uploadRequests.batchid, batchId), |
There was a problem hiding this comment.
The (updated_at, id) cursor still misses later changes to a row that was already behind the current id boundary. For example, after the stream sends rows through (T, id=10), a later status change to id=5 can still have updated_at = T when timestamps share the same second. This predicate then requires id > 10 for rows at T, so the changed upload is excluded from every later poll and the UI can stay on the old status.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Fixed in ee19ba3. The The new approach drops the id tiebreaker and queries with — Claude Sonnet 4.6 |
Instead of polling all uploads every 2s and JSON-diffing the full list, the backend now tracks a
lastUpdateTimeand queries only rows changed since that timestamp. This mirrors theOptimizedBatchStreamerpattern used for the batches list.getLatestUploadUpdateTime,getUploadsByBatchChangedSince, andcountActiveUploadsInBatchtoUploadService; rewritesstartUploadStreamto use thelastUpdateTimepattern; removes the unusedUPLOAD_DONE_STATUSESconstantpartial: booleantoUploadsUpdateSchemaid(was:key) in the merge; stats still recomputed from the fullbatchUploadslist after each merge— Claude Sonnet 4.6