LightningWeb.WorkflowChannel (Lightning v2.15.0-pre5)

View Source

Phoenix Channel for handling binary Yjs collaboration messages.

Unlike LiveView events, Phoenix Channels properly support binary data transmission without JSON serialization.

Summary

Functions

Handles explicit workflow save requests from the collaborative editor.

Functions

child_spec(init_arg)

handle_in(binary, params, socket)

Handles explicit workflow save requests from the collaborative editor.

The save operation:

  1. Asks Session to extract and save the current Y.Doc state
  2. Session handles all Y.Doc interaction internally
  3. Returns success/error to the client

Note: By the time this message is processed, all prior Y.js sync messages have been processed due to Phoenix Channel's synchronous per-socket handling.

Success response: {:ok, %{saved_at: DateTime, lock_version: integer}} Error response: {:error, %{errors: map, type: string}}

start_link(triplet)