Skip to content

feat(desktop): polish agent activity transcript feed#1344

Closed
tellaho wants to merge 3 commits into
mainfrom
tho/agent-activity-feed-polish
Closed

feat(desktop): polish agent activity transcript feed#1344
tellaho wants to merge 3 commits into
mainfrom
tho/agent-activity-feed-polish

Conversation

@tellaho

@tellaho tellaho commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Category: improvement
User Impact: Agent activity reads more like a useful transcript, with grouped tool activity, clearer assistant output, and an optional raw feed for debugging.
Problem: The activity feed exposed low-level event shapes too directly, which made agent work hard to scan and made tool calls noisy. Debugging still needs raw payload access, but that should not dominate the default transcript view.
Solution: This adds a transcript reduction/grouping/render pipeline, richer tool summaries, compact markdown rendering, and an activity-panel raw rail toggle while preserving the declared-ownership model already on main.

File changes

desktop/scripts/check-file-sizes.mjs
Updates the existing managed-agent runtime size exception for the one-line avatar URL plumbing added by this polish.

desktop/src-tauri/src/managed_agents/runtime.rs
Threads the managed agent avatar URL into the summary returned to the desktop UI.

desktop/src-tauri/src/managed_agents/types.rs
Adds the avatar URL field to the managed agent summary type.

desktop/src/features/agents/ui/AgentSessionToolItem.tsx
Reworks tool-call rendering around summarized tool states instead of raw payload-first display.

desktop/src/features/agents/ui/AgentSessionTranscriptList.tsx
Introduces the polished transcript list for grouped turns, assistant bubbles, tool rows, and empty states.

desktop/src/features/agents/ui/ManagedAgentSessionPanel.tsx
Scopes transcript and raw observer events by channel, passes avatar/profile data through, and supports raw rail layout modes.

desktop/src/features/agents/ui/RawEventRail.tsx
Tightens the raw observer event rail presentation for optional debugging alongside or instead of the transcript.

desktop/src/features/agents/ui/agentSessionPanelLayout.test.mjs
Covers channel scoping, latest-session derivation, and raw rail layout decisions.

desktop/src/features/agents/ui/agentSessionPanelLayout.ts
Adds shared helpers for channel scoping, latest session derivation, and raw rail layout resolution.

desktop/src/features/agents/ui/agentSessionToolItemHelpers.test.mjs
Covers helper behavior used by tool item rendering.

desktop/src/features/agents/ui/agentSessionToolSummary.test.mjs
Covers tool-summary classification across common tool payload shapes.

desktop/src/features/agents/ui/agentSessionToolSummary.ts
Adds the tool-summary classifier that turns raw tool payloads into readable labels, statuses, and metadata.

desktop/src/features/agents/ui/agentSessionTranscript.ts
Updates transcript reduction to carry richer context, keep terminal tool status monotonic, and produce items suitable for grouping/rendering.

desktop/src/features/agents/ui/agentSessionTranscriptGrouping.test.mjs
Covers transcript grouping behavior for assistant output and tool activity.

desktop/src/features/agents/ui/agentSessionTranscriptGrouping.ts
Adds grouping helpers that combine related transcript items into readable activity sections.

desktop/src/features/agents/ui/agentSessionTranscriptHelpers.test.mjs
Extends transcript helper coverage for the new activity-feed behavior.

desktop/src/features/agents/ui/agentSessionTranscriptHelpers.ts
Updates helper utilities used while deriving transcript items from observer events.

desktop/src/features/agents/ui/agentSessionTranscriptPresentation.test.mjs
Keeps coverage for the live activity-headline helpers used by the activity entry point.

desktop/src/features/agents/ui/agentSessionTranscriptPresentation.ts
Keeps the live activity-headline helpers used by the activity entry point; the unused transcript presentation state machine was cut from this split.

desktop/src/features/agents/ui/agentSessionTypes.ts
Extends shared transcript and observer types for the polished activity pipeline.

