Skip to content

feat(chat): integrate Chat host authority above PolkaVM runtime - #236

Merged
replghost merged 47 commits into
feat/pvm-wasmfrom
feat/chat-v2-host-runtime
Sep 15, 2026
Merged

replghost merged 47 commits into
feat/pvm-wasmfrom
feat/chat-v2-host-runtime

Conversation

@replghost

@replghost replghost commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Dedicated Chat integration above the PolkaVM browser runtime. Adds Chat identity authority permissions and consumes the corresponding native Chat host APIs. The experimental debug-only browser wallet is inherited from #238, not introduced in this PR’s own diff.

Stack and dependencies

Chat-specific host APIs remain separate from the native PolkaVM base. Client, host bindings, and WASM must be generated as a matching package set from the Chat host source.

History

Continues the Chat integration originally reviewed in #226. #226 is merged; this reopened PR is the active Chat integration and RFC reference.

Earlier staging verification

Deployed revision a7f6f7e00705cb76cae7a2c528dcee85bf044315 to https://westendli.dev with debug wallets enabled (APP_DEBUG=true; networks paseo-next-v2,previewnet). Deployment and quality gate passed, including all 8 published-product smoke scenarios. The live host bundle advertises the same revision.

Live Chromium verification: amber flask account control without a full-width warning strip; header Disconnect preserving the wallet and opening a real Mobile pairing QR; 24-word phrase export; deletion followed by import restoring the same native account keys; and reachable narrow-screen recovery controls. The disposable test wallet and isolated browser profile were removed.

Activation-first wallet staging verification

Deployed a144ce7198d28029ecbbfe7a3d413c913563c6b1 to https://westendli.dev. Deployment, quality gate, and published-product smoke passed. This inherits the wallet activation, claimed-state, and docking improvements through #238 and #185.

The matching Chat client/host packages use native source 8911041a4dd85fbd8ff1c2f283dca04d51bd2b6a from paritytech/host-rust-core#709. The complete unchanged WASM/glue subtree remains pinned to ccf2fc918f35a7ac35c5b0907c99ef33bf997bf6; generated wire/client/host bindings match it byte-for-byte. Provenance and package digests are recorded in vendor/truapi-host.lock.json.

Live Chromium verification: activation is the first Overview action and username controls remain hidden until activation completes. A fresh disposable Lite claim confirmed on chain while the inspector was closed, updated the footer and panel automatically, and replaced the claim form with the confirmed name. Docking reflows the landing page and keeps the inspector between the header and debug footer. The identity proxy returns its JSON attester response.

Chat authority review follow-up (not deployed)

Verification of this update

  • typecheck, lint, and production build: passed
  • permission/confirmation/modal suites: 47 passed
  • pinned PolkaVM runtime asset checks: passed
  • real Chromium using these exact rebuilt Wasm bytes and the production Dotli consent UI: a username-only grant shows the separate Chat prompt; Deny persists; Allow permits real Bind and Seal/Open; revocation blocks Bind, Seal, and Open without another prompt
  • isolated in-memory test wallet only; no chain transaction or message was sent, and the temporary browser smoke entrypoint was removed

Earlier staging deployments above predate this permission correction. This update has not been deployed or released. Native SDK rebuild and signed Epoca test compilation passed locally; the phone is unavailable, so on-device messaging remains unverified.

For local retesting after pulling these vendored package updates, run bun install --force --frozen-lockfile to refresh cached local-file dependencies before starting the existing development/build commands.

replghost and others added 12 commits September 10, 2026 07:13
…-host-runtime

# Conflicts:
#	apps/sandbox/public/polkavm-runtime/SHA256SUMS
#	apps/sandbox/public/polkavm-runtime/SOURCE.json
#	apps/sandbox/public/polkavm-runtime/polkavm-browser-runtime.wasm
#	apps/sandbox/public/polkavm-runtime/polkavm-worker.js
#	scripts/polkavm-runtime.lock.json
#	vendor/truapi-host.lock.json
#	vendor/truapi-host/dist/wasm/web/truapi_server.d.ts
#	vendor/truapi-host/dist/wasm/web/truapi_server.js
#	vendor/truapi-host/dist/wasm/web/truapi_server_bg.wasm
#	vendor/truapi-host/dist/wasm/web/truapi_server_bg.wasm.br
#	vendor/truapi-host/dist/wasm/web/truapi_server_bg.wasm.d.ts
#	vendor/truapi-host/dist/wasm/web/truapi_server_bg.wasm.gz
@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

Chunks over 500 KB:

