← Back to Pull requests

fix(desktop): only expand tool rows whose detail adds information #6015

Closed
unknown closed this pull request without merging on Oct 09, 2026 03:56 UTC
View on GitHub
unknown unknown commented on Oct 09, 2026 01:26 UTC
Author

Summary

Every Desktop tool row carried an expand chevron because Astryx ChatToolCalls makes a row expandable whenever call.resultDetail != null, and standardToolCall always passed a <ToolDetailReveal> — even when expanding showed an empty panel, repeated the collapsed target, or a bare type token. This PR makes a row expandable only when its detail adds information, and renders summary results as their summarized body.

Concretely:

  • standardToolCall computes the detail decision first and passes resultDetail only when the detail adds information beyond the collapsed row (#5997):

  • - banners (sandbox-blocked, requires-bypass) always count as information;
    - a titleless single-line quiet text equal to the collapsed target does not;
    - a body of none without a banner does not;
    - results whose preview would be only a type token (image, archived_tool_result) do not.
  • A summary result now renders its summarized body through the same redaction and line-cap pipeline as the text branch, instead of [summary].

  • A client plugin contribution to the conversation.tool.detail slot for that tool name keeps the row expandable, via a new useMakaClientSlotEntryKeys hook that mirrors the keyed outlet's lookup (including its session-scope guard).
  • Rows with diffs, terminal or shell output, web search results, JSON, live output, or banners keep their current behavior. Tool grouping, the process disclosure lifecycle, output length bounds, and the requires-bypass retry action are unchanged. This is the first slice of #4863; the remaining #4863 scope (WebFetch citation cards, shared bounds) stays there.

    Fixes #5997

    Verification

    | Check | Result |
    | --- | --- |
    | node --test dist/*/.test.js in packages/ui (full suite, 721 tests, includes 8 new tool row expandability (#5997) cases) | pass (0 fail) |
    | New tests before the fix | 5 red, exactly on the two symptoms: empty/repeat/token/plugin-miss rows render role="button" + chevron; summary detail renders [summary] instead of the body |
    | npx biome check on the 4 changed files | pass |
    | npm run check:asf-headers | pass |
    | npm run typecheck:stories (desktop, covers packages/ui/stories/** against the changed source) | pass |
    | smoke:storybook visual smoke | not run (requires a live storybook dev server and browser AX session; no tool-activity story is in its required-story list) |

    AI use

  • No generative tool made a substantive contribution

  • Generative tooling made a substantive contribution
  • Tool(s) and scope: GLM-5.3-Flash (ZCode) — authored the failing tests, the fix, and this PR under the reporter's root-cause analysis in #5997.

    Checklist

  • Tests cover the change and fail without it

  • Lint, format, typecheck and the affected suites pass locally
  • Does this PR entail a change in behavior?

  • Yes — described under Summary above

  • No
  • Diff: 363 lines (+272 / -91) across 4 files Reviewer: Astro-Han Review duration: 149m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.43) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 363 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.353
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #6015"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.7% (MEDIUM) · Higher = larger blast radius
    42.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.4% · Safe to merge
    18.4%
    Repository