UAT: TUI Safety Behaviors partially missing — confirmation dialogs for destructive operations and read-only mode not implemented; sandbox indicators absent #3027

Open
opened 2026-04-05 04:05:50 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: feat/tui-safety-behaviors
  • Commit Message: feat(tui): implement confirmation dialogs, read-only mode, and sandbox indicators
  • Milestone: v3.7.0
  • Parent Epic: #868

Description

The spec defines three safety behaviors for the TUI that are currently unimplemented:

  1. Confirmation Dialogs: All destructive operations (e.g., deleting a project, canceling a plan) require user confirmation before proceeding.
  2. Read-Only Mode: The TUI can be launched in a read-only mode that prevents any modifications to projects, plans, or resources.
  3. Sandbox Indicators: The UI clearly indicates when a plan is running in a sandbox, so the user is aware that no real files are being modified.

Current Behavior

  1. Confirmation Dialogs: No confirmation dialog widget exists in the TUI. The slash catalog lists destructive operations (e.g., session:delete, plan:cancel, project:delete) but none of these are implemented in the command router, and there is no confirmation dialog mechanism.
  2. Read-Only Mode: No --read-only flag exists for the agents tui command. No read-only mode is implemented anywhere in the TUI.
  3. Sandbox Indicators: No sandbox indicator widget or visual indicator exists in the TUI. The PersonaBar widget shows persona/actor/preset/scope information but no sandbox status.

Note

: The ShellSafetyService and DangerousPatternDetector exist for shell command safety, but these are separate from the spec-required safety behaviors listed above.

Expected Behavior (per spec)

  1. Destructive operations should show a confirmation dialog before proceeding.
  2. agents tui --read-only should launch the TUI in a mode that prevents modifications.
  3. When a plan is running in a sandbox, a visual indicator should be shown in the UI.

Code Locations

  • src/cleveragents/tui/ — no confirmation dialog widget exists
  • src/cleveragents/tui/commands.py — no destructive operations implemented (no confirmation possible)
  • src/cleveragents/tui/widgets/persona_bar.py — no sandbox indicator
  • src/cleveragents/cli/ — no --read-only flag for agents tui command

Subtasks

  • Create src/cleveragents/tui/widgets/confirmation_dialog.py with ConfirmationDialog class
  • Integrate confirmation dialogs into all destructive slash commands (session:delete, plan:cancel, project:delete, persona:delete)
  • Add --read-only flag to agents tui CLI command
  • Implement read-only mode enforcement in the TUI app (disable all write operations)
  • Add sandbox indicator to the PersonaBar or status bar when a plan is in sandbox mode
  • Write BDD scenarios in features/tui_safety_behaviors.feature

Definition of Done

  • Confirmation dialogs appear for all destructive operations
  • agents tui --read-only launches TUI in read-only mode
  • Sandbox indicator is visible when a plan runs in sandbox mode
  • BDD scenarios cover all three safety behaviors
  • nox -e typecheck passes
  • nox -e unit_tests passes
  • All nox stages pass
  • Coverage >= 97%

This issue was filed by the UAT Testing agent (ca-uat-tester) as part of automated acceptance testing.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `feat/tui-safety-behaviors` - **Commit Message**: `feat(tui): implement confirmation dialogs, read-only mode, and sandbox indicators` - **Milestone**: v3.7.0 - **Parent Epic**: #868 ## Description The spec defines three safety behaviors for the TUI that are currently unimplemented: 1. **Confirmation Dialogs**: All destructive operations (e.g., deleting a project, canceling a plan) require user confirmation before proceeding. 2. **Read-Only Mode**: The TUI can be launched in a read-only mode that prevents any modifications to projects, plans, or resources. 3. **Sandbox Indicators**: The UI clearly indicates when a plan is running in a sandbox, so the user is aware that no real files are being modified. ### Current Behavior 1. **Confirmation Dialogs**: No confirmation dialog widget exists in the TUI. The slash catalog lists destructive operations (e.g., `session:delete`, `plan:cancel`, `project:delete`) but none of these are implemented in the command router, and there is no confirmation dialog mechanism. 2. **Read-Only Mode**: No `--read-only` flag exists for the `agents tui` command. No read-only mode is implemented anywhere in the TUI. 3. **Sandbox Indicators**: No sandbox indicator widget or visual indicator exists in the TUI. The `PersonaBar` widget shows persona/actor/preset/scope information but no sandbox status. > **Note**: The `ShellSafetyService` and `DangerousPatternDetector` exist for shell command safety, but these are separate from the spec-required safety behaviors listed above. ### Expected Behavior (per spec) 1. Destructive operations should show a confirmation dialog before proceeding. 2. `agents tui --read-only` should launch the TUI in a mode that prevents modifications. 3. When a plan is running in a sandbox, a visual indicator should be shown in the UI. ### Code Locations - `src/cleveragents/tui/` — no confirmation dialog widget exists - `src/cleveragents/tui/commands.py` — no destructive operations implemented (no confirmation possible) - `src/cleveragents/tui/widgets/persona_bar.py` — no sandbox indicator - `src/cleveragents/cli/` — no `--read-only` flag for `agents tui` command ## Subtasks - [ ] Create `src/cleveragents/tui/widgets/confirmation_dialog.py` with `ConfirmationDialog` class - [ ] Integrate confirmation dialogs into all destructive slash commands (`session:delete`, `plan:cancel`, `project:delete`, `persona:delete`) - [ ] Add `--read-only` flag to `agents tui` CLI command - [ ] Implement read-only mode enforcement in the TUI app (disable all write operations) - [ ] Add sandbox indicator to the `PersonaBar` or status bar when a plan is in sandbox mode - [ ] Write BDD scenarios in `features/tui_safety_behaviors.feature` ## Definition of Done - [ ] Confirmation dialogs appear for all destructive operations - [ ] `agents tui --read-only` launches TUI in read-only mode - [ ] Sandbox indicator is visible when a plan runs in sandbox mode - [ ] BDD scenarios cover all three safety behaviors - [ ] `nox -e typecheck` passes - [ ] `nox -e unit_tests` passes - [ ] All nox stages pass - [ ] Coverage >= 97% --- This issue was filed by the UAT Testing agent (ca-uat-tester) as part of automated acceptance testing. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 04:06:28 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Confirmed
  • MoSCoW: Should Have

Valid finding verified during batch triage.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Confirmed - **MoSCoW**: Should Have Valid finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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.

Blocks
Reference
cleveragents/cleveragents-core#3027
No description provided.