Skip to content

JS-host chat is outbound-only: no inbound action path on wasm #422

Description

@filvecchiato

Follow-up to #383, raised in review of #400.

A JS host that serves the chat capability can create rooms, post messages and serve the room list, but cannot deliver an incoming message to a product.

ChatConnection::publish_action is #[cfg(any(test, not(target_arch = "wasm32")))] (runtime/chat.rs:63) and its only non-test caller is NativeProductExecution::publish_chat_action (native.rs:796), inside the native module, which is itself #[cfg(not(target_arch = "wasm32"))] (lib.rs:40). So nothing in a wasm build can publish a chat action.

The product-visible effect: Chat/action_subscribe returns a subscription that yields nothing and never ends, which a product cannot distinguish from a quiet room. Custom-message rendering is native-only for the same reason.

Serving chat products from Polkadot Desktop needs an inbound path — a way for a JS host to publish actions into the product's connection, and a wasm-reachable renderer path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions