feat(web): show processing and live upload events in admin logs #953

Merged
chris merged 5 commits from feat/admin-logs-processing into main 2026-09-28 23:53:11 +02:00
Owner

Summary

Reworks Admin → Logs so media processing is actually visible and upload events are prominent + live (user request: 'ich kann nicht sehen, wenn ein Bild hochgeladen/verarbeitet wird').

  • Section order: Upload events → Processing → scheduled-job summary → Job event terminal.
  • New Processing section: GET /api/admin/job-events?churn=only&limit=100 with a static 10-option type filter (never derived from the returned page), independent keyset cursor/history, and existing event formatting. Requires PR #950 (churn param) — until that lands the feed shows its designed error state and retries on the next poll.
  • Upload events moved to the top, capped at max-h-96 with internal scroll, and refreshed live via a typed refreshUploadEvents callback wired from the page.
  • One shared 5s timer refreshes all three feeds independently: paused while document.hidden, refresh on visibility change, last-good data retained on transient errors, stale-response and overlapping-load guards per feed.
  • Poll merges preserve history: Load older pages and reader position survive polling (dedup by event id, newest-first tie-break) — logic extracted into jobEventFeed.ts for unit testing.

Test plan

  • npm run check: 0 errors (22 pre-existing warnings in unrelated files).
  • npx vitest run: 5 files, 35 tests passed (8 new: merge/dedup/tie-break/append/unseen + churn serialization incl. legacy-omits-param).
  • npm run build: success.
  • Playwright admin-operator.spec.ts: desktop 6/6, mobile 6/6 (churn=only mocked separately per ISSUE-071 lesson; section-order, static filter, pagination retention, and live-refresh assertions added).

Depends on: #950 (merge first). Version bump 1.21.59.

## Summary Reworks Admin → Logs so media processing is actually visible and upload events are prominent + live (user request: 'ich kann nicht sehen, wenn ein Bild hochgeladen/verarbeitet wird'). - **Section order**: Upload events → Processing → scheduled-job summary → Job event terminal. - **New Processing section**: `GET /api/admin/job-events?churn=only&limit=100` with a static 10-option type filter (never derived from the returned page), independent keyset cursor/history, and existing event formatting. Requires PR #950 (`churn` param) — until that lands the feed shows its designed error state and retries on the next poll. - **Upload events moved to the top**, capped at `max-h-96` with internal scroll, and refreshed live via a typed `refreshUploadEvents` callback wired from the page. - **One shared 5s timer** refreshes all three feeds independently: paused while `document.hidden`, refresh on visibility change, last-good data retained on transient errors, stale-response and overlapping-load guards per feed. - **Poll merges preserve history**: `Load older` pages and reader position survive polling (dedup by event id, newest-first tie-break) — logic extracted into `jobEventFeed.ts` for unit testing. ## Test plan - `npm run check`: 0 errors (22 pre-existing warnings in unrelated files). - `npx vitest run`: 5 files, 35 tests passed (8 new: merge/dedup/tie-break/append/unseen + churn serialization incl. legacy-omits-param). - `npm run build`: success. - Playwright `admin-operator.spec.ts`: desktop 6/6, mobile 6/6 (churn=only mocked separately per ISSUE-071 lesson; section-order, static filter, pagination retention, and live-refresh assertions added). Depends on: #950 (merge first). Version bump 1.21.59.
feat(web): show processing and live upload events in admin logs
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 10s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 23m37s
bbe2effca3
Admin → Logs now shows four ordered sections: Upload events, Processing,
scheduled-job summary, and the job event terminal. Processing is a new
feed backed by GET /api/admin/job-events?churn=only (limit 100) with a
static, readable job-type filter and its own keyset cursor and Load older
history. Upload events moved to the top, gained an internal 24rem scroll
container, and now live-refresh via a narrowly typed callback so the tab's
single 5s timer refreshes all three feeds independently (paused while
document.hidden, resumed on visibility, one failure never blocks the
others). Poll merges preserve Load older history, reader scroll position,
and last-good data on transient errors.

