Files
npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6wandTaylor Ho 54f85c8b1b feat(desktop): universal activity ingresses with readable-channel gating
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>
2026-07-03 12:55:43 -07:00
..
2026-07-02 16:26:31 -07:00