UAT: Safety confirmation dialogs for destructive operations not implemented — TUI has no confirmation overlay #6354

Open
opened 2026-04-09 20:15:21 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area: TUI Implementation
Spec Reference: §TUI — Safety Behaviors (v3.7.0 deliverable #16)
Milestone: v3.7.0

Summary

The spec requires the TUI to show confirmation dialogs before executing destructive operations (delete, apply, force operations). No confirmation overlay or dialog exists in the TUI. Additionally, the spec's "double-tap quit" safety behaviour for ctrl+c is entirely absent.

Spec Requirements

Per §TUI — Safety Behaviors (v3.7.0 deliverable #16):

  • Destructive operations (delete, apply) must show a confirmation dialog before executing
  • Per the acceptance criteria: "Destructive operations (delete, apply) show confirmation dialog"

Per §TUI — Safety Behaviors — Double-Tap Quit:

  • ctrl+c should NOT immediately quit
    • First press when actor is processing: sends interrupt/cancel signal
    • First press when idle: shows flash message Press ctrl+c again within 5s to quit
    • Second press within 5s: quits (after saving session state)
    • Second press after 5s: resets — treated as a new first press
  • ctrl+q always quits immediately (correct)

Per §TUI — Safety Behaviors — Double-Tap Escape for Terminal:

  • When a terminal widget has focus, a single escape press requires double-tap within 400ms
  • First escape shows flash hint: Press escape again to exit terminal

What Was Found

Code location: /app/src/cleveragents/tui/app.py

  1. No confirmation dialog: No ConfirmDialog, SafetyDialog, ConfirmationOverlay, or equivalent widget exists anywhere under src/cleveragents/tui/. The screens/ directory is entirely empty. No Textual Screen push mechanism for dialogs is implemented.

  2. ctrl+c immediately quits: BINDINGS (line ~79) contains only:

    BINDINGS = [
        ("ctrl+q", "quit", "Quit"),
        ("f1", "help", "Help"),
        ("ctrl+t", "cycle_preset", "Cycle Preset"),
    ]
    

    ctrl+c is not bound to a custom handler. In Textual, the default ctrl+c behaviour is immediate application exit — no double-tap logic, no interrupt-actor-first behaviour, no "Press ctrl+c again" flash message.

  3. No actor interrupt mechanism: There is no action_interrupt() method, no A2A cancel operation, and no first-press-cancels-actor logic.

  4. on_input_submitted() in app.py (lines ~157–192) executes slash commands (including /persona:delete, /session:delete) and shell commands immediately with no confirmation step.

  5. No double-tap escape tracking: No _escape_press_time or similar state variable exists; no escape double-tap timer logic.

Expected Behaviour

  • When a destructive slash command (e.g. /persona:delete, /session:delete) is dispatched, a ConfirmationOverlay appears asking Are you sure? [y/N] before proceeding
  • ctrl+c when actor is processing sends an interrupt; when idle shows flash Press ctrl+c again within 5s to quit; second press within 5s quits
  • Double escape (within 400ms) required to exit terminal widget focus; flash hint Press escape again to exit terminal on first press

Actual Behaviour

  • No confirmation dialogs exist; destructive commands execute immediately
  • ctrl+c immediately quits the TUI without any double-tap protection or actor interrupt
  • No terminal focus escape double-tap logic

Steps to Reproduce

  1. Launch agents tui
  2. Type /session:delete default in prompt and press Enter — no confirmation requested (if the session command were implemented)
  3. Press ctrl+c during actor processing — TUI quits immediately

Impact

This is a v3.7.0 deliverable #16. Users can accidentally quit the TUI mid-operation with ctrl+c and destructive slash commands execute without confirmation. Both the confirmation dialog and the double-tap quit safety mechanisms are entirely absent.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area**: TUI Implementation **Spec Reference**: §TUI — Safety Behaviors (v3.7.0 deliverable #16) **Milestone**: v3.7.0 ### Summary The spec requires the TUI to show confirmation dialogs before executing destructive operations (delete, apply, force operations). No confirmation overlay or dialog exists in the TUI. Additionally, the spec's "double-tap quit" safety behaviour for `ctrl+c` is entirely absent. ### Spec Requirements Per §TUI — Safety Behaviors (v3.7.0 deliverable #16): - Destructive operations (delete, apply) must show a confirmation dialog before executing - Per the acceptance criteria: "Destructive operations (delete, apply) show confirmation dialog" Per §TUI — Safety Behaviors — Double-Tap Quit: - `ctrl+c` should NOT immediately quit - First press when actor is processing: sends interrupt/cancel signal - First press when idle: shows flash message `Press ctrl+c again within 5s to quit` - Second press within 5s: quits (after saving session state) - Second press after 5s: resets — treated as a new first press - `ctrl+q` always quits immediately (correct) Per §TUI — Safety Behaviors — Double-Tap Escape for Terminal: - When a terminal widget has focus, a single `escape` press requires double-tap within 400ms - First escape shows flash hint: `Press escape again to exit terminal` ### What Was Found **Code location**: `/app/src/cleveragents/tui/app.py` 1. **No confirmation dialog**: No `ConfirmDialog`, `SafetyDialog`, `ConfirmationOverlay`, or equivalent widget exists anywhere under `src/cleveragents/tui/`. The `screens/` directory is entirely empty. No Textual `Screen` push mechanism for dialogs is implemented. 2. **`ctrl+c` immediately quits**: `BINDINGS` (line ~79) contains only: ```python BINDINGS = [ ("ctrl+q", "quit", "Quit"), ("f1", "help", "Help"), ("ctrl+t", "cycle_preset", "Cycle Preset"), ] ``` `ctrl+c` is not bound to a custom handler. In Textual, the default `ctrl+c` behaviour is immediate application exit — no double-tap logic, no interrupt-actor-first behaviour, no "Press ctrl+c again" flash message. 3. **No actor interrupt mechanism**: There is no `action_interrupt()` method, no A2A cancel operation, and no first-press-cancels-actor logic. 4. **`on_input_submitted()` in app.py** (lines ~157–192) executes slash commands (including `/persona:delete`, `/session:delete`) and shell commands immediately with no confirmation step. 5. **No double-tap escape tracking**: No `_escape_press_time` or similar state variable exists; no escape double-tap timer logic. ### Expected Behaviour - When a destructive slash command (e.g. `/persona:delete`, `/session:delete`) is dispatched, a `ConfirmationOverlay` appears asking `Are you sure? [y/N]` before proceeding - `ctrl+c` when actor is processing sends an interrupt; when idle shows flash `Press ctrl+c again within 5s to quit`; second press within 5s quits - Double `escape` (within 400ms) required to exit terminal widget focus; flash hint `Press escape again to exit terminal` on first press ### Actual Behaviour - No confirmation dialogs exist; destructive commands execute immediately - `ctrl+c` immediately quits the TUI without any double-tap protection or actor interrupt - No terminal focus escape double-tap logic ### Steps to Reproduce 1. Launch `agents tui` 2. Type `/session:delete default` in prompt and press Enter — no confirmation requested (if the session command were implemented) 3. Press `ctrl+c` during actor processing — TUI quits immediately ### Impact This is a **v3.7.0 deliverable #16**. Users can accidentally quit the TUI mid-operation with `ctrl+c` and destructive slash commands execute without confirmation. Both the confirmation dialog and the double-tap quit safety mechanisms are entirely absent. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 21:09:28 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#6354
No description provided.