feat(api): publish thumbnails_ready SSE event on derived asset acceptance #948
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/thumbnail-sse-ready-events"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
thumbnails_readywith payload{"mediaItemIds":[...]}(camelCase, deduped, chunked at 200) on the existing/api/events/streamchannel.WorkerResultService.submitResultwhenever a worker result accepts >=1thumbnail/previewderived asset; owner-scoped via the same viewer resolution astimeline_visibility_changed(items with different viewer sets are batched separately so IDs never cross visibility boundaries).timeline_visibility_changed(reasonpreview_ready) emit unchanged. Discovery/plant thumbnails out of scope.Why
Frontend currently blind-retry-probes pending thumbnails every 6s (max 10 attempts). This event lets clients resolve exactly the spinners that became ready (frontend lane:
feat/thumbnail-sse-web).Verification
rtk ./gradlew :apps:api:compileJavagreenrtk ./gradlew :apps:api:test --tests '*WorkerResult*'green (61 tests incl. newWorkerResultThumbnailsReadyEventTest: emit on accept, dedupe, no-op when nothing accepted, discovery_thumbnail excluded, owner-scoped viewers)