add selected-agent live activity to the composer#2646
Open
tellaho wants to merge 2 commits into
Open
Conversation
Rebuild of the composer live-activity experiment (old draft PR #1575) on current main primitives. Behind the new off-by-default composerLiveActivity preview feature, the agents-working popover shows one selected working agent's channel-scoped feed at a time: - ComposerLiveActivityFeed reuses ManagedAgentSessionPanel with the compactPreview transcript variant (same primitive as the profile activity embed), so live/archive merging, projection, anchored scrolling, and idle handling stay owned by that surface. - Agent switching via pill tabs (role=tablist) under the preview; selection resolves explicit tab > open session pane > first working agent, and falls through when the selected agent stops working. - Whole preview is one click target with a Last-live recency pill; transcript rows underneath are inert, avoiding nested interactive controls inside a clickable shell. - formatLastLiveLabel extracted from UserProfilePanelTabs into profile/lib/lastLiveLabel so both surfaces share the recency label. With the experiment off, the popover renders the existing agent list unchanged. Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
…nd AT Wrap the ManagedAgentSessionPanel subtree in a native inert container so compact transcript rows (which can render keyboard-focusable message links) are removed from pointer, tab-order, and assistive-tech interaction — CSS pointer-events-none only neutralized the mouse. The overlay open button and Last-live pill stay accessible. Also extract deriveLastLiveAt and make it archive-aware: the Last-live pill now takes the newest across the live transcript window, archived channel events, and the active-turn anchor, so it can no longer disagree with archived rows visible in the preview. Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
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: new-feature
User Impact: Users who opt into the experiment can preview a working agent's recent channel activity directly from the composer and switch between active agents.
Problem: The existing composer affordance says that agents are working but gives little context about what a selected agent is doing. The older live-activity draft had also fallen behind current transcript and activity primitives.
Solution: Rebuild the concept on current main as an off-by-default experiment, reusing the shared managed-agent activity panel for one selected agent at a time. The preview remains a single accessible interaction surface, includes archive-aware recency, and leaves the existing popover unchanged when disabled.
File changes
desktop/src/features/channels/ui/BotActivityBar.tsx
Routes the enabled experiment to the selected-agent preview while preserving the existing disabled popover, and adds accessible agent-switching controls.
desktop/src/features/channels/ui/ComposerLiveActivityFeed.tsx
Adds the compact composer preview using the shared managed-agent session panel, with an inert transcript subtree and accessible click-through controls.
desktop/src/features/channels/ui/composerLiveActivity.ts
Defines selected-agent resolution and archive-aware Last-live derivation.
desktop/src/features/channels/ui/composerLiveActivity.test.mjs
Covers selection fallback behavior and recency across live, archived, and active-turn sources.
desktop/src/features/profile/lib/lastLiveLabel.ts
Extracts the shared Last-live label formatter for reuse outside the profile panel.
desktop/src/features/profile/lib/lastLiveLabel.test.mjs
Covers the shared recency labels.
desktop/src/features/profile/ui/UserProfilePanelTabs.tsx
Uses the extracted shared Last-live formatter without changing profile behavior.
preview-features.json
Registers the off-by-default composer live-activity experiment.
Reproduction steps
composerLiveActivitydisabled, open the composer activity popover and confirm the existing Agents working list remains unchanged.Screenshots
Experiment off — existing popover

Enabled — single agent

Enabled — multi-agent switching

Keyboard focus — transcript subtree remains inert
