hermes-agent/tests/tui_gateway
kyssta-exe 1699525638 fix(tui): route pending-input commands via command.dispatch (#48848)
When /goal (and other _PENDING_INPUT_COMMANDS: retry, queue, q, steer,
plan, undo) were typed in the TUI desktop app, slash.exec returned error
4018 instructing the frontend to fall back to command.dispatch. Some
clients failed that client-side fallback, leaving the command empty and
surfacing "empty command" — the user's typed text was silently dropped.

slash.exec now routes pending-input commands to command.dispatch
internally, eliminating the fragile client-side fallback hop. The
response is exactly what command.dispatch would have produced, so the
TUI client behaves identically once the round-trip succeeds.

Salvaged from #48944 — rebased onto current main. The original PR's
source change and test_goal_command.py update are correct, but it missed
the second test surface: tests/tui_gateway/test_protocol.py's
parametrized test_slash_exec_rejects_pending_input_commands still
asserted the old 4018 rejection for retry/queue/q/steer/plan, turning CI
red (5 failures). That test is rewritten here as a behavior contract:
slash.exec for a pending-input command must yield the same payload as a
direct command.dispatch call, and must no longer emit the old
"pending-input command" fallback rejection.

Co-authored-by: kyssta-exe <kyssta-exe@users.noreply.github.com>
2026-06-19 14:53:33 +05:30
..
__init__.py feat: add tests and update mds 2026-04-08 19:31:25 -05:00
test_billing_rpc.py feat(billing): /billing terminal billing — interactive TUI + CLI client (#45449) 2026-06-19 01:53:32 +05:30
test_compaction_status.py fix(desktop): show summarizing indicator during auto-compaction 2026-06-14 02:28:07 -05:00
test_custom_provider_session_persistence.py fix(desktop): never persist or restore a named custom provider as bare "custom" (#48547) 2026-06-18 11:11:51 -07:00
test_entry_sys_path.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_goal_command.py fix(tui): route pending-input commands via command.dispatch (#48848) 2026-06-19 14:53:33 +05:30
test_make_agent_provider.py fix(tui): honor provider_routing config in the desktop/TUI backend (#44953) 2026-06-13 02:58:15 -05:00
test_protocol.py fix(tui): route pending-input commands via command.dispatch (#48848) 2026-06-19 14:53:33 +05:30
test_render.py feat: add tests and update mds 2026-04-08 19:31:25 -05:00
test_review_summary_callback.py fix(desktop,tui): surface self-improvement review summary + honor memory_notifications 2026-06-18 13:22:12 -05:00
test_subagent_child_mirror.py feat(desktop): stream subagent activity into watch windows (#47060) 2026-06-16 14:30:11 -04:00
test_undo_command.py feat(undo): /undo [N] backs up N user turns with prefill + soft-delete 2026-06-01 01:22:38 -07:00
test_wait_for_mcp_discovery.py perf(tui): stop slow/dead MCP servers from freezing TUI startup 2026-05-30 02:53:37 -07:00