File Raw Brotli Gzip
host/assets/bridge.js 785.2 KB (+640.6 KB) 169.1 KB (+134.0 KB) 218.4 KB (+176.4 KB)
host/assets/truapi_provider_bg.wasm 5.27 MB 2.00 MB 2.35 MB
host/assets/truapi_server_bg.wasm 7.69 MB (+501.0 KB) 5.40 MB (+112.8 KB) 5.71 MB (+161.6 KB)
host/assets/wasm/web/truapi_server_bg.wasm 7.69 MB (+501.0 KB) 5.40 MB (+112.8 KB) 5.71 MB (+161.6 KB)
sandbox/polkavm-runtime/polkavm-browser-runtime.wasm 1.07 MB 185.6 KB 249.0 KB
Total 23.98 MB (+3.15 MB) 13.62 MB (+685.9 KB) (-43%) 14.77 MB (+907.4 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/base.js 4.7 KB 1.9 KB 2.1 KB
host/assets/blake2.js 7.3 KB (-4.4 KB) 2.6 KB (-1.6 KB) 2.9 KB (-1.8 KB)
host/assets/blake2.js 4.5 KB (-7.2 KB) 1.9 KB (-2.2 KB) 2.1 KB (-2.6 KB)
host/assets/bridge.js 785.2 KB (+640.6 KB) 169.1 KB (+134.0 KB) 218.4 KB (+176.4 KB)
host/assets/browser.js 22.9 KB 7.6 KB 8.6 KB
host/assets/chain-sync.js 3.8 KB 1.5 KB (+1 B) 1.7 KB (+2 B)
host/assets/client.js 13.4 KB (+1.0 KB) 4.4 KB (+337 B) 4.9 KB (+373 B)
host/assets/hex.js 160 B 160 B 160 B
host/assets/index.css 62.6 KB (+1.7 KB) 9.8 KB (+267 B) 11.3 KB (+343 B)
host/assets/index.js 295.6 KB (+111.1 KB) 80.9 KB (+31.6 KB) 96.9 KB (+37.9 KB)
host/assets/manifest.js 21.5 KB (-1.8 KB) 7.0 KB (-365 B) 7.7 KB (-413 B)
host/assets/network.js 6.6 KB (+772 B) 2.3 KB (+283 B) 2.7 KB (+328 B)
host/assets/panel.js 118.2 KB (+27.1 KB) 31.7 KB (+7.0 KB) 36.3 KB (+8.2 KB)
host/assets/proofs.js 29.3 KB (+1 B) 8.6 KB (-1 B) 9.5 KB (+5 B)
host/assets/resolve.js 161 B 161 B 161 B
host/assets/rolldown-runtime.js 901 B (+185 B) 901 B (+185 B) 901 B (+185 B)
host/assets/rpc-resolve.js 3.1 KB (+370 B) 1.3 KB (+116 B) 1.4 KB (+114 B)
host/assets/scale-ts.js 4.8 KB 2.0 KB 2.2 KB
host/assets/spans.js 2.8 KB (+373 B) 1.2 KB (+149 B) 1.4 KB (+175 B)
host/assets/src.js 84.4 KB (+143 B) 26.6 KB (+115 B) 29.7 KB (+132 B)
host/assets/styles.css 27.0 KB (+5.9 KB) 5.5 KB (+939 B) 6.5 KB (+1.0 KB)
host/assets/substrate-client.js 5.8 KB 2.2 KB (+1 B) 2.5 KB (-3 B)
host/assets/truapi_provider_bg.wasm 5.27 MB 2.00 MB 2.35 MB
host/assets/truapi_server_bg.wasm 7.69 MB (+501.0 KB) 5.40 MB (+112.8 KB) 5.71 MB (+161.6 KB)
host/assets/twoX.js 2.8 KB 1023 B (+1 B) 1.1 KB (-2 B)
host/assets/utils.js 3.5 KB 1.4 KB 1.5 KB
host/assets/wasm/web/README.md 16.8 KB (+3.4 KB) 16.8 KB (+3.4 KB) 16.8 KB (+3.4 KB)
host/assets/wasm/web/package.json 372 B (+1 B) 372 B (+1 B) 372 B (+1 B)
host/assets/wasm/web/truapi_server.d.ts 19.4 KB (+6.8 KB) 19.4 KB (+6.8 KB) 19.4 KB (+6.8 KB)
host/assets/wasm/web/truapi_server.js 64.6 KB (+14.9 KB) 9.1 KB (+1.1 KB) 10.6 KB (+1.4 KB)
host/assets/wasm/web/truapi_server_bg.wasm 7.69 MB (+501.0 KB) 5.40 MB (+112.8 KB) 5.71 MB (+161.6 KB)
host/assets/wasm/web/truapi_server_bg.wasm.d.ts 6.3 KB (+2.3 KB) 6.3 KB (+2.3 KB) 6.3 KB (+2.3 KB)
host/assets/web.js 21.6 KB (+3.3 KB) 5.5 KB (+969 B) 6.2 KB (+1.1 KB)
host/assets/worker-runtime.js 106 B 106 B 106 B
host/assets/worker-runtime.js 40.5 KB (+40.4 KB) 9.3 KB (+9.2 KB) 10.6 KB (+10.5 KB)
host/assets/ws.js 25.8 KB (+2 B) 8.3 KB (-8 B) 9.2 KB
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 (-8 B) 1.2 KB (-1 B) 1.3 KB (-14 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 36.4 KB (+190 B) 7.4 KB (+60 B) 9.0 KB (+79 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 11.3 KB (+1.4 KB) 3.5 KB (+317 B) 4.0 KB (+382 B)
sandbox/assets/bitswap-bridge.js 1.1 KB 577 B (+30 B) 634 B (+1 B)
sandbox/assets/fetch.js 3.4 KB 1.2 KB (+2 B) 1.4 KB (+3 B)
sandbox/assets/index.css 62.6 KB (+1.7 KB) 9.8 KB (+267 B) 11.3 KB (+343 B)
sandbox/assets/index.js 202.3 KB (+75.5 KB) 56.7 KB (+20.7 KB) 66.2 KB (+24.1 KB)
sandbox/favicon.svg 1.8 KB 1.8 KB 1.8 KB
sandbox/index.html 2.9 KB (+56 B) 785 B (+22 B) 1.1 KB (+33 B)
sandbox/polkavm-runtime/LICENSE-MPL-2.0 16.3 KB 16.3 KB 16.3 KB
sandbox/polkavm-runtime/PolkaVM-LICENSE-APACHE 10.6 KB 10.6 KB 10.6 KB
sandbox/polkavm-runtime/PolkaVM-LICENSE-MIT 1023 B 1023 B 1023 B
sandbox/polkavm-runtime/SHA256SUMS 631 B 631 B 631 B
sandbox/polkavm-runtime/SOURCE.json 502 B 502 B 502 B
sandbox/polkavm-runtime/polkavm-browser-runtime.wasm 1.07 MB 185.6 KB 249.0 KB
sandbox/polkavm-runtime/polkavm-gpu-worker.js 64.2 KB 11.0 KB 12.8 KB
sandbox/polkavm-runtime/polkavm-worker.js 109.0 KB 17.0 KB 20.8 KB
Total 23.98 MB (+3.15 MB) 13.62 MB (+685.9 KB) (-43%) 14.77 MB (+907.4 KB)

Commit: 3fae928

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

⚠️ E2E Product suite skipped — pairing/signing infrastructure is unavailable.

The truapi-host CLI could not complete pairing (testnet chains or
identity backend outage). This is not a dot.li test failure.
Re-run from the Actions tab once the infrastructure recovers.

Logs: https://github.com/paritytech/dotli-community/actions/runs/35003032097

# Conflicts:
#	vendor/truapi-host.lock.json
#	vendor/truapi/dist/playground/codegen/truapi-dts.d.ts
#	vendor/truapi/dist/playground/codegen/truapi-dts.js
# Conflicts:
#	vendor/truapi-host.lock.json
#	vendor/truapi/dist/playground/codegen/truapi-dts.d.ts
#	vendor/truapi/dist/playground/codegen/truapi-dts.js
@replghost
replghost requested a review from a team as a code owner September 15, 2026 01:37
@replghost
replghost merged commit b03aa81 into feat/pvm-wasm Sep 15, 2026
15 of 16 checks passed
@replghost
replghost deleted the feat/chat-v2-host-runtime branch September 15, 2026 23:43
@github-actions

Copy link
Copy Markdown
Contributor

E2E Product suite failed on a409e6692f42dd44ac643021f7cacd4c36db4f66 — 10 passed, 32 failed, 20 skipped.

Failed tests:

  • Get Product Account
  • Product Signer
  • Request Login
  • Get User Identity
  • Derive Entropy
  • StatementStore Allowance
  • Bulletin Allowance
  • Smart-Contract Allowance
  • String Write & Read
  • Bytes Write & Read
  • JSON Write & Read
  • Factory
  • Feature Check
  • Remote: HTTP/WS
  • Remote: WebRTC
  • Remote: Chain Submit
  • Remote: Preimage Submit
  • Remote: Statement Submit
  • As a product user, I can create an authorized statement proof
  • As a product user, I can submit a statement
  • Chain Spec: Genesis Hash
  • Chain Spec: Chain Name
  • Chain Spec: Properties
  • Query Balance
  • Query Stored Value
  • Query Data Length
  • Query Balance
  • Query Total Deposits
  • Factory
  • Submit
  • As a product user, I can allow and receive a push notification
  • Sign Raw Message

Logs: https://github.com/paritytech/dotli-community/actions/runs/35036355258
Artifacts: e2e-product-results (uploaded above) — open the failed test's trace.zip with npx playwright show-trace.

@replghost replghost added the deploy: paseo.fyi Deploy this pull request to paseo.fyi label Sep 17, 2026
@replghost replghost removed the deploy: paseo.fyi Deploy this pull request to paseo.fyi label Sep 17, 2026
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.

3 participants