refine the prompt/log UX: show commands, de-emphasize injects

Two spot-check fixes (T-178, T-179), both grounded in a boundary test of
the stream-json wire (findings folded into the spike doc):

- Harness-injected user messages (skill loads, slash-command expansions,
  system reminders) carry isSynthetic on the wire (isMeta in the
  transcript). They were rendering as blue "you" cards though the user
  never typed them; now UserMessage.injected flags them and the view
  shows a muted, collapsed "context" card instead.
- Permission prompts now show the command/input being permitted (a
  capped, scrollable code block) so you can see what you approve. Instead
  of fully hiding a prompted tool-use, once resolved it collapses to a
  one-line summary with a green (approved) or red (denied) border; the
  session tracks per-tool_use_id outcome and the view colours it. The
  result is kept.

Corrects an earlier wrong assumption: the Skill tool is auto-allowed
(no permission prompt); the inject only appears once the Skill tool is
actually invoked, which is why deny-captures missed it.

T-178, T-179, D-78.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-25 10:26:33 +02:00
co-authored by Claude Opus 4.7
parent c30a707b41
commit 2243237b13
12 changed files with 189 additions and 32 deletions
+15 -10
View File
@@ -18,23 +18,28 @@ heading, and (b) bumping `pubspec.yaml` `version:` in the same commit.
### Added
- Native permission & AskUserQuestion prompts (T-166, T-175, T-176, D-78) —
when Claude needs tool approval or asks a question, the composer is
- Native permission & AskUserQuestion prompts (T-166, T-175, T-176, T-179,
D-78) — when Claude needs tool approval or asks a question, the composer is
replaced by a prompt: Allow / Allow-and-don't-ask-again / Deny for
permissions (with an optional note), and a single-question or
stepped-with-review option picker for AskUserQuestion (with "Other"
free-text and per-choice notes). Closes the prompt gap the tmux model
couldn't surface.
permissions (showing the command/input being permitted, with an optional
note), and a single-question or stepped-with-review option picker for
AskUserQuestion (with "Other" free-text and per-choice notes). Closes the
prompt gap the tmux model couldn't surface.
- Conversation message cards (T-173) — every turn in the Claude pane now
renders through one card template with a copy button on hover and a
collapse/expand caret for tool calls, results, and thinking.
- Collapsed-by-default tool cards (T-177) — multi-line tool calls and
results start collapsed behind a one-line summary; one-line output stays
inline so a caret never hides a single line.
- Prompted tool calls no longer duplicate their payload in the log — a
permission/AskUserQuestion request shows as the prompt, not a raw
tool-use card; the result is still kept (AskUserQuestion's is replaced by
the logged answer).
- Prompted tool calls are quieter in the log (T-179) — a permission request
shows the command in the prompt, not as a raw tool-use card; once decided
it collapses to a one-line summary with a green (approved) or red (denied)
border, and the result is kept. AskUserQuestion's tool-use + result are
replaced by the logged answer.
- Harness-injected messages are de-emphasized (T-178) — skill loads,
slash-command expansions, and system reminders (Claude's `isSynthetic`
messages) render as a muted, collapsed "context" card instead of a blue
"you" message, since they weren't typed by the user.
- Claude meta sidebar (T-141, T-157) — an always-pickable left-panel tab
showing Claude activity (the latest day's messages/sessions/tool-calls
plus lifetime totals, from `stats-cache.json`) and, when a tmux team is