agent_crew icon indicating copy to clipboard operation
agent_crew copied to clipboard

Categorize activity panel cards by message content type

Open sre-helmcode opened this issue 9 months ago • 1 comments

Summary

All activity cards in the ActivityPanel currently look identical ("assistant message" with "Show details"). They should be visually categorized based on the actual content type to help users quickly identify what each event represents.

Current Behavior

All assistant messages show the same generic card:

assistant
claude-code
12h ago
assistant message

Show details

Expected Behavior

Cards should be categorized by inspecting message.content[].type:

1. Subagent Delegation (tool_use where name === "Task")

HIGHEST PRIORITY — Must be visually distinct so the user can quickly spot subagent assignments.

  • Distinct color/badge (e.g., purple or orange)
  • Show: "Delegated to: {input.subagent_type}" or "Task: {input.description}"
  • Icon: delegation/fork icon
  • Display the input.description and input.subagent_type prominently

2. Tool Usage (tool_use where name !== "Task")

  • Color: blue badge
  • Show: tool name (e.g., "Edit", "Grep", "Bash") + brief summary
  • For Edit: show file path being edited
  • For Bash: show command being run
  • For Grep/Glob: show search pattern

3. Thinking (thinking type)

  • Color: gray/muted badge
  • Show: "Thinking..." or truncated thinking text
  • Collapsed by default (less visual prominence)
  • Do NOT show the signature field

4. Text (text type) — Keep as-is

  • Color: default
  • Show: "assistant message" or truncated text content
  • Current behavior is acceptable

Technical Details

The content type is in the message.content[] array within the event payload:

{
  "type": "assistant",
  "message": {
    "content": [
      {
        "type": "tool_use",      // <-- this determines the category
        "name": "Task",          // <-- "Task" = subagent delegation
        "input": {
          "description": "...",
          "subagent_type": "backend"
        }
      }
    ]
  }
}

Acceptance Criteria

  • [ ] Activity cards show different visual treatment based on content type
  • [ ] Subagent delegation cards (Task tool_use) are prominently highlighted
  • [ ] Tool usage cards show the tool name and relevant context
  • [ ] Thinking cards are muted/collapsed by default
  • [ ] Text cards maintain current behavior
  • [ ] Cards with multiple content items show the most relevant type
  • [ ] Unit tests for content type detection and card rendering
  • [ ] E2E test validates card categorization with sample data

sre-helmcode avatar Feb 22 '26 11:02 sre-helmcode

Implemented in 7a8c5b5. Activity cards now classified into 6 categories: delegation (purple), tool usage (blue), thinking (gray), text (cyan), tool_result (green), error (red). Includes contextual summaries with tool/file info. 61 unit tests.

sre-helmcode avatar Feb 22 '26 12:02 sre-helmcode