Skip to content

feat(agents): gate activity-feed ingress by relay ownership#1060

Open
tellaho wants to merge 3 commits into
mainfrom
tho/activity-ingress-ownership
Open

feat(agents): gate activity-feed ingress by relay ownership#1060
tellaho wants to merge 3 commits into
mainfrom
tho/activity-ingress-ownership

Conversation

@tellaho

@tellaho tellaho commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Category: improvement

User Impact: Agent activity in the desktop Activity panel now consistently shows up and respects relay ownership, so people only see activity they are entitled to.

Problem: Activity ingress was not reliably gated by ownership, and agent members were not classified for ingress — activity could surface inconsistently or to the wrong viewers.

Solution: The ingress + ownership foundation: relay-side ownership gating, refined visibility ownership checks, and agent-member classification for activity ingress (relay .rs + Tauri ownership commands + client viewer hooks), backed by ownership-resolution and agent-session-candidate tests.

Stack — PR 1 of 2. This is the base. The UI polish lands on top in a follow-up PR stacked on this branch. Carved out of #1053, which is conflicting vs main; built fresh off current main to sidestep that.

Commits
  • feat(agents): gate activity by relay ownership
  • feat(agents): refine activity visibility ownership checks
  • fix(agents): classify agent members for activity ingress

Reproduction steps

  1. Run the desktop app and open a channel with a managed agent.
  2. Mention the agent so it starts a turn, then open the Activity panel.
  3. Confirm activity surfaces for entitled viewers and is gated by ownership.

🤖 Branch split + PR by Ned (sequencer) / Bart (builder).

tellaho added 3 commits June 15, 2026 15:35
- Add a relay ownership endpoint backed by agent_owner_pubkey and is_agent_owner so desktop activity visibility uses the same source of truth as observer telemetry authorization.
- Add a Tauri ownership command, frontend API wrapper, and useCanViewAgentActivity hook with local managed-agent optimism only while relay ownership is loading.
- Replace profile popover, profile panel, and members sidebar activity gates so owned agents can open activity across different builds and worktrees without relying on local managed-agent lists.
- Refactor channel agent session candidate resolution so owned agents can keep an activity panel open when channel metadata is stale, while preserving local-only lifecycle controls.
- Add focused desktop unit coverage for the ownership predicate and stale-metadata session resolution path, plus E2E bridge support for ownership mocks.
- Extend canViewAgentActivity coverage for relay-backed agent sessions
- Harden Tauri ownership resolution and observer relay scoping
- Wire updated visibility rules through profile panel and popover surfaces
- Update channel activity candidate resolution to treat ChannelMember.isAgent the same as bot role membership.
- Keep agent typing classification and Activity panel scoping aligned so agent typing does not fall through to the generic human typing row.
- Add regression coverage for isAgent channel members being created as activity candidates and retained in channel scope.
@tellaho tellaho force-pushed the tho/activity-ingress-ownership branch from 23fde5c to 0851322 Compare June 15, 2026 22:36
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