Skip to main content

Module modal

Module modal 

Source
Expand description

Modal stack (Goal 146).

A modal is a transient overlay drawn on top of the chat screen. crate::tui::app::App owns a Vec<Modal>; the topmost element (the “active” modal) is rendered centred over a half-screen window and consumes all key events until popped.

Modals never mutate runtime state directly — they are pure read-only views over App. Side-effects (clear / exit / compact) are routed through the command system in [crate::commands] and the input dispatcher in crate::tui::app::App.

Structs§

JournalEntry
A simple read-only journal entry: filename + its first 30 lines.
McpEntry
One entry in the Modal::McpServers list.
ResumeEntry
One entry in the Modal::ResumePicker list.

Enums§

ConfirmAction
A confirmation request awaiting y/n.
Modal
All modal flavours the TUI knows how to render.

Functions§

load_journal_from
Pure helper: read journal entries from dir. Exposed so tests can point at a tempdir.
load_recent_journal_entries
Read up to max_entries .md files from .dev/journal/, sorted by modification time descending. Each entry’s preview is the first 30 lines.
load_recent_sessions
Load up to limit recent sessions from workspace, sorted by updated_at descending. Silently skips dirs with missing/corrupt metadata.
render
Render the topmost modal centred on the frame area.
render_plan_review
Goal-147: render the body of a Modal::PlanReview.