desktop/src/features/agents/ui/agentSessionUtils.ts
Adds shared formatting utilities for session IDs, timings, and activity labels.

desktop/src/features/agents/ui/rawEventRail.test.mjs
Covers raw rail formatting behavior.

desktop/src/features/channels/ui/AgentSessionThreadPanel.tsx
Adds the activity panel raw-feed toggle and passes raw layout state into the managed session panel without depending on the header refactor.

desktop/src/features/channels/ui/BotActivityBar.tsx
Updates the activity entry point to match the polished transcript behavior.

desktop/src/features/channels/ui/ChannelScreen.tsx
Threads activity-panel state and profiles through the channel screen.

desktop/src/features/channels/ui/useChannelActivityTyping.ts
Refines typing/activity detection used to show active agent work.

desktop/src/shared/api/tauri.ts
Updates the Tauri managed-agent summary binding for avatar URL data.

desktop/src/shared/api/types.ts
Adds the avatar URL field to the desktop managed-agent summary type.

desktop/src/shared/ui/markdown.tsx
Adds compact/tight markdown rendering variants for transcript-density contexts while preserving existing markdown behavior.

desktop/src/shared/ui/toggle.tsx
Adjusts toggle styling used by the raw-feed control.

desktop/src/testing/e2eBridge.ts
Extends test bridge managed-agent mocks with avatar URL data.

desktop/tests/e2e/channels.spec.ts
Updates channel E2E coverage for the activity-feed UI path.

Reproduction Steps

  1. Open a channel with an active or recent managed agent turn.
  2. Open the agent activity panel from the activity entry point.
  3. Confirm the default view shows grouped transcript activity with clearer tool summaries and assistant output.
  4. Toggle the raw feed control and confirm raw ACP payloads can be shown without replacing the default transcript permanently.

Screenshots/Demos

Not included for this draft split; reviewers should exercise the activity panel locally against seeded or live agent activity.

npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w and others added 2 commits June 28, 2026 23:01
…ship model

Replay of PR #1061 (tho/activity-ui-polish) onto fresh main: lands the
20 UI-polish commits as one net diff, reconciled with #1229's merged
declared-ownership model (viewerIsOwner = isCurrentUserOwner || isOwner)
and #1089's content-visibility-auto virtualization.

Notable reconciles:
- markdown.tsx: ported the compact/tight variant system into main's
  newer lightbox/spoiler markdown component (rather than overwriting it),
  layering variant density/leading overrides after the base owl-spacing
  so tailwind-merge wins. Dropped the branch's hardcoded text-[15px] in
  favor of main's rem-token text-sm base (post-#1052 zoom-safe scale).
- agentSessionTranscript.ts: pass TranscriptItemContext (not channelId).
- managed_agents: thread avatar_url through ManagedAgentSummary so the
  transcript renders the assistant-bubble avatar from the pinned record
  snapshot; bumped runtime.rs size override 2001 -> 2002 for the +1 line.

Observer-seed screenshots intentionally excluded (separate follow-up).

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho tellaho closed this Jun 29, 2026
@tellaho tellaho reopened this Jun 29, 2026
@tellaho tellaho marked this pull request as ready for review June 29, 2026 23:37
No code change. The reducer fix landed in df8937e but the PR-sync
event was dropped, so the full CI workflow never ran on that head.
This empty commit forces a fresh pull_request synchronize so the
desktop/E2E suite exercises the fix before merge. Tree is identical
to df8937e.

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho

tellaho commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #1381 (feat(desktop): rebuild agent activity feed — classifier registry + render-class taxonomy).

Same goal — a scannable, transcript-like activity feed — but PR-3 takes a cleaner architecture: a pluggable classifier registry plus a first-class render-class taxonomy (12 classes promoted to real item types), built atop the reduce→group→render foundation. The polish work this issue described is absorbed into that rebuild. Closing in favor of #1381.

@tellaho tellaho closed this Jun 30, 2026
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