stream auto review progress over SSE so large inboxes don't feel frozen
Build and Push Docker Image / build (push) Successful in 1m18s
Build and Push Docker Image / build (push) Successful in 1m18s
sortInbox is now async, yields every 10 items, and emits inbox_sort_start + inbox_sort_progress via optional hooks. the pipeline route handler wires those hooks to the existing job events stream and guards against a second concurrent sort with a 409. the inbox column swaps its Auto Review button for a live "Sorting N/T" counter and progress bar while the sort is in flight; the auto-process toggle hides to give the progress the full subtitle line. the previous behaviour was a frozen button for the entire duration of the sort. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -126,8 +126,11 @@ app.post("/auto-processing", async (c) => {
|
||||
|
||||
if (body.enabled) {
|
||||
const { sortInbox, getAudioLanguages } = await import("./review");
|
||||
const { emitInboxSorted } = await import("./execute");
|
||||
const result = sortInbox(getDb(), getAudioLanguages());
|
||||
const { emitInboxSorted, emitInboxSortStart, emitInboxSortProgress } = await import("./execute");
|
||||
const result = await sortInbox(getDb(), getAudioLanguages(), {
|
||||
onStart: emitInboxSortStart,
|
||||
onProgress: emitInboxSortProgress,
|
||||
});
|
||||
emitInboxSorted(result);
|
||||
return c.json({ ok: true, enabled: true, ...result });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user