UAT: TUI $ prefix does not activate shell mode — spec requires both ! and $ as shell mode triggers #5057

Open
opened 2026-04-09 00:52:10 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: TUI — Shell Mode

Severity: Medium (shell mode entry incomplete)

What Was Tested

Shell mode activation as defined in the specification (§ Shell Mode (!), §Hotkey Reference — MainScreen Prompt Focused).

Expected Behavior (from spec)

From the spec's hotkey reference (§ MainScreen — Prompt Focused):

! or $ (at position 0) — Activate shell mode

From the spec's input mode table:

| ! | Shell | $ | Host OS subprocess | — |

Both ! and $ should activate shell mode when typed at position 0 of the prompt. The prompt symbol changes to $.

Additionally, backspace at position 0 in shell mode should deactivate shell mode and return to normal mode.

Actual Behavior (from code analysis)

The InputModeRouter.detect_mode() in src/cleveragents/tui/input/modes.py (lines 50-56):

@staticmethod
def detect_mode(text: str) -> InputMode:
    stripped = text.lstrip()
    if stripped.startswith("/"):
        return InputMode.COMMAND
    if stripped.startswith("!"):
        return InputMode.SHELL
    return InputMode.NORMAL

Only ! is checked as a shell mode trigger. $ is not checked. Typing $git status will be treated as a normal message sent to the actor, not as a shell command.

Additionally, backspace deactivation of shell mode is not implemented (the prompt widget doesn't handle this).

Steps to Reproduce

  1. Run agents tui
  2. Type $git status and press Enter
  3. Observe: treated as normal message to actor, not executed as shell command
  4. Type !git status and press Enter
  5. Observe: correctly executed as shell command

Code Location

  • src/cleveragents/tui/input/modes.py lines 50-56 (detect_mode() — missing $ check)

Impact

Users who habitually use $ as a shell prefix (common in documentation and tutorials) will have their commands sent to the actor instead of the shell. This is a usability regression from the spec.


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

## Bug Report **Feature Area:** TUI — Shell Mode **Severity:** Medium (shell mode entry incomplete) ### What Was Tested Shell mode activation as defined in the specification (§ Shell Mode (!), §Hotkey Reference — MainScreen Prompt Focused). ### Expected Behavior (from spec) From the spec's hotkey reference (§ MainScreen — Prompt Focused): > `!` or `$` (at position 0) — Activate shell mode From the spec's input mode table: > | `!` | Shell | `$` | Host OS subprocess | — | Both `!` and `$` should activate shell mode when typed at position 0 of the prompt. The prompt symbol changes to `$`. Additionally, `backspace` at position 0 in shell mode should deactivate shell mode and return to normal mode. ### Actual Behavior (from code analysis) The `InputModeRouter.detect_mode()` in `src/cleveragents/tui/input/modes.py` (lines 50-56): ```python @staticmethod def detect_mode(text: str) -> InputMode: stripped = text.lstrip() if stripped.startswith("/"): return InputMode.COMMAND if stripped.startswith("!"): return InputMode.SHELL return InputMode.NORMAL ``` Only `!` is checked as a shell mode trigger. `$` is not checked. Typing `$git status` will be treated as a normal message sent to the actor, not as a shell command. Additionally, `backspace` deactivation of shell mode is not implemented (the prompt widget doesn't handle this). ### Steps to Reproduce 1. Run `agents tui` 2. Type `$git status` and press Enter 3. Observe: treated as normal message to actor, not executed as shell command 4. Type `!git status` and press Enter 5. Observe: correctly executed as shell command ### Code Location - `src/cleveragents/tui/input/modes.py` lines 50-56 (`detect_mode()` — missing `$` check) ### Impact Users who habitually use `$` as a shell prefix (common in documentation and tutorials) will have their commands sent to the actor instead of the shell. This is a usability regression from the spec. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.7.0 milestone 2026-04-09 01:02:22 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — TUI spec compliance bug; deviates from documented TUI behavior
  • Milestone: v3.7.0 (TUI milestone)
  • Story Points: 3 — M
  • MoSCoW: Must Have — TUI spec compliance is required for the TUI Legendary
  • Parent Epic: #4963 or #4966 (TUI Epics)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — TUI spec compliance bug; deviates from documented TUI behavior - **Milestone**: v3.7.0 (TUI milestone) - **Story Points**: 3 — M - **MoSCoW**: Must Have — TUI spec compliance is required for the TUI Legendary - **Parent Epic**: #4963 or #4966 (TUI Epics) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: 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.

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