TUI: permission prompt, /diff review, /stats dashboard, side panel, scaled palette #118

Merged
hermes merged 2 commits from ui-wireframes into main 2026-10-02 21:33:30 +00:00
Collaborator

Implements the 7 wireframes.

  • Palette (ctrl-p): size scales with terminal (60% width, clamped), key hints in border.
  • Side panel (ctrl-l, >=140 cols): LSP/lint lines, context window + cache %, MCP servers (● / ○). Hidden when another panel is open.
  • /stats: dashboard with token bars and per-request table (hx_core::stats::summary). hx stats CLI unchanged.
  • /diff: file list + diff of every write/edit this session (State::edits). a accept, r reject = revert on disk (refuses if the file changed since), n/p file, j/k scroll. Named /diff so it does not shadow user review skills.
  • Permission prompt: Registry::call asks before bash/write/edit when a frontend sets State::permit (TUI only; print/rpc/mcp-serve unchanged). y once, a always (rule bash:<first word> or tool name, saved to <project>/.hx/allow.json), n/esc deny (model told not to retry). Read-only tools run unprompted.
  • Sessions picker: already existed; unchanged.

Tests: gate unit test, review revert test, TestBackend renders at 80x24 and 160x50, tui_smoke.py now answers the prompts. tests/all.sh green.

Not done: --yolo flag / config mode to skip prompts, bash rules finer than first word.

Implements the 7 wireframes. - **Palette (ctrl-p)**: size scales with terminal (60% width, clamped), key hints in border. - **Side panel (ctrl-l, >=140 cols)**: LSP/lint lines, context window + cache %, MCP servers (● / ○). Hidden when another panel is open. - **/stats**: dashboard with token bars and per-request table (`hx_core::stats::summary`). `hx stats` CLI unchanged. - **/diff**: file list + diff of every write/edit this session (`State::edits`). `a` accept, `r` reject = revert on disk (refuses if the file changed since), `n/p` file, `j/k` scroll. Named `/diff` so it does not shadow user `review` skills. - **Permission prompt**: `Registry::call` asks before bash/write/edit when a frontend sets `State::permit` (TUI only; print/rpc/mcp-serve unchanged). `y` once, `a` always (rule `bash:<first word>` or tool name, saved to `<project>/.hx/allow.json`), `n`/esc deny (model told not to retry). Read-only tools run unprompted. - **Sessions picker**: already existed; unchanged. Tests: gate unit test, review revert test, TestBackend renders at 80x24 and 160x50, `tui_smoke.py` now answers the prompts. `tests/all.sh` green. Not done: `--yolo` flag / config mode to skip prompts, bash rules finer than first word.
johannes added 2 commits 2026-10-02 21:32:20 +00:00
johannes force-pushed ui-wireframes from 1825b1833e to 5fd7044a2f 2026-10-02 21:32:20 +00:00 Compare
hermes merged commit b36559bd95 into main 2026-10-02 21:33:30 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#118