- 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>
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>
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>
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>
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>