# `MingaEditor.Shell.Traditional.ModalWorkflow`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/shell/traditional/modal_workflow.ex#L1)

Editor-state workflow around the pure `ModalOverlay` value owner.

# `close`

```elixir
@spec close(MingaEditor.State.t()) :: MingaEditor.State.t()
```

Closes a completed modal.

# `command_completion`

```elixir
@spec command_completion(MingaEditor.State.t() | MingaEditor.RenderPipeline.Input.t()) ::
  MingaEditor.State.ModalOverlay.CommandCompletion.t() | nil
```

Returns the active command-completion payload.

# `completion`

```elixir
@spec completion(MingaEditor.State.t() | MingaEditor.RenderPipeline.Input.t()) ::
  Minga.Editing.Completion.t() | nil
```

Returns the active inner completion value.

# `completion_trigger`

```elixir
@spec completion_trigger(MingaEditor.State.t() | MingaEditor.RenderPipeline.Input.t()) ::
  MingaEditor.CompletionTrigger.t()
```

Returns the active completion trigger or a fresh trigger.

# `dismiss`

```elixir
@spec dismiss(MingaEditor.State.t()) :: MingaEditor.State.t()
```

Dismisses a canceled modal and cancels only its local completion timers.

# `dismiss_if_stale`

```elixir
@spec dismiss_if_stale(MingaEditor.State.t()) :: MingaEditor.State.t()
```

Dismisses completion owned by a different active tab.

# `open`

```elixir
@spec open(MingaEditor.State.t(), MingaEditor.State.ModalOverlay.active()) ::
  MingaEditor.State.t()
```

Opens an exact modal value, preserving conflict stickiness and suppressing lower transients.

# `put_completion_trigger`

```elixir
@spec put_completion_trigger(MingaEditor.State.t(), MingaEditor.CompletionTrigger.t()) ::
  MingaEditor.State.t()
```

Records completion-trigger lifecycle with current tab context.

# `transition`

```elixir
@spec transition(MingaEditor.State.t(), MingaEditor.State.ModalOverlay.active()) ::
  MingaEditor.State.t()
```

Transitions to an exact modal value unconditionally and suppresses lower transients.

# `update_completion`

```elixir
@spec update_completion(MingaEditor.State.t(), (Minga.Editing.Completion.t() -&gt;
                                            Minga.Editing.Completion.t())) ::
  MingaEditor.State.t()
```

Updates the active completion value.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
