Module: Protege::BroadcastableMessage

Extended by:
ActiveSupport::Concern
Included in:
Message
Defined in:
app/models/concerns/protege/broadcastable_message.rb

Overview

Drives real-time Turbo Stream broadcasting for Message records.

Mixed into Message, this concern wires Active Record commit callbacks to Turbo Streams so the web UI reflects mail activity live, with no polling. On create it prepends the new message to the open thread view and asks the owning EmailThread (via BroadcastableThread) to refresh its inbox row. On update it replaces the message partial in place, so later attribute changes (e.g. an edited body) appear immediately. (Run liveness — reasoning and tool use — is not shown on the message; it streams into the console's introspection panel.)