# Collapse intermediate tool call messages in chat

| | |
|--|--|
| **ID** | `bug_016` |
| **Priority rank** | 1 |
| **Severity** | high |
| **Category** | ui_polish |
| **Time range** | 334.0s – 343.5s |
| **Key moment** | 338.0s |
| **Affected element** | Tool call log messages |

> ⚠️ **About the red box in `screenshot.png`:** It is an AI-generated guess at the affected
> UI element. **It is correct most of the time but not always** — sometimes the actual
> element is near the box rather than exactly inside it, and occasionally the box lands
> on an unrelated element.
>
> When acting on this bug:
> 1. Read the **narration quote** and **detailed visual walkthrough** below first — they
>    describe what is actually wrong.
> 2. Look at the **full screenshot**, not just inside the red box.
> 3. If you need precise pixel coordinates, consult `omniparser_elements.json` in this
>    folder — it lists every UI element the detector found on this screen, with bounding
>    boxes and confidence. You can search by label or look at elements adjacent to the
>    red box.

## Description

The chat log becomes cluttered with numerous intermediate status messages and tool calls (e.g., 'mermaid.render'). The user wants these technical details to be hidden by default within a single, expandable message to improve readability.

## What the narrator said

> "And I don't want to see all this crap between each of these messages. It should just be I'm working... and I can expand one thing to see all of it."

## Detailed visual walkthrough

The screen displays a dark-themed chat application named "Athena v3". The main panel shows a conversation where a user has asked the AI to create an infographic about the "current state of the Iran war." The view is scrolled down to the AI's multi-step response. Initially, we see several separate messages from the AI, including an `ASSESSMENT` of the plan, a `call_search` tool call, another `ASSESSMENT`, and a preview of a timeline diagram.

As the narrator begins speaking, they scroll down through the chat log. The narrator says, "And I don't want to see all this crap between each of these messages." The scrolling action reveals a long sequence of individual messages that clutter the conversation history. These include previews for a pie chart and a flowchart, followed by at least four separate, identical-looking tool calls for `mermaid.render`.

The narrator continues scrolling and explains the desired behavior: "It should just be I'm working... and I can expand one thing to see all of it." The scroll continues past more intermediate messages, including another `ASSESSMENT` ("Now I'll compile all this..."), a `call_generate` tool call, and a final `ASSESSMENT` before the final PDF file output is shown. The core issue demonstrated is that the AI's entire thought process, including every tool call and intermediate generation step, is displayed as a separate message, making the chat log difficult to read and navigate. The user wants these technical steps to be collapsed into a single, expandable entry.

## Suggested fix

Group all tool calls related to a single agent action into a single, collapsible component in the chat. This component should display a summary status (e.g., 'Working on infographic...') and have a 'Show details' button or link that expands to reveal the full log of intermediate steps.

## Bounding boxes drawn on `screenshot.png`

- **Tool call log messages** at `[ymin=538, xmin=288, ymax=678, xmax=955]` (normalized 0-1000)

## Files in this folder

- `clip.mp4` — Video clip (334.0s – 343.5s, plus 2s padding on each side)
- `screenshot.png` — Key frame at 338.0s with red bounding box (see note above on accuracy)
- `screenshot_raw.png` — Same frame, no annotations
- `clip_description.md` — The detailed walkthrough above as a standalone file
- `bug.json` — Structured data
- `omniparser_elements.json` — every UI element detected on this screen by the OmniParser YOLOv8 model, with pixel-space bounding boxes and confidence scores. Useful if the red box in `screenshot.png` is on the wrong element — you can pick a different one from this list.
- `motion/` — Additional keyframes showing motion/state-change (if any):
  _(none — this is a static issue)_
