[Design] Compact agent activity in chat - #356
[Design] Compact agent activity in chat#356Julia Shilova (juliashilovaa) wants to merge 1 commit into
Conversation
| if (event.kind === "prose") { | ||
| commit(); | ||
| narration = { kind: "narration", id: event.entry.id, text: event.entry.text, steps: [] }; | ||
| top.push(narration); |
There was a problem hiding this comment.
Blocking:
Problem: Nesting this prose under an Activity row removes every top-level row keyed by the narration's assistant turn, while rowIndexForTurn still only recognizes the turn id or ${turnId}:text: rows.
Failure scenario: History search finds text from an intermediate assistant message and maps it to that turn, but jumping to it returns -1, shows ‘couldn't locate the message’, and clears the request even though the message is present.
Suggested fix: Preserve a turn-to-containing-row mapping for narration nodes (and use it in the jump resolver), or teach rowIndexForTurn to recursively match narration ids inside Activity rows.
| live={false} | ||
| stepCount={narration.steps.length} | ||
| icon={<ChatQuote className="size-12 shrink-0" />} | ||
| headline={narration.text} |
There was a problem hiding this comment.
Blocking:
Problem: The narration's complete text is only passed to a permanently truncated header; expanding the narration renders its steps but never renders the prose body.
Failure scenario: A multi-line or long intermediate explanation is reduced to one clipped line, and mobile/touch users cannot recover the hidden content via the desktop-only title tooltip, so canonical transcript content becomes unreadable.
Suggested fix: Keep a compact header when folded, but render the full narration text (with the normal Markdown/body renderer) inside the expanded disclosure.
| await enterDefaultWorkspace(page); | ||
| await openChatFromHistory(page, "turn hierarchy"); | ||
|
|
||
| // Exactly one compact activity block for the whole round (two tools coalesced, not two blocks). |
There was a problem hiding this comment.
Blocking:
Problem: This test adds multiple narrative comment blocks that duplicate the assertions and SPEC prose, violating the repository's explicit near-zero-comments invariant and its pre-handoff audit.
Failure scenario: The behavior now has parallel explanations in the chat SPEC and test comments, so later hierarchy changes can leave authoritative design and inline narration disagreeing.
Suggested fix: Remove the narrative comments and let descriptive test/assertion names carry the behavior; keep rationale only in apps/web/src/chat/SPEC.md.
Summary
This PR redesigns how agent activity is presented in chat to make longer runs easier to scan and significantly more compact.
Previously, agent narration, thinking, skills, tool calls, file operations, and other execution steps appeared sequentially as separate items, creating a long stream that could quickly take over the conversation.
Now the hierarchy is simplified:
The goal is to let users understand what the agent is doing at a glance, keep the actual conversation prominent, and avoid an endlessly growing sequence of execution steps.
Before
agent-answer-behaviour-current.mov
After
agent-answer-behaviour-this-pr.mov
Before
After