--- # claudbg-1e1c title: 'TUI: quit confirmation dialog' status: completed type: task priority: normal created_at: 2026-03-30T04:47:46Z updated_at: 2026-03-30T16:53:43Z parent: claudbg-i6l2 blocked_by: - claudbg-ut9q --- Implement a modal quit confirmation dialog. ## Trigger Press `q` or `Q` from any screen (except when another modal is open). ## Appearance ``` ┌──────────────────────┐ │ Quit claudbg? │ │ │ │ q = yes Esc = no │ └──────────────────────┘ ``` Centered overlay on top of the current screen (using `ratatui::widgets::Clear` to clear the background area). ## State `AppState.show_quit_dialog: bool` - `q`/`Q` → `show_quit_dialog = true` - While dialog is shown: `q` → `should_quit = true` (exit loop), `Escape` → `show_quit_dialog = false` - Dialog intercepts all other key input while open. ## Implementation notes - Use `ratatui::layout::Rect` centered calculation to position the dialog. - Render with `Block::bordered().title("Quit?")` and a `Paragraph` inside. - Use `Clear` widget behind the dialog block to prevent bleed-through. ## Blocked by - event loop (claudbg-ut9q) ## Summary of Changes\n\nCreated src/tui/modals/quit_dialog.rs with render_quit_dialog() (26×5 centered overlay) and handle_quit_dialog_event() (q/Q→quit, Esc→dismiss). Updated session_list.rs q handler to set show_quit_dialog=true. Wired into run.rs. 147 tests pass.