fix(ui): sync worker busy/idle count with actual worker state #344

Merged
review.bot merged 1 commit from fix/341-worker-count-desync into develop 2026-03-02 13:50:55 +00:00
Owner

Summary

The header worker metrics (working/idle counts) only checked SSE workerTasks state, while individual worker cards also checked worker.currentTaskId from the API. This caused the header to show fewer working workers than the cards displayed (e.g. "2 working, 1 idle" when all 3 cards showed "Working").

Fix: Added worker.currentTaskId fallback to the busy count calculation, matching the logic already used in WorkerItem.

Closes #341

## Summary The header worker metrics (working/idle counts) only checked SSE `workerTasks` state, while individual worker cards also checked `worker.currentTaskId` from the API. This caused the header to show fewer working workers than the cards displayed (e.g. "2 working, 1 idle" when all 3 cards showed "Working"). **Fix:** Added `worker.currentTaskId` fallback to the busy count calculation, matching the logic already used in `WorkerItem`. Closes #341
The header metrics (working/idle counts) only checked SSE workerTasks
state, while individual worker cards also checked worker.currentTaskId
from the API. This caused the header to show fewer working workers
than the cards displayed.

Now both sources are checked consistently, matching the logic already
used in WorkerItem.
review.bot 2026-03-02 13:49:48 +00:00
review.bot left a comment
Owner

AI Code Review (Devstral)

The fix correctly addresses the inconsistency between worker status in the header and individual worker cards by checking both SSE state and API state for busy workers.


Automated review by pr-reviewer

## AI Code Review (Devstral) The fix correctly addresses the inconsistency between worker status in the header and individual worker cards by checking both SSE state and API state for busy workers. --- *Automated review by [pr-reviewer](https://github.com/customable/pr-reviewer)*
review.bot merged commit c2fd3fd576 into develop 2026-03-02 13:50:55 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
customable/claude-mem!344
No description provided.