Commit Graph
8 Commits
  • perf(wasm): transfer delivery bytes without JSON expansion
    Return FileDelivery and WatchDelivery effects in their existing order with owned Uint8Array payloads. Serialize only metadata through the original JSON path, retaining its integer semantics. Switch all attachment and watch consumers together, including failures and projection; no Cargo dependency or wire-format change.
    
    Validation: matched release-WASM controls measured 64 KiB Watch at 2.60 to 1.13 ms and 1 MiB File at 27.73 to 3.90 ms median local CPU. Actual Chrome production consumers verified OPFS/Watch hashes and a terminal outcome for a range beyond JS safe integers. The integrated 700 consumer tests and TypeScript passed. Compressed WASM grew 4146 bytes; no remote-throughput claim.
  • fix(delivery): release a runtime whose first projection fails
    Free the constructed WASM delivery before propagating an initial projection
    failure. Subsequent demand still uses the existing retry and lifetime owner.
    The regression fails without the release and passes alongside attachment tests.
  • fix(channel): retry a failed delivery runtime load on the next demand
    FileDelivery and WatchDelivery memoized the promise that loads the WASM
    runtime with `??=` and cleared it only on session reset. A rejected load
    therefore stayed cached for the whole session, and because the data paths
    swallow that rejection, file transfer and forwarded watch bytes stopped
    silently until the page reconnected.
    
    A failed load is not a runtime. Clear the cached promise when it rejects,
    checking that it is still the current one, so the next plan update, read
    or incoming message loads again. This is the rule initializeRuntime in
    room-host.ts already follows.
  • refactor(channel)!: separate connection and delivery lifetimes
    Build shared connections from authorized intent before preparing payloads. Select source paths independently for media, files and webpage bytes, retaining healthy leases through handoff and signaling recovery.
    
    Channel protocol 39 adds the required screen-helper intent projection. App control and persisted formats keep their existing identities.
  • fix(runtime): preserve resource ownership through cancellation
    Retain native pair cleanup through shutdown and cancel microphone acquisition when its last voice consumer leaves. Start webpage read-response deadlines after transmission and retire failed media setup.
    
    Share text-client shutdown completion, provide a small support-bot example, remove the unused input route and duplicate MF guard, and document safe Cargo cache handoff. Validated 413 focused Web tests, type checks, Windows capture compilation and six native lifecycle regressions.
  • feat(watch): forward original media over room peer paths
    Let sharers explicitly provide selected file and HLS resources through the existing reliable room routes. Keep direct viewing independent of peer demand, retain one playback authority, and cancel scoped reads when viewers, sources or routes retire. Domain/App private protocols advance to 20/11; stored room data is unchanged.