MingaEditor.TabWorkflow (Minga v0.1.0)

Copy Markdown View Source

External and presentation workflow around pure root tab transitions.

Registry validation, remote event replay, agent session snapshots, transcript reads, spinner timers, and modal presentation stay here. MingaEditor.State installs only the atomic immutable tab transition.

Summary

Functions

Runs the presentation and persistence effects for an accepted staged switch.

Restores a context and synchronizes its workspace-backed agent presentation.

Stages the pure root transition for an already validated tab target.

Returns the effect-free state produced by a staged tab switch.

Switches tabs and performs the external work requested by the pure transition result.

Transfers the active workspace agent presentation and replays pending foreground catch-up events.

Types

staged_switch()

@opaque staged_switch()

Functions

commit_staged_switch(arg, accepted_state)

@spec commit_staged_switch(staged_switch(), MingaEditor.State.t()) ::
  MingaEditor.State.t()

Runs the presentation and persistence effects for an accepted staged switch.

restore_context(state, context)

Restores a context and synchronizes its workspace-backed agent presentation.

stage_switch(state, target_id)

Stages the pure root transition for an already validated tab target.

staged_state(arg)

@spec staged_state(staged_switch()) :: MingaEditor.State.t()

Returns the effect-free state produced by a staged tab switch.

switch(state, target_id)

Switches tabs and performs the external work requested by the pure transition result.

sync_active_workspace_agent_ui(state)

@spec sync_active_workspace_agent_ui(MingaEditor.State.t()) :: MingaEditor.State.t()

Transfers the active workspace agent presentation and replays pending foreground catch-up events.