polish(agents): activity-feed transcript UI pass#1061
Draft
tellaho wants to merge 20 commits into
Draft
Conversation
23fde5c to
0851322
Compare
ec8a7f8 to
c6271a2
Compare
- Add transcript presentation model with Now summary, activity state, and live item highlighting - Support compact channel activity panel mode with intervention hint wiring - Refine tool, thought, metadata, and lifecycle row hierarchy for at-a-glance scanning - Share activity headline derivation with composer bot activity chip - Extend channel activity E2E coverage for Now summary and stop affordance
- Stamp each transcript item with its observer/ACP wire source during build - Show amber dev-only badges in the activity transcript for local debugging - Add unit tests covering agent_message_chunk vs agent_thought_chunk tagging
- Add a Raw switch to the agent activity panel header so users can swap between the formatted transcript and raw ACP JSON-RPC payloads. - Update the activity title to reflect raw mode and render the raw feed as the full panel content instead of a nested dark card. - Keep the existing transcript view unchanged by default and scope the raw-mode reset to agent/channel changes.
- Add turnId/sessionId to transcript items and a presentation-only grouping helper - Render each turn as user prompt first, with setup status and context integrated inline - Show turn setup as a CheckCheck tooltip; expose prompt context via a footer toggle - Expand context sections inside the message bubble; drop the outer grouping border - Add unit tests for turn metadata attachment and grouped display ordering
- Add managed agent avatar URLs to the Tauri summary and frontend ManagedAgent mapping so configured persona photos are available in channel activity views. - Carry agent pubkey and avatar data through channel session candidates, ManagedAgentSessionPanel, and AgentSessionTranscriptList. - Replace the assistant transcript bot glyph with UserAvatar, using synced profile photos first and managed-agent avatar URLs as fallback. - Include known agent pubkeys in channel profile lookups and preserve managed-agent avatars when merging agent names into profile data. - Update the E2E mock bridge managed-agent shape so seeded and created mock agents retain avatar URLs. - Polish the assistant activity row with slightly wider spacing and text-xs/font-semibold labels for the agent name and metadata.
- Replace arbitrary text-[7px]–text-[11px] sizes with Tailwind text-xs across the agent activity/session surface - AgentSessionTranscriptList, AgentSessionThreadPanel, AgentSessionToolItem, RawEventRail, and BotActivityBar - UserAvatar xs/sm size tokens now use text-xs so transcript and activity-bar avatars need no per-call font overrides
…variants - Add an xs size variant to the shared Toggle component for compact pill-style controls. - Update the outline toggle variant so pressed state uses the muted visual treatment instead of the primary fill. - Simplify the agent transcript context toggle to use size="xs" and remove the visible context section count.
- Update AgentSessionToolItem to render shell command tools as a muted inline summary with a semibold status label - Parse the shell command from tool parameters and show a truncated preview before the duration and caret - Reuse tool duration formatting with result payload fallbacks for command tools that report duration_ms or elapsed_ms - Apply canonical Tailwind class names flagged by diagnostics in the touched file
- Remove the sticky Now summary card from AgentSessionTranscriptList so transcript rows no longer scroll under a pinned status element - Drop summary-only helpers, Shimmer usage, and icon imports that only supported the removed card - Remove the showInterventionHint prop plumbing from ManagedAgentSessionPanel and AgentSessionThreadPanel after the summary hint was deleted - Update the channel activity E2E expectation to assert the removed summary no longer renders
- Add agentSessionToolSummary helper to classify buzz-dev-mcp tools and build status-aware labels with parameter previews - Extend AgentSessionToolItem to use the muted compact row for shell, read_file, view_image, str_replace, todo, and hook tools while preserving Buzz relay tool UI - Add unit tests for developer tool detection, previews, and running/failed labels
…tbox - Add thumbnailSrc to compact developer tool summaries for http(s) and data:image sources - Render a tiny inline thumbnail in Viewed image rows instead of a truncated URL - Show a larger preview when the tool accordion expands and open a lightbox on click - Route relay media URLs through rewriteRelayUrl and fall back to basename text for local paths - Add unit tests for thumbnail extraction and local path fallback
- Align prompt and standalone user transcript rows to the right edge of the activity panel. - Anchor non-agent avatars on the right using flex ordering while keeping assistant messages left-aligned. - Update related Tailwind shorthand classes surfaced during the targeted component check.
- Update desktop/src/features/agents/ui/agentSessionTranscriptGrouping.ts so turn setup lifecycle events are consumed before display even when a parsed user prompt is missing - Preserve prompt context and real turn activity while dropping empty setup-only turn groups from the activity transcript - Update desktop/src/features/agents/ui/agentSessionTranscriptGrouping.test.mjs to cover promptless turns and setup-only turns so Turn started / Session ready rows do not regress
- Remove row-level Live badges and active highlight styling from assistant transcript messages, thought rows, and tool rows - Stop passing transcript active item state through AgentSessionTranscriptList once row-level activity styling is no longer rendered - Preserve the panel header Live indicator as the single source of current agent activity state
- Update desktop/src/features/agents/ui/agentSessionTranscriptGrouping.ts to group consecutive tool calls into transcript tool groups and suppress setup/context-only turn noise when no user prompt bubble exists - Update desktop/src/features/agents/ui/AgentSessionTranscriptList.tsx and AgentSessionToolItem.tsx to render grouped tool rows with tighter activity-feed spacing - Expand desktop/src/features/agents/ui/agentSessionToolSummary.ts so Buzz and generic tools use the compact summary presentation with useful previews - Adjust desktop/src/shared/ui/toggle.tsx to support the ghost prompt-context toggle styling used by the transcript footer - Add focused unit coverage for grouped tools, Buzz tool summaries, promptless turns, and setup/context-only turns
- Remove the compact layout prop from AgentSessionTranscriptList, ManagedAgentSessionPanel, and AgentSessionThreadPanel; always render the tighter transcript density - Revert consecutive tool-call grouping (tool_group segments, ToolCallGroup, segment spacing helpers) and render each tool as a normal transcript row - Add symmetric per-type row spacing: my-2.5 for messages, my-1 for tools, my-2 for other items - Simplify ToolItem wrapper padding now that grouped/compact props are gone
The labels Record was annotated Record<CompactToolKind, ...> but only spreads generic + developerToolLabels(), which excludes the buzz kind. buzz is handled by an early return in compactToolLabel, so it never indexes this map. Narrow the annotation to Exclude<CompactToolKind, "buzz"> so tsc accepts it, and drop the redundant labelsMap re-cast. No runtime behavior change. Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
- Render user prompt transcript bubbles through the shared Markdown component so bullets, line breaks, and inline formatting display like normal messages - Preserve multi-line Buzz event Content fields when parsing ACP prompt payloads, stopping before harness metadata such as Tags and Parsed fields - Add transcript helper coverage for a multi-line mention prompt to guard against flattening formatted responses back to one line
- Render agent message-type tool rows (Send Message and buzz CLI message sends) as styled chat bubbles via a new CompactMessageSummary, gated on a presentation: "message" field on CompactToolSummary - Detect buzz message-send commands from both the structured Buzz tool and shell invocations (including simple echo pipes) so transcripts show the actual sent content - Add a mediaInset markdown prop that insets images and videos inside message bubbles so media no longer bleeds to the bubble edge; wire it into PromptUserMessage and MessageItem - Extend agentSessionToolSummary tests to cover the presentation field across message and inline cases Folds in PR-2 UI polish that was orphaned when the working tree was parked during the PR split.
9f3f5ad to
c0aa256
Compare
Collaborator
Author
📸 Live observer-seed captures — populated Activity panel (light + dark)Rendered via the PR-3 observer-seed harness (#1064), based on this branch's tip so the captures show the real polished components in this PR: CompactMessageSummary chat bubbles, mediaInset view_image thumbnails, grouped prompts, and tool/shell summaries. Each shot is the populated transcript panel (380×800) — a single agent session with a prompt, thinking, a plan, tool rows (Read file / Send Message / Viewed image), a shell buzz-message-send summary, and Fizz assistant bubbles. Light: Dark: Harness is in PR #1064 (stacked on this branch). Panel-only width for first review; fuller-width/full-page captures available on request. |
…ranches The activity-feed UI components claimed coverage "for grouping, presentation, and tool summaries" but the render-decision logic wiring those helpers into the rendered components had none. The node test harness only strips .ts (no JSX/DOM), so this extracts the pure decision logic out of the .tsx components into sibling .ts modules and tests it directly — matching the existing helper-test convention. - AgentSessionToolItem.tsx: extract isInlineImageData (the data:image/ passthrough guard), getToolDurationDisplay/formatDurationMs (duration fallback chain), and parseToolResultValue (JSON double-parse) into agentSessionUtils.ts. resolveImageSrc stays in the component (Tauri dep) but is now built on the testable isInlineImageData predicate. - ManagedAgentSessionPanel.tsx: extract scopeByChannel, deriveLatestSessionId, and resolveRawRailLayout (the raw-ACP toggle decision) into agentSessionPanelLayout.ts. - describeRawEvent (raw-view labels) gets direct coverage. New tests: agentSessionToolItemHelpers.test.mjs, rawEventRail.test.mjs, agentSessionPanelLayout.test.mjs (32 cases). Total suite 766 -> 798. Also sweeps the two parked dead branches: - agentSessionTranscriptGrouping.ts: the isSetupLifecycle guard in the activity loop can never fire (setup items are already in `consumed` and filtered out of `activity`). - agentSessionToolSummary.ts: the `base === "shell"` ternary inside the DEVELOPER_TOOL_BASES branch is unreachable (shell returns earlier); simplified to return "dev_mcp". Gates: biome check, tsc, vite build, 798 unit tests all green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Category: improvement
User Impact: The desktop Activity panel that streams an agent live runtime is cleaner and easier to scan — grouped turns, agent avatars, compact tool/shell rows, inline image previews, and a raw-ACP view toggle.
Problem: The Activity transcript was visually flat and dense — repeated agent headers, noisy tool rows, inconsistent typography, and no grouping made it hard to follow an agent turns at a glance.
Solution: A polish pass across the activity-feed runtime UI: grouped ACP turns into a user-first bundle, collapsed/simplified tool and shell rows with compact summaries, standardized transcript typography (text-xs), added agent avatars, inline thumbnails + lightbox for image tools, right-aligned user messages, a raw ACP view toggle, and formatted prompt bubbles. Backed by unit tests for grouping, presentation, and tool summaries.
Highlights from the commit history
Reproduction steps
🤖 Branch split + PR by Ned (sequencer) / Bart (builder).