Skip to content

fix(send): human failure copy with honest sent/not-sent semantics#106

Merged
epicexcelsior merged 1 commit into
anonmesh:stagingfrom
epicexcelsior:night3/send-failure-ux
Jun 13, 2026
Merged

fix(send): human failure copy with honest sent/not-sent semantics#106
epicexcelsior merged 1 commit into
anonmesh:stagingfrom
epicexcelsior:night3/send-failure-ux

Conversation

@epicexcelsior

Copy link
Copy Markdown
Collaborator

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.

…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.
@epicexcelsior epicexcelsior merged commit fc9bacf into anonmesh:staging Jun 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant