Skip to content

feat(ui): show one-line tool rows, a compact home screen, and provider states - #48

Open
kacigaya wants to merge 1 commit into
mainfrom
feat/tui-redesign
Open

kacigaya wants to merge 1 commit into
mainfrom
feat/tui-redesign

Conversation

@kacigaya

@kacigaya kacigaya commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

This PR completes the TUI redesign that #47 started. It changes three screens.

Tool calls. Each call used to be a bare name(args) line with an absolute path, a blank line under it, and no result. Now each call is one row: a state mark, the tool, its arguments relative to the workspace, and a short result on the right.

  ● I will map the app routes first, then check how the login query is built.

    ✓ listDirectory app                                     3 entries
    ✓ grep execute\(                                          1 match
    ✓ readFile app/auth/login.py                             28 lines
    ✗ runCommand curl -s -X POST http://127.0.0.1:8080/login   denied
  • The agent sends a new ToolFinished { ok, summary } event after each call. tool_result_summary builds the result from the tool output, such as 12 entries, 3 matches, or exit 1. A command with a non-zero exit code shows as failed.
  • A row shows ◌ running until the call ends, then updates in place. A row still running when the turn ends shows stopped.
  • Consecutive rows have no blank lines between them. Long arguments are shortened so the result stays visible on the right.
  • Command rows drop the UNSANDBOXED shell command in .: prefix. The approval panel already shows that warning.

Home screen. The 11-row ghost and the 9-row title did not fit in a 24-row terminal. The new screen has a 5-row ghost, the version, the model, the workspace, and 4 start commands. The command descriptions come from the same list as /help.

Status line. It now starts with a state: ready, the running tool and its time, or waiting for you. Then come the model and the workspace. The key hints keep their full width. A long workspace path is shortened from the start, so its end stays visible.

Model selector. It used to show one provider at a time. It now lists all providers in a column next to the models. Each provider has a state from the last model check: green ready, red error, or not checked yet. The keys do not change.

No dependencies were added. The command docs describe the new status line, tool rows, and provider states.

Validation:

  • cargo fmt -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test: 215 tests passed, with new tests for result summaries, tool row state and grouping, relative paths, one-line fitting, the home screen, and path shortening
  • Real binary in a pseudo-terminal against a local mock Ollama server, at 100×30 and at 80×24: the home screen, /model, the approval panel, a denied command, and an approved command. The tools ran on a sample workspace.
  • Website bun run test and bun run build, for the docs change

Cloud providers were not called. The selector does not mark the current model yet.

Each tool call was a bare line with an absolute path and no result,
the home screen did not fit a 24-row terminal, and the model selector
showed one provider at a time.

Tool calls now render as one row each with a result from the new
ToolFinished event, grouped without blank lines, with paths relative
to the workspace. The home screen shows a 5-row ghost, the model, the
workspace, and start commands. The status line shows a state word,
the model, and the workspace fitted to the width. The model selector
lists every provider with its state next to the models.
Copilot AI balanced review requested due to automatic review settings November 6, 2026 00:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants