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.
claudbg/.beans/claudbg-1e1c--tui-quit-conf...

1.2 KiB

title status type priority created_at updated_at parent blocked_by
TUI: quit confirmation dialog todo task normal 2026-03-30T04:47:46Z 2026-03-30T04:49:03Z claudbg-i6l2
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/Qshow_quit_dialog = true
  • While dialog is shown: qshould_quit = true (exit loop), Escapeshow_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)