- jobEvents client: optional churn: 'include' | 'only' query param
- jobEventFeed helpers: merge/append/unseen id-set helpers (unit tested)
- admin-operator.spec.ts: churn=only mocks, section-order and filter
  assertions, scoped Load older selectors, live upload refresh +
  processing pagination-retention coverage

Depends on the parallel API branch implementing the churn query param;
until it is integrated the Processing feed shows its designed error state.
chore: version bump 1.21.59
Some checks failed
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Has been cancelled
Build and Deploy / Run scoped PR tests (push) Has been cancelled
Build and Deploy / Android unit tests and debug APK (push) Has been cancelled
Build and Deploy / Smoke API and media worker (push) Has been cancelled
Build and Deploy / Smoke web (push) Has been cancelled
Build and Deploy / Smoke ML worker (push) Has been cancelled
Build and Deploy / Smoke people worker (push) Has been cancelled
Build and Deploy / Build postgres image (push) Has been cancelled
Build and Deploy / Deploy postgres (push) Has been cancelled
Build and Deploy / Build API image (push) Has been cancelled
Build and Deploy / Build web image (push) Has been cancelled
Build and Deploy / Build media worker image (push) Has been cancelled
Build and Deploy / Build ML worker image (push) Has been cancelled
Build and Deploy / Build plants worker image (push) Has been cancelled
Build and Deploy / Build people worker image (push) Has been cancelled
Build and Deploy / Build converter worker image (push) Has been cancelled
Build and Deploy / Deploy API (push) Has been cancelled
Build and Deploy / Deploy web (push) Has been cancelled
Build and Deploy / Deploy media worker (push) Has been cancelled
Build and Deploy / Deploy ML worker (push) Has been cancelled
Build and Deploy / Deploy plants worker (push) Has been cancelled
Build and Deploy / Deploy people worker (push) Has been cancelled
Build and Deploy / Deploy converter worker (push) Has been cancelled
Build and Deploy / Clean Docker build artifacts (push) Has been cancelled
0c2dc75f43
merge: resolve version bump conflict (1.21.59)
Some checks failed
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Has been cancelled
Build and Deploy / Run scoped PR tests (push) Has been cancelled
Build and Deploy / Android unit tests and debug APK (push) Has been cancelled
Build and Deploy / Smoke API and media worker (push) Has been cancelled
Build and Deploy / Smoke web (push) Has been cancelled
Build and Deploy / Smoke ML worker (push) Has been cancelled
Build and Deploy / Smoke people worker (push) Has been cancelled
Build and Deploy / Build postgres image (push) Has been cancelled
Build and Deploy / Deploy postgres (push) Has been cancelled
Build and Deploy / Build API image (push) Has been cancelled
Build and Deploy / Build web image (push) Has been cancelled
Build and Deploy / Build media worker image (push) Has been cancelled
Build and Deploy / Build ML worker image (push) Has been cancelled
Build and Deploy / Build plants worker image (push) Has been cancelled
Build and Deploy / Build people worker image (push) Has been cancelled
Build and Deploy / Build converter worker image (push) Has been cancelled
Build and Deploy / Deploy API (push) Has been cancelled
Build and Deploy / Deploy web (push) Has been cancelled
Build and Deploy / Deploy media worker (push) Has been cancelled
Build and Deploy / Deploy ML worker (push) Has been cancelled
Build and Deploy / Deploy plants worker (push) Has been cancelled
Build and Deploy / Deploy people worker (push) Has been cancelled
Build and Deploy / Deploy converter worker (push) Has been cancelled
Build and Deploy / Clean Docker build artifacts (push) Has been cancelled
a50bf4911b
chore: retrigger CI (runner-2 docker flake, ISSUE-076)
Some checks failed
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 5s
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Has been cancelled
48603f9631
Merge remote-tracking branch 'origin/main' into feat/admin-logs-processing
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 9s
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 2m32s
adbae7090f
chris merged commit 675d637aec into main 2026-09-28 23:53:11 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!953
No description provided.