Skip to content

feat(profile): show active turn badges on agent profile panel and popover#1026

Merged
wpfleger96 merged 3 commits into
mainfrom
duncan/active-turn-profile
Jun 13, 2026
Merged

feat(profile): show active turn badges on agent profile panel and popover#1026
wpfleger96 merged 3 commits into
mainfrom
duncan/active-turn-profile

Conversation

@wpfleger96

Copy link
Copy Markdown
Collaborator

Summary

Surface the existing active-turn data (useActiveAgentTurns) in two additional locations:

  1. Profile panel (ProfileSummaryView) — pulsing "Working in #channel · Xm Ys" badges below the hero/actions section, above the ingress rows. Clicking a badge navigates to that channel.
  2. Hover popover (UserProfilePopover) — compact read-only badges below the info badges (runtime/model), above the "about" text.

Implementation

  • UserProfilePanel.tsx: Adds useActiveAgentTurnsBridge call for the viewed agent so the turns store is populated even when the Agents page hasn't been visited. Also derives a channelIdToName map from channelsQuery.data and passes it to ProfileSummaryView.
  • UserProfilePanelSections.tsx: Calls useActiveAgentTurns(pubkey) for bot profiles and renders ProfileWorkingBadge components (same pattern as WorkingBadge in ManagedAgentRow). Each badge uses useNow(1000) + formatElapsed for the live counter.
  • UserProfilePopover.tsx: Calls useActiveAgentTurns(pubkey) for bot profiles and renders PopoverWorkingBadge — a compact <span> with primary-colored text and pulse animation.

Behavior

  • No active turns → no badge rendered (clean absence)
  • Badges pulse (motion-safe:animate-pulse) and tick every second
  • Profile panel badges are clickable (navigate to channel)
  • Popover badges are read-only (compact display)
  • Bridge ensures data availability regardless of whether the Agents page has been visited

npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 and others added 3 commits June 12, 2026 20:52
…over

Surface the existing active-turn data (from useActiveAgentTurns) in two
additional locations: the slide-out profile panel and the hover popover.
Both show pulsing "Working in #channel · Xm Ys" badges that tick every
second and navigate to the channel on click (panel) or display read-only
(popover).

Adds useActiveAgentTurnsBridge in UserProfilePanel so the turns store is
populated even when the Agents page hasn't been visited.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Add useManagedAgentObserverBridge alongside useActiveAgentTurnsBridge so
the relay subscription registers the viewed agent's pubkey. Without this,
events won't populate the turns store if the user opens the profile
without having visited the Agents page first.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Cover the profile panel (single and multi-channel) and hover popover surfaces that render the active-turn badges. Seeds a Charlie-authored message in #agents so the message avatar opens the managed-agent profile, since existing seeds had no bot-authored row in a channel without index assertions.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96

Copy link
Copy Markdown
Collaborator Author

E2E screenshots — profile active turn indicators

Captured from desktop/tests/e2e/profile-active-turn-screenshots.spec.ts. Each shot maps 1:1 to a distinct asserted state.

Profile panel — single channel

Agent working in one channel. The "Working in #general" badge appears below the hero section, pulsing with a live duration counter.

01-profile-panel-single-channel

Profile panel — multiple channels

Agent working in two channels simultaneously. Multiple badges stack in a flex-wrap row.

02-profile-panel-multi-channel

Hover popover — working indicator

Hovering over an agent's avatar shows the compact working indicator in the popover, below the runtime/model info badges.

03-popover-working

wpfleger96 pushed a commit that referenced this pull request Jun 13, 2026
@wpfleger96 wpfleger96 merged commit a32681f into main Jun 13, 2026
23 checks passed
@wpfleger96 wpfleger96 deleted the duncan/active-turn-profile branch June 13, 2026 16:43
tlongwell-block pushed a commit that referenced this pull request Jun 13, 2026
* origin/main: (33 commits)
  fix(desktop): make Windows release compile cleanly (#1029)
  Add production Docker Compose bundle (#985)
  feat(profile): show active turn badges on agent profile panel and popover (#1026)
  chore(release): release version 0.3.20 (#1027)
  fix(release): resolve Windows sidecar path and Linux AppImage updater format (#1024)
  chore(release): release version 0.3.19 (#1014)
  fix(release): ignore prerelease tags in changelog generation (#1021)
  fix: repair main build after cross-PR merge skew (#1020)
  feat(agents): show per-turn duration and prune dead turns within ~25s of host crash (#1017)
  fix(release): replace hermit with native tool setup on Windows job (#1018)
  feat(acp): surface error-class outcomes to the activity feed only, never the channel (#1010)
  fix(desktop): migrate Sprout workspace storage (#1016)
  feat(auth): force token refresh on rejected token (401/403), never the browser (#1015)
  fix(release): mark prerelease versions so they do not become latest (#1013)
  feat(acp): implement systemPrompt with protocol version gating (#981)
  fix(release): update repository name check from block/sprout to block/buzz (#1012)
  feat(release): all-OS desktop builds + universal auto-update manifest (#1011)
  Add relay disconnect UX: friendly errors, reconnect, cached identity (#1004)
  feat(agents): add active turn indicators to Agents Menu (#1005)
  ci: add fork guards to docker, release, and auto-tag workflows (#1007)
  ...

Co-authored-by: npub1t2tgm7d8f995uqvmnm8h88sg3wnpp9a5xysjf6dg3tjmgt3ltulqdp8ehr <5a968df9a7494b4e019b9ecf739e088ba61097b4312124e9a88ae5b42e3f5f3e@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub1t2tgm7d8f995uqvmnm8h88sg3wnpp9a5xysjf6dg3tjmgt3ltulqdp8ehr <5a968df9a7494b4e019b9ecf739e088ba61097b4312124e9a88ae5b42e3f5f3e@sprout-oss.stage.blox.sqprod.co>
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