Skip to content

feat: wire smoldot lifecycle events to the loading bar - #146

Open
BigTava wants to merge 42 commits into
mainfrom
feat/smoldot-lifecycle
Open

feat: wire smoldot lifecycle events to the loading bar#146
BigTava wants to merge 42 commits into
mainfrom
feat/smoldot-lifecycle

Conversation

@BigTava

@BigTava BigTava commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Subscribe to smoldot's new lifecycle_unstable_follow JSON-RPC method and sample system_health on the chains the loading screen shows, reading both back through the chain tap so polkadot-api never sees our traffic.
  • Expose one onChainSync stream carrying sync milestones and peer counts, keyed by logical chain, and forward it to the host shell through the protocol client's origin- and source-gated listener.
  • Advance the loading bar on real signals instead of scraping log prose, and show a live peer count under the headline while the Asset Hub syncs, with honest stall and recovery copy in a theme-aware detail line.
  • Pin the smoldot dependency to the 3.3.3-dev-20260805.0 dev release that ships the feature (light-base: add lifecycle_unstable_follow RPC subscription smoldot#3317). The stable bump is tracked in Bump smoldot to stable 3.3.3 once it is released #147 and blocks the next release.

Follow-ups: #148 (typed tap primitives), #149 (SharedWorker forwarding), #150 (loading-screen accessibility).

Note: the E2E suite fails identically on this branch and on its merge-base (32 failed, 30 did not run, all at waitForHostPlaygroundFrame), so it is a pre-existing signer-bot pairing failure rather than a regression here.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

⚡ Performance Report

⚠️ No baseline found on main. This PR's results are recorded but cannot be compared.
Merge to main to establish a baseline.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

Chunks over 500 KB:

File Raw Brotli Gzip
host/assets/truapi_provider_bg.wasm 5.17 MB 1.99 MB 2.33 MB
host/assets/truapi_server_bg.wasm 7.20 MB 5.29 MB 5.56 MB
host/assets/wasm/web/truapi_server_bg.wasm 7.20 MB 5.29 MB 5.56 MB
Total 20.71 MB (+54.2 KB) 12.93 MB (+13.7 KB) (-38%) 13.85 MB (+15.8 KB)
All files
File Raw Brotli Gzip
host/.well-known/apple-app-site-association 505 B 505 B 505 B
host/.well-known/assetlinks.json 2.1 KB 343 B 427 B
host/assets/_md.js 6.3 KB 2.6 KB 2.8 KB
host/assets/blake2.js 11.7 KB 4.1 KB 4.7 KB
host/assets/bridge.js 143.6 KB (+125 B) 34.8 KB (+188 B) 41.6 KB (+184 B)
host/assets/browser.js 22.9 KB 7.6 KB 8.6 KB
host/assets/chain-sync.js 2.5 KB 1.1 KB 1.2 KB
host/assets/client.js 11.3 KB (+1.0 KB) 3.7 KB (+385 B) 4.2 KB (+441 B)
host/assets/dotli-debug-bus.js 708 B 708 B 708 B
host/assets/hex.js 160 B 160 B 160 B
host/assets/index.js 167.5 KB (+9.8 KB) 44.4 KB (+3.0 KB) 53.1 KB (+3.5 KB)
host/assets/index.css 58.8 KB (+3.8 KB) 9.2 KB (+627 B) 10.6 KB (+766 B)
host/assets/manifest.js 23.3 KB 7.4 KB 8.2 KB
host/assets/network.js 6.9 KB (+623 B) 2.3 KB (+169 B) 2.7 KB (+171 B)
host/assets/panel.js 76.3 KB 20.6 KB (-27 B) 23.2 KB (-1 B)
host/assets/proofs.js 29.3 KB 8.6 KB (+1 B) 9.5 KB (+2 B)
host/assets/resolve.js 161 B (+33 B) 161 B (+33 B) 161 B (+33 B)
host/assets/rolldown-runtime.js 716 B 716 B 716 B
host/assets/rpc-resolve.js 2.7 KB 1.1 KB (+3 B) 1.3 KB
host/assets/scale-ts.js 4.8 KB 2.0 KB 2.2 KB
host/assets/spans.js 2.3 KB 988 B 1.1 KB
host/assets/src.js 84.2 KB 26.5 KB (-50 B) 29.6 KB (+1 B)
host/assets/styles.css 15.3 KB 3.3 KB 3.9 KB
host/assets/substrate-client.js 5.8 KB 2.2 KB 2.5 KB (+3 B)
host/assets/truapi_provider_bg.wasm 5.17 MB 1.99 MB 2.33 MB
host/assets/truapi_server_bg.wasm 7.20 MB 5.29 MB 5.56 MB
host/assets/twoX.js 2.8 KB 1022 B 1.1 KB
host/assets/utils.js 3.5 KB 1.4 KB 1.5 KB
host/assets/wasm/web/README.md 13.4 KB 13.4 KB 13.4 KB
host/assets/wasm/web/package.json 371 B 371 B 371 B
host/assets/wasm/web/truapi_server.d.ts 12.6 KB 12.6 KB 12.6 KB
host/assets/wasm/web/truapi_server.js 49.7 KB 7.9 KB 9.3 KB
host/assets/wasm/web/truapi_server_bg.wasm 7.20 MB 5.29 MB 5.56 MB
host/assets/wasm/web/truapi_server_bg.wasm.d.ts 4.0 KB 4.0 KB 4.0 KB
host/assets/web.js 18.2 KB (-5 B) 4.6 KB (-5 B) 5.1 KB (-9 B)
host/assets/worker-runtime.js 28.9 KB (+28.8 KB) 6.8 KB (+6.7 KB) 7.8 KB (+7.7 KB)
host/assets/worker-runtime.js 106 B 106 B 106 B
host/assets/ws.js 25.8 KB 8.3 KB (-2 B) 9.2 KB (-5 B)
host/dotli.png 11.5 KB 11.5 KB 11.5 KB
host/favicon.svg 1.8 KB 1.8 KB 1.8 KB
host/host-sw.js 3.1 KB (+52 B) 1.2 KB (+12 B) 1.4 KB (+10 B)
host/icon-192.png 12.5 KB 12.5 KB 12.5 KB
host/icon-512.png 42.8 KB 42.8 KB 42.8 KB
host/index.html 34.8 KB (+1.8 KB) 7.1 KB (+288 B) 8.7 KB (+316 B)
host/manifest.webmanifest 441 B 441 B 441 B
host/workbox.js 14.8 KB 4.6 KB 5.1 KB
sandbox/app-sw.js 9.9 KB 3.2 KB (-7 B) 3.6 KB (-1 B)
sandbox/assets/bitswap-bridge.js 840 B 840 B 840 B
sandbox/assets/fetch.js 3.4 KB 1.2 KB (-1 B) 1.4 KB (-1 B)
sandbox/assets/index.js 125.4 KB (+1.9 KB) 35.6 KB (+666 B) 41.5 KB (+777 B)
sandbox/assets/index.css 58.8 KB (+3.8 KB) 9.2 KB (+627 B) 10.6 KB (+766 B)
sandbox/favicon.svg 1.8 KB 1.8 KB 1.8 KB
sandbox/index.html 1.7 KB 584 B (+3 B) 789 B (+1 B)
Total 20.71 MB (+54.2 KB) 12.93 MB (+13.7 KB) (-38%) 13.85 MB (+15.8 KB)

Commit: 390de86

@BigTava BigTava self-assigned this Aug 5, 2026
…a system_health polling and widened lifecycle events
…e debug log stream, poll only the Asset Hub, and address the loading review feedback
…d report only on the chains the loading screen shows
# Conflicts:
#	apps/host/src/main.ts
#	bun.lock
#	package.json
@BigTava
BigTava deployed to testnet.li August 17, 2026 16:54 — with GitHub Actions Active
@BigTava
BigTava deployed to testnet.li August 17, 2026 17:07 — with GitHub Actions Active
@BigTava
BigTava deployed to testnet.li August 18, 2026 17:02 — with GitHub Actions Active
@BigTava
BigTava deployed to testnet.li August 18, 2026 17:24 — with GitHub Actions Active
@BigTava BigTava added deploy: westend.li and removed deploy: testnet.li Deploy this PR to testnet.li labels Sep 9, 2026
@BigTava
BigTava deployed to westend.li September 9, 2026 22:17 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants