Skip to content

Overhaul CLI coder terminal UI/UX and interactive approval workflow - #2448

Merged
Matlan1 merged 13 commits into
masterfrom
feat/coder-cli-ui-ux
Oct 20, 2026
Merged

Matlan1 merged 13 commits into
masterfrom
feat/coder-cli-ui-ux

Conversation

@Matlan1

@Matlan1 Matlan1 commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Live spinner while the model thinks, while a hidden tool call streams (tool name, target, line count) and while a tool runs; scrollback-safe (carriage return only, no viewport control).
  • New-file and edit previews capped at 30 lines; f at the prompt shows the full diff.
  • Approval prompts: a allows that tool for the rest of the session (for shell tools, that exact command only; never waives the shell guard, a loosely formatted call or always_confirm), n: <reason> or any other text rejects and sends the text back to the agent.
  • Streamed text is no longer printed a second time; failed tools show the tail of their output; end-of-task warnings and a one-line summary footer show in the REPL; set_todos renders as a checklist.
  • @path / @path:10-40 attach a file through read_file (same confinement and truncation as the model's own read; outside /scope is skipped). A multi-line paste arrives as one message.
  • Context-full warning no longer prints literal [bold] tags.

Verification

  • tests/plugins/coder/test_coder_ui_ux.py: 21 tests; the session-allow, free-text and markup tests were fires-controlled (red on the injected defect, green on the fix).
  • Coder regression: tests/plugins/coder plus the top-level coder and stream-scroll tests, 3068 passed, 2 skipped.
  • Live in a real Windows ConPTY against a scripted OpenAI-compatible server: spinner and "Preparing write_file · big.py" progress shown, 80-line new file previewed in 30 lines, a stopped the second write prompting while run_shell still prompted, the rejection reason and the @notes.py attachment reached the model's request, a 3-line paste arrived as one message.

🤖 Generated with Claude Code

@Matlan1 Matlan1 added full-ci Run the full two-platform lint+hygiene+tests matrix on this PR mutation-test Run the opt-in mutmut mutation-testing job (Linux only) on this PR labels Oct 16, 2026
Matlan1 and others added 9 commits October 16, 2026 15:15
… for the session; @file reads through read_file and honours /scope

Answering 'a' used to switch on session-wide auto-approve, so one 'a' on a
file write silently approved every later shell command, push and network
call. It now allows only the tool it was asked about, or the exact command
for a shell tool, and never waives a shell-guard verdict, a loosely
formatted call or a configured always_confirm.

@file attachments go through read_file (same confinement, notebook
rendering and truncation the model's own read gets) and skip paths outside
the session's /scope. Also fixes the ruff findings (B023, UP037) and stops
printing a static 'Thinking...' line next to the live spinner on a terminal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y; plain /compact hint

Typing anything other than y/a/f/n at an approval prompt used to count as a
silent "no", so an instruction typed there was lost. It is now a rejection
that carries the typed text back to the agent. The context-full warning
printed literal "[bold]" tags because warnings are sanitised; it is plain
text now. Changelog entries rewritten for users.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- @file text no longer counts as the request: chat() and run_task() take
  attachments separately, so a question about an attached file is not
  re-prompted for a tool call, and the session title, episode task and
  reviewer task hold only what the user typed (goal mode too).
- [f] at a prompt shows only this file's diff; the stored preview is
  forgotten before every tool prompt.
- "a" is offered only where it is honoured: on tool prompts, including a
  child agent's prompt routed to the parent terminal (which now also keeps
  its rejection reason); not on "Keep going?", save or export prompts.
- URL tools are allowed per host; allows end on /cd and /clear.
- The GUI rejection event keeps its exact "rejected by user" summary.
- No spinner over shell, git or test runs (a subprocess may prompt on the
  terminal), nor while a background child compacts its history; an ordinary
  JSON code block is no longer reported as a tool call in progress.
- The end-of-task footer and sensitive-file warning cover this task's files
  only; a tool call that could not be read is now reported to the user.
- POSIX paste coalescing reads the terminal file descriptor directly, so a
  single read holding several pasted lines loses none of them.
- basedpyright baseline entries refreshed for the touched coder files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A paste that starts with "/export notes.md" used to append the pasted lines
to the command's argument. The reader now returns the typed text and the
pasted lines separately: a /command gets only what was typed (and says the
pasted lines were not used), a chat message gets all of it, and @file
mentions are read from the typed text only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Matlan1 Matlan1 removed the mutation-test Run the opt-in mutmut mutation-testing job (Linux only) on this PR label Oct 20, 2026
@Matlan1
Matlan1 merged commit 581ba6c into master Oct 20, 2026
46 checks passed
@Matlan1
Matlan1 deleted the feat/coder-cli-ui-ux branch October 20, 2026 18:11
Matlan1 added a commit that referenced this pull request Oct 20, 2026
…user or a plan prompt waits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Run the full two-platform lint+hygiene+tests matrix on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant