fix: unbounded 1-second retry loop on composer send #459
Labels
No labels
backend
bug
chore
duplication
effort:complex
effort:medium
effort:trivial
enhancement
frontend
fullstack
priority:high
ready-for-agent
refactor
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dries/ocman#459
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Code-quality audit (P2).
frontend/src/components/assistant/Composer.tsx:564-586.Why it matters
No attempt cap, no backoff, no user-visible cancel. The only exit is unmounting the component. With the backend down this is one request per second, indefinitely, from every open tab — and the composer stays locked (
sending === true) the whole time, so the user cannot edit, cancel, or copy their message out. A tab left open overnight against a stopped backend is thousands of failed requests.Suggested fix
Cap at ~5 attempts with exponential backoff (1s, 2s, 4s, 8s, 16s), then give up and route the message through the existing
failedSendspath so the user gets it back and can retry deliberately.Acceptance criteria
failedSends.onSendalways throwsBackendUnavailableError— assert a bounded call count and thatsendingreturns tofalse.Effort: S.