You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.2 KiB
Markdown
49 lines
1.2 KiB
Markdown
---
|
|
# claudbg-1e1c
|
|
title: 'TUI: quit confirmation dialog'
|
|
status: in-progress
|
|
type: task
|
|
priority: normal
|
|
created_at: 2026-03-30T04:47:46Z
|
|
updated_at: 2026-03-30T16:50:26Z
|
|
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)
|