class

Phosphor::ParagraphWidget

Inherits Phosphor::Widget < Reference < Object

Renders a single selected todo item as a one-line text cell.

Stub implementation used by DetailScreen to validate the Screen contract with a second screen. No MockWidget wrapper — the goal is proving the abstraction generalises, not building a polished paragraph component.

Constructors

new(app : App(S, M))
Source

Instance methods

on_event(event : Event) : Msg | Nil

Maps Key::Escape to Msg::Back (leave the detail view) and Key::J to Msg::SelectNext (advance to the next todo without leaving), matching the "escape = back" convention used elsewhere in this codebase. Returns nil for any other event.

Source
render(frame : Frame, buf : Buffer) : Void

Writes the todo text into row 0 of frame, clipped to frame.width.

Source
sync(state : AppState) : Void

Reads the selected todo from state and stores the formatted line.

Source