mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Rebased from tho/activity-ingress (#1495) onto post-#1380 main, plus the access-gating fix agreed in review: activity ingress only ever opens channels the viewer can actually read. - useOpenAgentActivity: universal ingress — context handler in-channel, goChannel(..., { agentSession }) elsewhere, preferring an openable working channel (unified signal) then an openable member channel - Readable/joined gating: navigation and pane scoping only target channels that are joined or open-visibility. When the agent's only activity is in an inaccessible room, show a warning toast ('This agent is active in a channel you haven't joined…') instead of deep-linking or exposing content — no channel name or transcript leaks - Pure isChannelOpenable / resolveOpenableActivityChannelId helpers with 8 unit tests (joined/open/private/missing channels, working-first fallback order, inaccessible-only → null) - Profile panel/popover 'View activity log' gates on canOpenAgentActivity - Agents-page + profile working badges deep-link into the activity pane (owners), through the same gate - Activity pane header scope label: '#channel' / 'All channels'; resolves the name from the channels cache when only #1380's channelId scope is present (falls back to '1 channel' while the cache loads) - goChannel accepts agentSession search param; e2e screenshot spec for the scope label Conflict notes vs #1380 (its behavior preserved): - In-channel explicit channel targets keep #1380's in-place scoped pane (onOpenAgentSession(pubkey, channelId)) instead of navigating - UserProfilePanel keeps #1380's channelId-aware handleOpenActivity, now routed through the gated openAgentActivity - #1380 replaced the profile summary working-badge row with the live activity preview card; its onOpenActivity click-through is unchanged Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>