Skip to main content

apply_event_to_domain

Function apply_event_to_domain 

Source
pub(crate) fn apply_event_to_domain(
    domain: &mut DomainSession,
    event: &AgentEvent,
) -> Moved
Expand description

Apply an AgentEvent to a DomainSession. Pure mutation; no I/O, no async, no sends. Called from inside SessionTask::translate_event under the domain’s lock.

Workspace owns the routing metadata every dispatch needs (session_id) plus the facts a view reads through the view surface. Operational state a view renders from the update stream itself (lifecycle, cwd, account info) stays on the view.

The answer is what the caller announces, so it is the sets as they stand AFTER the fold rather than an opinion about the event.