fix(cli): wire command:result + system:reload socket events in TUI #187

Merged
jason.woltje merged 5 commits from fix/tui-command-result-socket into main 2026-03-16 13:21:12 +00:00
Owner

Problem

Gateway slash command responses were silently dropped. listened for but had no handlers for or — both events emitted by the gateway after command execution.

Fix

Added two socket event handlers:

  • → renders the success/error message as a system message in the TUI
  • → updates the command registry manifest and shows the reload message

Also

Removes stray devDependency from — it was never imported and snuck in from a prior agent session.

Test

  • Restart gateway, connect TUI, type or — should now show a response instead of silently doing nothing
  • should show the reload message and update the command list
## Problem Gateway slash command responses were silently dropped. listened for but had no handlers for or — both events emitted by the gateway after command execution. ## Fix Added two socket event handlers: - → renders the success/error message as a system message in the TUI - → updates the command registry manifest and shows the reload message ## Also Removes stray devDependency from — it was never imported and snuck in from a prior agent session. ## Test - Restart gateway, connect TUI, type or — should now show a response instead of silently doing nothing - should show the reload message and update the command list
jason.woltje added 1 commit 2026-03-16 13:03:25 +00:00
fix(cli): wire command:result + system:reload socket events in TUI
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
31aea56345
Gateway slash command responses were silently dropped — use-socket.ts
had no handlers for command:result or system:reload. Added both:
- command:result → renders success/error as a system message
- system:reload → updates command registry manifest + shows reload message

Also removes stray @testing-library/react devDependency that was
never used in the CLI package.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje added 1 commit 2026-03-16 13:07:13 +00:00
fix(cli): slash command UX — ignore bare /, fix gateway connection check
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed
193d171acb
- Submitting bare "/" no longer shows "Unknown command format: /" — input
  is ignored silently so autocomplete can guide discovery instead
- Gateway command handler no longer requires a conversationId before
  emitting — the socket connection check alone is sufficient; missing
  conversationId caused false "Not connected" errors on fresh sessions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje added 1 commit 2026-03-16 13:09:16 +00:00
fix(cli): auto-create conversation on TUI start when no -c flag given
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
1214a4cce7
Without --conversation/-c, the TUI was starting with no conversationId,
leaving the session bar showing "No session" and gateway commands
unable to dispatch. Now creates a new conversation via REST before
rendering so the socket is immediately attached to an active session.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje added 1 commit 2026-03-16 13:13:02 +00:00
fix(cli): Ctrl+C clears input, second Ctrl+C exits TUI
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
931ae76df1
InputBar is now a controlled component — input state lives in app.tsx.
Ctrl+C when input has text clears it; Ctrl+C with empty input exits,
giving the standard two-press-to-quit behaviour expected in TUIs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje added 1 commit 2026-03-16 13:17:14 +00:00
fix(cli): sidebar 'd' delete, /new command, Ctrl+C double-press exit
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
70f894f148
- InputBar is now focus-gated: when mode != 'chat', TextInput focus=false
  and useInput isActive=false — sidebar 'd' key no longer leaks into input
- /new added as a local command (execution:'local') so it creates a
  new conversation and switches to it, same as Ctrl+N; alias 'n' moved
  from ALIASES map into the CommandDef
- Ctrl+C behaviour: clear input → show hint → second empty press exits
  (resets if any other key is pressed between the two Ctrl+Cs)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje merged commit f0476cae92 into main 2026-03-16 13:21:12 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#187