Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 28 Jul 20:58
· 27 commits to main since this release
c3206b6

Minor Changes

  • 986645a: Add process-aware reconnect support that keeps client roots, signals, and reflected model facades alive across transport replacement, refreshes them from the next root snapshot, refreshes active held model facades that are not reachable from the reconnect root, lazily refreshes stale held facades when they become watched after a process change, replays active signal subscriptions, treats missing connection metadata as an unknown process for legacy servers, and exposes server connection metadata for process identity and retained-state resumes.

  • 10ab82e: Reflect client models with Proxy facades by default.

    Clients no longer have to register every server model type with
    createReflectedModel(signalProps, methods). The @M payload already includes
    the model wire id plus the serialized signal properties for that instance, so
    RPCClient now creates a cached Proxy facade automatically when no custom
    constructor is registered. Signal properties are discovered from the payload and
    exposed as computed read-only signals, while unknown method properties become
    stable lazy RPC call functions that reject with the server's method-not-found
    error if the method does not exist.

    createReflectedModel() and registerModel() remain available for custom or
    legacy facades, but model registration is no longer required for safe root model
    rollouts.

Patch Changes

  • e547760: Fix signal watch batching by consolidating to a single global debounce window.

    ClientReflection now uses one shared static timer for watch/unwatch flushes
    across all instances, instead of two per-instance timers. Watch and unwatch
    batches are flushed together by flushWatches(), and scheduleWatch/
    scheduleUnwatch each remove the signal id from the opposite pending batch,
    fixing a latent race where the same id could be flushed as both a watch and an
    unwatch in the same tick. A new watchedSignals set tracks which signals are
    actually subscribed so redundant watch/unwatch RPC messages are no longer sent,
    and the per-signal debounce timer in getOrCreateSignal() has been removed in
    favour of the global 10ms flush window.

  • 97f8c2b: Store client reflection signals and reflected model facades behind weak cache references so unwatched, otherwise-unheld client-side identities can be garbage collected without losing identity preservation for objects still held by application code.