Repository navigation
fix(messages): offer Retry as soon as a send fails - #3080
Conversation
wesbillman
left a comment
There was a problem hiding this comment.
🤖 Star Lord’s automated source review via Wes’s account, with independent Rocket, Mantis and Groot coverage.
No actionable findings in this change. The failed-only grace exemption preserves the existing ten-second delay for sending/accepted/unknown states and leaves confirmed messages quiet. Retry keeps the original event identity, and the outbox preserves earlier uncertain/accepted evidence across later refusals. The added controlled-clock unit and component assertions target the original regression; the help and shell-design updates match the behavior.
Reviewed head cd47b506f0df558c1c70b744de681978b99be780 against target base/merge-base 58116b826171d190a7376fc57b0509c32c507dde.
Source-only review: no tests, builds or app runs performed. Both screenshots and the description were inspected; the attached video was not. Live screen-reader, native and responsive behavior remain unverified. The hosted snapshot has passing JavaScript/browser jobs, but Rust and tool integration and CI required failed, and Windows validation was skipped; failure causality was not investigated. This is not an approval or a claim of passing CI.
When the relay refuses a plain-text send it answers in about 50 ms, but the message row stayed quiet until `created_at + 10 s` and only then showed Retry. `deliveryFeedback` applied the 10 s delivery grace to every non-`seen` state, `failed` included. The grace exists to hide uncertainty, and a `failed` send is not uncertain: every path to `failed` (relay refusal, rate-limited `PublishNotSent`, HTTP refusal, pre-publish error) proves the message was not delivered, while a transport error mid-publish becomes `unknown`. So the grace check now applies only when `delivery !== "failed"`. `sending`, `accepted` and `unknown` keep waiting ten seconds from the message timestamp; a failed send restored after a reload still shows Retry at once. `DeliveryNotice` needs no change: a new row re-renders it, and its grace timer is harmless for failed rows. The `failed` guard is keyed on the delivery state rather than the outbox item's `refused` flag, which never reaches `ChannelMessage`, is dropped on reload, and is not set for rate-limit refusals. Tests: `delivery.test.ts` narrows the ten-second quiet case to unconfirmed states and adds a failed-inside-the-grace case; `DeliveryNotice.test.tsx` rerenders a row inside the grace as `sending`, `failed`, then `unknown` and expects no status, Retry, then no status. Both new tests failed before the fix. `docs/shell-design.md` and `docs/buzz-help.md` describe the new rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: mtoohey <mtoohey@squareup.com>
cd47b50 to
f7363ae
Compare
kazemek21
left a comment
There was a problem hiding this comment.
I reviewed the PR and went through the Nexus review-tracker notes. I did not see any P2-or-higher issues in this change.
Posted by Codex (gpt-6.1-sol) on behalf of kylez
…restricted-communities * origin/main: ci: give WebKit shards headroom and keep fixture servers' idle connections open (#3074) fix(messages): offer Retry as soon as a send fails (#3080) fix(agents): link Settings from key failures and quote the provider (#3081) fix(identity): link Builderlab from Identity sync where its page holds the next step (#3082) fix(startup): show a recoverable screen when Buzz fails to open or crashes (#3085) fix(attention): ask before deleting a watch (#3092) fix(agents): remove the owner-access read tools (#3123) fix(channels): keep the side pane mounted under the image viewer (#3111) fix(solo): ask before Escape or Close drops a new workspace's typed fields (#3114) # Conflicts: # docs/configuration.md # vite.config.ts
What the user saw
When the relay refused a plain-text send, the message row stayed silent for about ten seconds and only then showed a small Retry. The relay actually answers in about 50 ms, so the user had no idea the message had failed until the ten-second delivery grace ran out.
The fix
deliveryFeedbackapplied the 10 s delivery grace (measured fromcreated_at) to every non-seenstate,failedincluded. The grace exists to hide uncertainty, and afailedsend is not uncertain: every path tofailed(relay refusal, rate-limitedPublishNotSent, HTTP refusal, pre-publish error) proves the message was not delivered, while a transport error mid-publish becomesunknown.The grace check now applies only when
delivery !== "failed".sending,acceptedandunknownstill wait ten seconds from the message timestamp. A failed send restored after a reload shows Retry at once.DeliveryNoticeneeds no change: a new row re-renders it, and its grace timer is harmless for failed rows.The guard is keyed on the delivery state rather than the outbox item's
refusedflag, which never reachesChannelMessage, is dropped on reload, and is not set for rate-limit refusals.Before and after
"Lunch at 12?" is sent in #Alpha in both panels at the same moment and the relay refuses it as rate-limited. The overlay clock counts from pressing Enter.
58116b8)side-by-side.mp4
Docs
docs/shell-design.md: the delivery rule now says failed sends show Retry immediately and only unconfirmed sends wait about ten seconds.docs/buzz-help.md: same rule in the bundled help.Verification
src/features/messages/delivery.test.ts: narrows the ten-second quiet case to unconfirmed states and adds a failed-inside-the-grace case.src/features/messages/DeliveryNotice.test.tsx: rerenders a row inside the grace assending,failed, thenunknownand expects no status, Retry, then no status.tsc --noEmitand Biome are clean.Scope
This is PR 1 of three independent changes from the refused-send note (the other two are the sidebar unsent marker and keeping failed sends out of previews). #2229 touches
DeliveryNotice.tsxonly incanRetry(an imported-row guard) and leaves the grace alone, so there is no conflict.🤖 Generated with Claude Code