Skip to content

fix(wasm): unlock before listening for topics - #953

Closed
HaoboGu wants to merge 1 commit into
feat/rynk_protocolfrom
agent/pr848-wasm-unlock-topics
Closed

fix(wasm): unlock before listening for topics#953
HaoboGu wants to merge 1 commit into
feat/rynk_protocolfrom
agent/pr848-wasm-unlock-topics

Conversation

@HaoboGu

@HaoboGu HaoboGu commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

What

Delay the demo's topic listener until the unlock ceremony has completed. Already-unlocked and permanently locked devices still start the listener immediately.

Why

On a normally locked device, the demo started next_event() and then exposed the unlock button. The pending wasm-bindgen call keeps a mutable borrow of the Rust client, so clicking Unlock re-enters the same object and traps with recursive use of an object detected.

Root cause

The same WasmClient was used concurrently by the indefinitely pending topic pump and the unlock request sequence.

Impact

This only changes demo sequencing. Protocol and firmware behavior are unchanged.

Checks

  • Reproduced the pre-fix trap with the generated wasm-bindgen package and a locked-device transport.
  • Extracted module passes node --input-type=module --check.

Built on #848.

@HaoboGu HaoboGu closed this Jul 15, 2026
@HaoboGu
HaoboGu deleted the agent/pr848-wasm-unlock-topics branch July 16, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant