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))
SourceInstance 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.
render(frame : Frame, buf : Buffer) : Void
Writes the todo text into row 0 of frame, clipped to frame.width.
sync(state : AppState) : Void
Reads the selected todo from state and stores the formatted line.