Release: graceful Start/Stop (starting/stopping states) + cached GPU reads #163

Merged
bvandeusen merged 1 commits from dev into main 2026-06-30 19:38:50 -04:00
Owner

Agent-only. Operator report: Start/Stop fire but the status view never updates.

  • act() now applies the POST's own status response immediately and shows an optimistic starting/stopping state (pulsing, buttons disabled) on click — no longer waits on the lagging /status poll.
  • A stop with in-flight jobs shows stopping until active drains to 0, then resolves to stopped on its own.
  • applyStatus() guards the /status-only fields (connection pill + queue) so the lean, fast action response can't blank them.
  • GPU reads are now cached (1s TTL, single probe at a time) and /status no longer spawns its own nvidia-smi — so the fast /gpu poll + autoscaler + /status share one subprocess instead of piling up in the server thread pool (the underlying reason clicks felt dead under load).

Ships in the agent image.

🤖 Generated with Claude Code

Agent-only. Operator report: Start/Stop fire but the status view never updates. - `act()` now applies the POST's own status response immediately and shows an optimistic **starting**/**stopping** state (pulsing, buttons disabled) on click — no longer waits on the lagging `/status` poll. - A stop with in-flight jobs shows **stopping** until `active` drains to 0, then resolves to **stopped** on its own. - `applyStatus()` guards the `/status`-only fields (connection pill + queue) so the lean, fast action response can't blank them. - GPU reads are now cached (1s TTL, single probe at a time) and `/status` no longer spawns its own `nvidia-smi` — so the fast `/gpu` poll + autoscaler + `/status` share one subprocess instead of piling up in the server thread pool (the underlying reason clicks felt dead under load). Ships in the agent image. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 1 commit 2026-06-30 19:38:46 -04:00
feat(agent): graceful Start/Stop with starting/stopping states + instant status
CI / lint (push) Successful in 2s
CI / frontend-build (push) Successful in 19s
CI / backend-lint-and-test (push) Successful in 26s
CI / integration (push) Successful in 3m22s
c2e9157822
Operator: the buttons fire but the status view doesn't reflect the change. Cause:
act() ignored the POST's own status response and waited on the separate /status
poll (which lags behind the curator queue call). Now:

- act() applies the POST's returned status immediately for instant feedback, and
  shows an optimistic "starting"/"stopping" state (pulsing, buttons disabled)
  the moment it's clicked.
- A stop that still has in-flight jobs draining shows "stopping" until active
  hits 0, then resolves to "stopped" on its own.
- applyStatus() guards the /status-only fields (connection pill + queue) so the
  lean action response can't blank them — the Start/Stop path deliberately skips
  the slow curator call to stay snappy.

Also de-duplicate GPU reads: read_gpu() now caches (1s TTL) with one probe at a
time, and /status no longer spawns its own nvidia-smi — so the fast /gpu poll +
autoscaler + /status share a single subprocess instead of piling up in the
server thread pool (which was what made clicks feel dead under load).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ttrj5P7upUTueSfoJcxEqa
bvandeusen merged commit 2c6bf26bfc into main 2026-06-30 19:38:50 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledCurator#163