Skip to content

web-client: the command outcome descriptor cannot carry a minted invite link or an accepted share #1349

Description

@FSM1

What

CommandOutcomeDescriptor in packages/client/src/worker/protocol.ts carries done, queued and contactImported only. Two engine outcomes have no descriptor, so readOutcome in packages/client/src/worker/engineHost.ts refuses them with its unknown-kind error:

Both cross the WASM boundary correctly (crates/wasm/src/lib.rs has the getters, and crates/wasm/src/host.rs covers the round-trip); it is only the TypeScript wrapper that cannot carry them. A web host can therefore issue createInviteLink and acceptShare but never read what they returned.

Acceptance

  • CommandOutcomeDescriptor gains both variants, carrying the getters the wasm surface exposes: the invite secret, owner contact code, scope root name and bearer-write flag; and the accepted share's scope id, sequence, permission and newly-added flag.
  • readOutcome maps both, using the same present() discipline the existing arms use so a getter the kind promises but does not answer is a refusal, not undefined.
  • The unknown-kind refusal keeps its test — an outcome a future engine adds must still fail closed rather than resolve with a partial descriptor.
  • packages/client's existing vitest suite covers both new arms.

Part of #635

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp:webpackages/client + apps/web — WASM host, browser seams, React UIv2-buildv2 rewrite build slice

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions