Skip to content

fix(sidebar): compact working-agent avatar indicator#1356

Draft
tellaho wants to merge 4 commits into
mainfrom
tho/working-avatar-indicator
Draft

fix(sidebar): compact working-agent avatar indicator#1356
tellaho wants to merge 4 commits into
mainfrom
tho/working-avatar-indicator

Conversation

@tellaho

@tellaho tellaho commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Overview

Category: fix
User Impact: The sidebar "working" indicator is now a compact pulsing avatar group instead of a wide text badge, so channel names keep their horizontal space — and a declared owner sees their agent light up even when it runs on another machine.

Problem: The working indicator shipped in #1274 rendered as a Working · 1m 20s text badge that ate into the channel name's horizontal space. It also decided which agents to show purely on local key custody (managedAgents), so a declared owner whose agent runs on another machine — owning it but holding no local key — would not see their own agent working.

Solution: Replace the text badge with a pulsing avatar group (with a who's-working popover), tighten the overflow rule, drop a stray accent border/ring, and widen the visibility gate from key custody to declared ownership — the same NIP-OA ownerPubkey == viewer signal #1229 standardized across the other owner surfaces. Encryption stays the real security boundary, so the wider read gate leaks nothing.

File changes

desktop/src/features/sidebar/ui/SidebarSection.tsx
Replaced the Working · 1m 20s text badge with a pulsing agent avatar group plus a who's-working popover. Overflow rule: show all avatars when ≤3, collapse to 2 avatars + a "+N" badge past 3. Removed the accent border/ring-1 glow from both the avatars and the +N badge.

desktop/src/features/sidebar/lib/useActiveWorkingChannelsById.ts
Widened the working-agent seed from locally managed agents to also include relay agents whose profile ownerPubkey matches the current viewer (mirrors the #1229 declared-ownership gate). Dedupes by pubkey, preserving managed-agent status when an agent appears in both sets. Falls back to managed-only when there is no viewer identity.

desktop/src/features/agents/activeAgentTurnsStore.ts
Active channel turn summaries now carry agentPubkeys so the sidebar can resolve avatars for each working agent.

desktop/src/features/agents/activeAgentTurnsStore.test.mjs
Updated the store test for the new pubkey aggregation.

Reproduction Steps

  1. Run the desktop app as the declared owner of one or more agents.
  2. Have agents take turns in a few channels (single, multiple, and more than three in one channel).
  3. In the left sidebar, confirm working channels show a compact pulsing avatar group at the right edge of the row — channel names keep their space (no more wide text badge).
  4. Confirm the overflow collapses to 2 avatars + "+N" once a channel has more than three working agents, and that the avatars carry no accent border/ring.
  5. Hover the avatars to confirm the who's-working popover lists each agent with avatar + name.
  6. With an agent you declare ownership of but that runs on another machine (no local key), confirm its working indicator now lights up.

Screenshots/Demos

Screenshots of the avatar group, overflow, and popover are being captured against this branch and will be added in review.

npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w and others added 4 commits June 29, 2026 09:55
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>
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>
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