Distinguish loading, failure and an empty queue
TaskQueue starts with an empty array, shows the empty-queue message before the response, and calls api.tasks.list().then without handling rejection. The API client throws on unsuccessful HTTP responses; the card offers no recovery.
- Estimated size
- S · 2–4 hours
- Skills
- React · TypeScript · HTTP
Files and evidence
- YagoLagrottiBracco/dev-forge/apps/web/src/components/agents/task-queue.tsxTarget file ·
dabb49843b69· L9–L34 - YagoLagrottiBracco/dev-forge/apps/web/src/lib/api.tsContext ·
dabb49843b69· L19–L34
Step-by-step acceptance criteria
- Reproduce with a pending request and a rejected request; add explicit loading and error states to the card.
- Show an empty queue only after success with no TODO tasks; preserve the TODO filter and five-item limit.
- Offer a keyboard-accessible retry button; a successful retry must replace the error state.
- Cover pending, HTTP failure, recovery, empty success and success with more than five tasks in component tests.