Skip to content

[Feature] Add collapsible process details to assistant replies #367

Description

@AlphaCatMeow

Affected area

Desktop UI (agent-gui / React), Agent sessions / streaming, and Gateway WebUI.

Problem statement (what should this solve)

Assistant replies can contain many reasoning updates, tool calls, tool results, tool groups, and provider-hosted searches before the substantive answer. Keeping every intermediate item permanently expanded makes long conversations difficult to scan, especially on mobile, and visually separates related process events even though they belong to one reply.

Users need the substantive answer to remain prominent while retaining access to the complete execution process for debugging, trust, and recovery scenarios.

Proposed behavior

  • Aggregate thinking, tool calls and results, tool groups, and provider-hosted search events into one accessible Process details disclosure per assistant reply.
  • Keep the substantive Markdown answer and user-visible result artifacts outside the disclosure.
  • Keep active process-only replies expanded while work is running.
  • Once a substantive answer appears, follow a client-local Expand process details by default preference; the default preference is off.
  • Preserve a user's manual expand or collapse choice for that reply, including across virtualized unmounts and history restoration.
  • Keep cancellation, timeout, terminal failure, and tool-only replies visible when the user has not manually overridden the disclosure.
  • Treat recoverable tool errors followed by a substantive answer as recovered, so they follow the normal preference.
  • Provide equivalent behavior, localized copy, keyboard interaction, and responsive layout in both the desktop GUI and Gateway WebUI.
  • Keep the preference local to each client and exclude it from Gateway settings synchronization.

Estimated change scope

  • crates/agent-gui/src/pages/chat/
  • crates/agent-gui/src/lib/chat/
  • crates/agent-gateway/web/src/pages/chat/
  • crates/agent-gateway/web/src/lib/chat/
  • GUI/WebUI settings and zh-CN/en-US translations
  • Mirror validation and focused frontend tests

Implementation draft: #366

Alternatives considered

  • Keeping every process event permanently visible: preserves detail but makes completed conversations noisy and difficult to scan.
  • Hiding process events globally: improves readability but removes useful diagnostics and makes failures harder to understand.
  • One disclosure per tool event: still creates excessive visual fragmentation and does not match the reply-level mental model.

Acceptance criteria

  • Default-off preference collapses process details after a substantive answer appears.
  • Default-on preference leaves completed reply process details expanded.
  • Manual per-reply choice takes precedence over automatic behavior.
  • Active, cancelled, timed-out, failed, and answer-less terminal states remain understandable and visible as specified.
  • Desktop GUI and Gateway WebUI remain behaviorally mirrored.
  • Disclosure control is keyboard accessible and works without horizontal overflow at mobile widths.
  • Automated frontend, build, mirror, and diff checks pass, followed by desktop and mobile runtime acceptance.

Pre-submit checklist

  • I searched existing issues and pull requests and found no duplicates.
  • This proposal is focused on a single feature or improvement.
  • I understand a PR should come after this issue is confirmed by maintainers, otherwise it will be converted to draft.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions