LightningWeb.WorkflowChannel (Lightning v2.15.0-pre5)
View SourcePhoenix 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
Handles explicit workflow save requests from the collaborative editor.
The save operation:
- Asks Session to extract and save the current Y.Doc state
- Session handles all Y.Doc interaction internally
- 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}}