Repository navigation
Add a per-job lifecycle log and live status in the AI chat - #34
Conversation
Users had no visibility into what was actually happening with a pending
chat request beyond a static "waiting..."/"computing..." label, which was
confusing when a job sat queued because no worker served the chosen model,
or silently retried after a worker failure.
GET /api/jobs/{id} now returns `events` (queued/claimed/requeued/completed/
failed/cancelled, each timestamped and naming the worker where relevant)
and `available_workers` (online operator-approved workers for this job's
model/privacy). Worker identity is resolved from id to display name at read
time and only ever shown to the job's own owner. The desktop app's chat
renders this live under the pending answer instead of the old static label.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014XvdYnanfEU1LisNWNpubA
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9fed45c085
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case"cancelled":return{text:t("evCancelled"),cls:""}; | ||
| default:return{text:e.type,cls:""}}} | ||
| function renderPending(pendingStatus,pendingTimeline,s){ | ||
| const lastWorker=[...s.events].reverse().find(e=>e.worker&&e.type!=="requeued"&&e.type!=="failed")?.worker; |
There was a problem hiding this comment.
Keep job polling compatible with older coordinators
When the desktop app is updated but its configured coordinator still returns the previous job-status response without events, spreading s.events throws before the response status is checked. The polling catch then reports an error and never displays even a completed answer. Default missing fields and fall back to the previous status labels so the client can keep polling older self-hosted servers.
Useful? React with 👍 / 👎.
The status line and timeline added for the job lifecycle log were purely textual. Human feedback on a pending request benefits from something visibly moving, not just changing words, so add a small 3-dot bounce animation next to the status text while a job is queued or running, honoring prefers-reduced-motion. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014XvdYnanfEU1LisNWNpubA
Summary
GET /api/jobs/{id}now returnsevents(queued/claimed/requeued/completed/failed/cancelled, each timestamped and naming the worker where relevant) andavailable_workers(how many online, operator-approved workers could currently take this job's model/privacy).Why
Chat requests could sit queued indefinitely with no feedback when no worker served the requested model, and silent retries after a worker failure looked identical to a healthy run — both confusing from the requester's side.
Test plan
pytest -q(247 passed, 3 skipped)ruff check --select E9,F63,F7,F82 .tests/test_job_events.pycovers: initial queued event, available-worker counting (including trust/privacy filtering), claim→complete naming the worker, requeue-then-fail-for-good after repeated failures, cancellation, queue timeout, and worker revocation requeuing with an event.node --check.🤖 Generated with Claude Code
https://claude.ai/code/session_014XvdYnanfEU1LisNWNpubA