Upload failures keep name, size and file readability #34

Merged
void merged 5 commits from void/upload-error-diagnostics into dev 2026-11-09 10:59:53 +00:00

2026-11-08

Void
Upload each attempt from an in-memory copy; failure line names the XHR's end state
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 3m12s
- before every attempt the picked file is read into memory (ArrayBuffer) and that copy is what
  the SDK uploads; a file the browser cannot read fails there as "file unreadable before upload"
- while an attempt runs, XMLHttpRequest open/send are wrapped (reference-counted with the abort
  probe, restored in finally, no behaviour change) so the failure line carries each upload XHR's
  method, path (query dropped), readyState, status, the events it fired with timings, and our
  signal.aborted
- the abort-call stacks stay as a minor extra

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 18:47:27 +00:00
Void
Upload failure text carries who called abort and what the owning component did
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
For each upload attempt, XMLHttpRequest.prototype.abort and AbortController.prototype.abort are
wrapped (reference-counted across overlapping attempts, restored in finally) and every call is
recorded with a six-frame file:line:col stack; "abort calls: none" says the page called neither.
The upload hook also counts renders after attach (and those within 300ms) and any unmount.
The in-memory copy and the once-only retry are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 18:45:29 +00:00
Void
Retry an upload once when it aborts at once with no progress
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 3m12s
An AbortError within 3s of starting, with no progress event and no user cancel, is retried once;
the failed attempt discards its connection, so the retry cannot reuse it. The final failure text
says "retried" with attempt 1's timing. Never retried after progress, a user cancel, a
different error, or a slow abort. The cause (a reused dead keep-alive socket) is unproven.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 18:05:11 +00:00
Void
Upload failure text carries what the client can observe
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 3m5s
Adds connectivity (onLine, effectiveType, rtt, downlink, saveData), tab visibility, ms since
last user activity, time to first progress and bytes loaded, and ms to failure. Nothing patches
XMLHttpRequest; the progress handler and window input events are the only sources.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 17:32:32 +00:00
Void
Upload failures keep their name, size and file readability
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
The catch in uploadContent set errcode from e.message and dropped an empty
message, so the SDK's status-0 AbortError (DOMException with empty message)
surfaced as "MatrixError: Unknown message". uploadFailure now uses e.name for
errcode, keeps the original as cause, and puts size, type and whether the
file can still be read into the message the upload card shows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 17:08:51 +00:00