Skip to content

feat(mecatui): quiet settled tool calls and open inspector from shortcut - #2089

Merged
jbeda merged 37 commits into
mainfrom
impl/mecatui-quieter-conversation-tool-calls
Oct 5, 2026
Merged

jbeda merged 37 commits into
mainfrom
impl/mecatui-quieter-conversation-tool-calls

Conversation

@jbeda

@jbeda jbeda commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Stage

Implementation of the approved quieter conversation tool calls plan.

Plan / Interface PR: #2081. Approved baseline: 59054ca2c9bc7d0a6f52a117db734e5e7481f4c0.

Relates to #1361 (this is a second slice, not issue closure).

Behavior and evidence

  • AC1.1–AC1.3: a shared semantic projection gives pending/provisional/awaiting/failed/done calls honest status; settled conversation and inspector-list rows use only the success/failure glyph, name, and intent. Skill rows name the selected skill. Complete received details remain in /toolcalls without a redundant Identity label.
  • AC2.1–AC2.2: Toolcalls (ctrl+t) opens the inspector while idle/running; approval modals retain detail/decision ownership and reject colliding keys.
  • AC3.1–AC3.2: ExpandConversation (f9) reveals turn headings, token/timing summaries, full reasoning, permanent-error details, and changed files without expanding tool cards. The normal view retains one-line reasoning, prose, and dense tool rows; empty assistant turns add no rows in either view. Settings/CLI rebinding and legacy ExpandTools alias preserve source precedence.
  • AC4.1–AC4.3: 105-call narrow/wide anchor, selection, resize and spacing coverage; owning public keybindings/usage pages updated; complete error payload remains opt-in.

Interfaces match the approved contract and human-authorized amendments: Yes. A1 (b51b440eb) moved the changed-files appendix to F9; A2 (4c904e091) clarified the active keymap sources and plan-approval no-op; A3 (5a87c6e78, authorized by the directing operator in this PR's review conversation) makes settled rows icon-only and shows turn details on F9. No other implementation deviation required an amendment. No gRPC, protobuf, tool-schema, engine-exported API, or persistence change.

Verification

  • task docs, task site:build, task ac-trace-strict, task test, task lint, task test:race — passed on the A3 candidate. After the Skill/detail follow-up, focused go test ./cmd/mecatui/ui -count=1, go vet ./cmd/mecatui/ui, task docs, and task site:build passed; repository-wide tests/race/lint were not rerun at the operator's request.
  • go run ./cmd/mecademo — passed offline on the original implementation; observed Read call/result and Write permission ask/approval/result.
  • Four-axis panel reviewed the implementation and A3 follow-up; findings were repaired and reviewers revalidated: PANEL: ship_blockers=0 important=0 advisory=0 reviewer_failures=0. The Skill/detail follow-up received focused security and test review.

Human review and merge remain separate. This PR does not close #1361.

jbeda and others added 26 commits October 5, 2026 11:25
Plan / Interface PR #2081 merged at 59054ca.

Co-authored-by: Mecatl <[email protected]>
Operator-authorized direct amendment (2026-10-04): the changed-files
appendix, previously revealed by the retired global ExpandTools toggle,
is revealed by ExpandConversation (f9) instead of becoming unreachable.

Co-authored-by: Mecatl <[email protected]>
Once an ordinary tool card receives its canonical result, the renderer now
emits a single borderless line, `<glyph> <status> · <displayName> · <intent>`,
derived only through projectToolCall (the same projection the /toolcalls
list uses). The line is ANSI-aware truncated to the content width so it never
wraps, and it carries one body-region text provenance row with the block's
stable ID and kind. Pending, awaiting-result, and provisional (available but
unconfirmed) calls keep the existing bordered card. Edit/Write and MCP settle
to the line too, without a diff or result body. Subagent/Team renderers are
unchanged. Settled lines ignore the retiring expand flag.

scrollback gains ToolCallMetadataOf(BlockSnapshot), which shares the
lifecycle derivation with ToolCallMetadataAt. That lets the renderer project
the snapshot it already loaded on a cache miss without a second interpretation
of tool fields. Caching still keys on block revision and render context.

Test updates (intent preserved):
- TestMecatuiQuieterToolCalls_Scenario1_PendingAndSettledParity (new): AC1.1.
- Bordered-card provenance, selection, reflow, and adapter tests that need
  argument/result rows now settle via resolveAvailableTool. Provisional cards
  keep the bordered card, so the card-provenance contracts are still exercised.
- Cache invalidation tests that checked for result text now check for the
  settled summary line. Fresh-render oracle comparisons are unchanged.
- Revision-guard/non-tail cache tests count block re-renders instead of card
  prepares, because a settled call no longer prepares a card.
- Model-switch and startup-replacement tests assert the settled line instead
  of the result body, which now lives in /toolcalls detail.
- concurrent_tool_completion accepts the settled-line form for ordinary and
  Parallel calls. Subagent/Team still assert their bordered header.

Co-authored-by: Mecatl <[email protected]>
Pin out-of-order provisional, terminal, concurrent, and resumed states against the conversation and inspector. Update older concurrent/presentation tests and Jev golden: finish without a canonical result is awaiting result, not success; pending cards now state running explicitly.

Co-authored-by: Mecatl <[email protected]>
Make toolcallProjectionState a required parameter of prepareTypedToolCard, prepareSubagentCard, prepareTeamCard, and prepareDelegationCard and delete the fallback state reconstruction, so every bordered header is "status · label" from the one projection. Drop the now-unread toolCardPresentation finished/failed fields and delegation done/stop arguments. Test callers pass an explicit state matching their fixture; four card goldens gain the status word in the header, and the variant test ignores border glyphs when a status-prefixed name wraps.

Co-authored-by: Mecatl <[email protected]>
Toggle reasoning, permanent errors, and changed files through the configured conversation key without expanding tool, subagent, or team cards. Preserve tool render cache keys and modal ownership.

Replace legacy ctrl+t expansion assertions: ctrl+t now opens the inspector, so tests expecting tool-body expansion were removed or changed to assert stable collapsed cards. Retain direct approval detail expansion and scoped tool hints for T05b.

Co-authored-by: Mecatl <[email protected]>
jbeda and others added 8 commits October 5, 2026 11:27
Rebase quiet tool-call presentation onto current main, preserve the current guardrail notice contract through ExpandConversation, and update the approved acceptance and public interaction docs.

Co-authored-by: Mecatl <[email protected]>
@jbeda
jbeda merged commit b61a4a5 into main Oct 5, 2026
39 checks passed
@jbeda
jbeda deleted the impl/mecatui-quieter-conversation-tool-calls branch October 5, 2026 23:29
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 7, 2026
2 tasks

This branch was successfully deployed

1 active deployment
Preview — 6a6145ca Deployed Oct 5, 2026 by vercel[bot]
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.

Compact tool call output, expandable on demand

1 participant