fix(send): human failure copy with honest sent/not-sent semantics#106
Merged
epicexcelsior merged 1 commit intoJun 13, 2026
Merged
Conversation
…nt-vs-not semantics Device repro: an MWA approval timeout rendered 'java.util.concurrent.TimeoutException: Timed out waiting for response with id=2' as the inline failure headline, plus a dev-client toast of the tagged JSON console.error dump. Developer goo in a consumer surface. - sendErrorMessages: new describeSubmitFailure(err, mode) classifier for submission-stage throws (wallet-timeout, wallet-declined, insufficient-funds, mesh-unreachable, network, unknown). Every class states the user's actual situation; all throws reaching ReviewCard's catch are pre-broadcast (submitSignedTransaction returns the signature for ambiguous submit errors), so 'nothing was sent' is honest there. Platform-goo headlines are demoted to a detail field; our own deliberately human throws pass through unchanged. - confirmation-poll timeout copy now tells the truth about post-submit ambiguity: 'submitted, confirmation unknown — check activity before retrying' (mesh variant prefixed 'submitted over the mesh'). - ReviewCard: inline panel shows the human headline with the raw error as a small selectable monospace sub-line; failure toast is the human message; the two failure console.error calls become console.warn so the dev client stops toasting JSON over the failure UI. No retry/state-machine changes: slider reset, double-send guard, silent user-cancel (LESSON 2026-05-13), and FailureCard timeout behavior are untouched. Classifier smoke-tested against 15 real error shapes incl. the device-reproduced MWA string.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Send failures read like product, not a Java stack trace, and never misreport whether funds moved.
Scope
sendErrorMessages.ts,ReviewCard.tsx, send error classification.Test
tsc clean · tier0 config/services clean · fake-money + lint clean. Reviewed: the double-send guard only throws on provably-not-broadcast preflight rejects; post-broadcast errors go to confirmation polling, so the "nothing was sent" copy is honest for every class, and no secret leaks into the rendered error detail.