Skip to content

[Design] Compact agent activity in chat - #356

Draft
Julia Shilova (juliashilovaa) wants to merge 1 commit into
mainfrom
agent-activity-redesign
Draft

[Design] Compact agent activity in chat#356
Julia Shilova (juliashilovaa) wants to merge 1 commit into
mainfrom
agent-activity-redesign

Conversation

@juliashilovaa

@juliashilovaa Julia Shilova (juliashilovaa) commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

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 agent's opening message stays visible at the top.
  • Intermediate execution activity — thinking, skills, tools, file operations, tests, and related narration — is grouped into a single compact, collapsible activity section while preserving the underlying sequence and context.
  • Interactive/result tools remain prominent when user attention or input is required.
  • The final response stays separate and visible below the activity.

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

Screenshot 2026-08-31 at 2 35 26 PM

After

Screenshot 2026-08-31 at 2 26 40 PM

@jetbrains-air jetbrains-air Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes — please address the blocking inline findings.

Comment thread apps/web/src/chat/rows.ts
if (event.kind === "prose") {
commit();
narration = { kind: "narration", id: event.entry.id, text: event.entry.text, steps: [] };
top.push(narration);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@juliashilovaa Julia Shilova (juliashilovaa) changed the title Compact agent activity in chat [Design] Compact agent activity in chat Aug 31, 2026
@danyaberezun
danyaberezun marked this pull request as draft September 1, 2026 21:00
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.

1 participant