Refine channel settings and profile panels - #5574
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86ed446551
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…visibility Address Codex review on #5574: - Base canEditChannel on canManageChannel (was canDeleteChannel), so channel admins keep edit, archive, and unarchive controls. Delete stays owner-only via the existing canDeleteChannel guard. - Restore the runtime configuration/settings field-length checks in showRuntimeTab so owned relay-only agents with runtime and access-policy fields keep their Runtime tab in production builds. - Extract shouldRenderMcpServers() and use it in both McpServersSection and the flat AgentConfigPanel surface, removing the duplicated hardcoded runtime-ID check from render code per features/agents AGENTS.md rule 1. Co-authored-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Mongo <9cfd347903944d5b85aa6c93d2ab67381b978a92a31914bca69998968752a1d7@buzz.block.builderlab.xyz>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28e063db92
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…visibility Address Codex review on #5574: - Base canEditChannel on canManageChannel (was canDeleteChannel), so channel admins keep edit, archive, and unarchive controls. Delete stays owner-only via the existing canDeleteChannel guard. - Restore the runtime configuration/settings field-length checks in showRuntimeTab so owned relay-only agents with runtime and access-policy fields keep their Runtime tab in production builds. - Extract shouldRenderMcpServers() and use it in both McpServersSection and the flat AgentConfigPanel surface, removing the duplicated hardcoded runtime-ID check from render code per features/agents AGENTS.md rule 1. Co-authored-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Mongo <9cfd347903944d5b85aa6c93d2ab67381b978a92a31914bca69998968752a1d7@buzz.block.builderlab.xyz> Signed-off-by: kenny lopez <klopez4212@gmail.com>
28e063d to
135abfb
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 135abfb43e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
wesbillman
left a comment
There was a problem hiding this comment.
Reviewing on Wes's behalf. This refactor currently removes an existing owner action and exposes an archive action outside the controller's documented permission gate. Please address the inline blockers before merge. I also called out the new full-member profile fetch because it puts relay work on every settings open for data the UI never renders.
wesbillman
left a comment
There was a problem hiding this comment.
Adversarial review at exact head 135abfb43e00885139df298f0af7d6e5f0b260d3 found two user-facing regressions:
-
Card minting is now unreachable for every owner-managed persona.
UserProfilePanelstill ownscardMintTargetand mountsUserProfilePersonaDialogs, but this refactor removed the onlysetCardMintTarget({...})callback and stopped threadingonCreateCardinto both profile primary-action variants. A repo-wide search underdesktop/src/features/profilefinds no remaining non-null setter. The “Create card” flow therefore cannot be opened from either a persona draft or deployed agent profile. Restore an owner-gated entry point and add an E2E assertion that opensAgentCardMintDialog. -
The archive row bypasses the archive controller's render permission.
UserProfilePanelSections.tsx:540-542renders archive/unarchive whenisOwner === true || archiveActions.canArchive. Local key custody can makeisOwnertrue for a legacy managed agent even when the current relay identity is neither its declared OA owner nor a relay admin;useIdentityArchiveexplicitly exposescanArchiveas the render guard, while the relay re-verifies authority. This paints an action that deterministically fails. Gate the row witharchiveActions.canArchive(plusisBot) and cover the local-key/no-relay-authority case.
Non-blocking performance issue: ChannelMemberAvatarStack.tsx:18-24 requests profiles for every channel member although it renders only three avatars. Slice first, then pass only visible pubkeys to useUsersBatchQuery, otherwise every settings open can issue a channel-sized batch lookup.
The latest commit does correctly restore admin edit/archive permissions, relay-only Runtime-tab visibility, and centralized MCP visibility. git diff --check origin/main...HEAD passes. CI is still running, but these findings are source-proven and independent of CI.
Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: kenny lopez <klopez4212@gmail.com>
…visibility Address Codex review on #5574: - Base canEditChannel on canManageChannel (was canDeleteChannel), so channel admins keep edit, archive, and unarchive controls. Delete stays owner-only via the existing canDeleteChannel guard. - Restore the runtime configuration/settings field-length checks in showRuntimeTab so owned relay-only agents with runtime and access-policy fields keep their Runtime tab in production builds. - Extract shouldRenderMcpServers() and use it in both McpServersSection and the flat AgentConfigPanel surface, removing the duplicated hardcoded runtime-ID check from render code per features/agents AGENTS.md rule 1. Co-authored-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Mongo <9cfd347903944d5b85aa6c93d2ab67381b978a92a31914bca69998968752a1d7@buzz.block.builderlab.xyz> Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: kenny lopez <klopez4212@gmail.com>
135abfb to
366df02
Compare
…o runtime tab Address Codex + reviewer feedback on #5574: - Restore the owner/relay archive-permission gate: require archiveActions.canArchive rather than treating any isOwner as archivable, so viewers the relay rejects no longer see Archive and Unarchive controls (regression vs main). - Query only the visible avatar slice in ChannelMemberAvatarStack. useUsersBatchQuery now receives the first MAX_VISIBLE_AVATARS pubkeys instead of every member, avoiding over-fetching profiles that are never rendered. - Fix the config-bridge screenshot e2e: model config moved from the Info tab to the Runtime tab, so tests 01-04 and 07 now open the Runtime tab to find the configuration section. Co-authored-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Mongo <9cfd347903944d5b85aa6c93d2ab67381b978a92a31914bca69998968752a1d7@buzz.block.builderlab.xyz>
The prior commit tightened canArchiveAgent to isBot && archiveActions.canArchive, dropping the isOwner path. That path is intentional: it surfaces the Archive/Unarchive row for agents this desktop manages locally, and profile.spec.ts:1277 asserts the row is present for a locally-created agent. The relay re-verifies archive authority on submit, so the client gate is UI-only by design. Restore isBot && (isOwner === true || archiveActions.canArchive) to fix the failing Desktop E2E Integration run. Co-authored-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Mongo <9cfd347903944d5b85aa6c93d2ab67381b978a92a31914bca69998968752a1d7@buzz.block.builderlab.xyz>
…ttings-review Signed-off-by: kenny lopez <klopez4212@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec53e55be5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Per reviewer request, tighten the agent Archive/Unarchive row to isBot && archiveActions.canArchive, dropping the isOwner local-custody short-circuit. canArchive already grants the action to self, relay owner/admin, or the verified NIP-OA owner; the OR exposed the row to legacy locally-managed agents whose archive request the relay rejects. The ingress-subviews e2e now runs as the verified OA owner (oaOwnerIsMe) so the row still renders through the canArchive gate. Negative coverage for a locally-managed agent with no verified authority already exists in identity-archive.spec.ts case 4. Co-authored-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Mongo <9cfd347903944d5b85aa6c93d2ab67381b978a92a31914bca69998968752a1d7@buzz.block.builderlab.xyz>
Summary
Snapshots
Channel settings
Agent info
Agent runtime
Validation
pnpm -C desktop checkpnpm -C desktop test(4,604 passed)pnpm -C desktop build:e2e