Repository navigation
fix(web): say when the cold-load verifier download is offline or stalled - #755
Conversation
On a first visit the app downloads the 26.5 MB Platform verifier (9 MB gzipped) before it can read anything. Offline, the page showed bare skeletons, then blamed Dash Platform or the quorum key service and counted down retries into a dead network; back online it still waited out the countdown, and after a few tries it stopped and pointed at Settings. - The download view says "You're offline. The download starts again when you're back." or, after 15 s with no bytes, that the download stalled. - An offline download failure waits for the browser to come back online and starts again, without spending a retry. - The connect banner says "You're offline" with no countdown, and a failed verifier download is named as such instead of "Can't reach Dash Platform". - Back online reconnects at once instead of at the end of the countdown. UI and retry timing only: no stored data, contracts or verifier bytes change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…follow-ups - The download reported zero bytes before the service recorded its connect, so a server that never answered left bare skeletons for 60 s and the stall note never showed. The phase alone now decides. - The offline wait also retries after 30 s, in case a browser wrongly reports itself offline. - A body that is not wasm keeps its CompileError instead of reading as a failed download. - Copy: no semicolon in the stall note, a shorter failed-download body. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 35 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Review follow-ups. The verifier download waited inside its own fetch while the browser was offline, so every caller of the shared download (sign-in, phrase derivation, top-up) hung until its own 5 minute limit with copy that blamed a slow link, where it used to fail in about 4 s with "check your connection". The download fails fast again; the connect already holds no countdown while offline and reconnects on `online`, and offline failures now spend no automatic retry. Views still re-read once after such an outage. Also: the stall line no longer shows the moment the browser is back online, a 4xx for the verifier says to reload the page, the two offline lines read the same, and the e2e asserts the download view or the banner rather than any "You're offline" text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nner Review follow-ups: the retry and the failure copy share one predicate for a client-error download, so 408 and 429 keep the connection advice; cl-1 waits for the banner's offline state, not only the download note, before checking that nothing is blamed and no countdown runs; the first online failure after offline ones waits the first backoff step. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Problem
The mainnet QA pass (docs/launch/mainnet-qa-2026-11-24.md, rows "Cold load, Fast/Slow 3G" and "Offline mid-session") found that a first visit on a bad link gave no useful message. That visit has to download the 26.5 MB Platform verifier (9.0 MB gzipped) before anything can be read. Measured on the live testnet site before this change:
Fix
DownloadProgressBar): one plain line in place of "Once per browser: it is cached after this.":wasm-fetch.ts): still fails fast (two quick retries), so sign-in and the other callers that share it behave as before. Zero bytes are now reported when the request starts, so a server that never answers still shows the view. Before, that report arrived before the service recorded its connect and was dropped (showsProgressnow looks only at the phase).What a user sees now (390 px screenshots, light theme)
Compatibility and data
This changes UI and retry timing only. It touches no stored data, browser storage, contract, write path, verifier binary, or verify-app manifest, so there is no data-loss risk. With the browser online, the only differences are the new copy branches and the connect retrying the moment an
onlineevent fires. Sign-in and the other callers of the shared download behave as before: offline, they fail in about 4 s with their existing "check your connection" copy.Verifier size (no change made)
@dashevo/[email protected]wasm_sdk_bg.wasm: 26,513,399 B raw, 8,938,745 B with gzip -9. Code is 22.4 MB, data 3.86 MB, and there are no name or debug sections.wasm-opt -Oz(binaryen 129): 26,490,999 B raw (−0.08%) and 8,907,359 B gzipped (−0.35%, 31 KB). The published file is already optimized, so a re-opt is not worth changing a trusted binary.Tests
e2e/cold-load-offline.spec.ts, testnet build on a boat.dev large sandbox, 4/4 (--repeat-each 2) after the review follow-ups:context.setOfflineplus an aborted.wasmrequest gives "You're offline" with no "Can't reach" and no countdown. Back online, the page connects (sdkGeneration> 0) with no reload..wasmroute that never answers shows the bar, then the stalled note, then the automatic retry connects..wasmat 20%, plus a Slow 3G run. Results are in "What a user sees now".wasm-fetch.test.ts: offline still fails fast, and zero bytes before headers.service.test.ts: no timer while offline, no retry spent while offline, the immediate retry ononline, one re-read after an offline outage, and progress shown while the connect is starting.platform-failure.test.tsandfailure-states.test.tsx: the copy, the offline banner, and the stall timer.tsc --noEmit, eslint andpnpm lint:copyare clean. The full vitest run passes except the 2lib/merge/xdiff.parity.test.tscases, which fail locally on git 2.53 and are untouched by this PR.New behaviour to note: while the browser reports itself offline, the connect runs no countdown timer (master kept one). It retries on the browser's
onlineevent, or on Try again.Two independent reviews approved it with suggestions, and every suggestion is applied (04b68e0, 300480b). The first review's fixes, in 04b68e0: the medium finding (offline callers hanging up to 5 minutes), the false stall line after reconnecting, the 4xx copy, offline failures spending retries, and the e2e assertion.
🤖 Generated with Claude Code