Skip to content

Refine channel settings and profile panels - #5574

Open
klopez4212 wants to merge 8 commits into
mainfrom
kennylopez-channel-settings-review
Open

Refine channel settings and profile panels#5574
klopez4212 wants to merge 8 commits into
mainfrom
kennylopez-channel-settings-review

Conversation

@klopez4212

@klopez4212 klopez4212 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • simplify channel settings into concise detail, member, canvas, and action sections
  • align human and agent profiles around shared rows, segmented tabs, and top-level actions
  • add agent runtime presentation, sticky glass behavior, and scroll-linked action transitions

Snapshots

Channel settings

Channel settings

Agent info

Agent info

Agent runtime

Agent runtime

Validation

  • pnpm -C desktop check
  • pnpm -C desktop test (4,604 passed)
  • pnpm -C desktop build:e2e
  • focused channel settings and agent profile Playwright tests

klopez4212 added a commit that referenced this pull request Aug 11, 2026
@klopez4212
klopez4212 marked this pull request as ready for review August 11, 2026 15:39
@klopez4212
klopez4212 requested a review from a team as a code owner August 11, 2026 15:39

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread desktop/src/features/channels/ui/ChannelManagementSheet.tsx Outdated
Comment thread desktop/src/features/home/ui/HomeMembersSidebarOverlay.tsx
Comment thread desktop/src/features/agents/ui/AgentConfigPanel.tsx Outdated
Comment thread desktop/src/features/profile/ui/UserProfilePanelSections.tsx
klopez4212 added a commit that referenced this pull request Aug 11, 2026
…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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread desktop/src/features/profile/ui/UserProfilePanelSections.tsx
Comment thread desktop/src/features/profile/ui/UserProfilePanelSections.tsx Outdated
klopez4212 added a commit that referenced this pull request Aug 11, 2026
…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>
@klopez4212
klopez4212 force-pushed the kennylopez-channel-settings-review branch from 28e063d to 135abfb Compare August 11, 2026 16:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread desktop/src/features/channels/ui/ChannelMemberAvatarStack.tsx Outdated

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread desktop/src/features/profile/ui/UserProfilePanelSections.tsx
Comment thread desktop/src/features/profile/ui/UserProfilePanelSections.tsx Outdated
Comment thread desktop/src/features/channels/ui/ChannelMemberAvatarStack.tsx Outdated

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial review at exact head 135abfb43e00885139df298f0af7d6e5f0b260d3 found two user-facing regressions:

  1. Card minting is now unreachable for every owner-managed persona. UserProfilePanel still owns cardMintTarget and mounts UserProfilePersonaDialogs, but this refactor removed the only setCardMintTarget({...}) callback and stopped threading onCreateCard into both profile primary-action variants. A repo-wide search under desktop/src/features/profile finds 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 opens AgentCardMintDialog.

  2. The archive row bypasses the archive controller's render permission. UserProfilePanelSections.tsx:540-542 renders archive/unarchive when isOwner === true || archiveActions.canArchive. Local key custody can make isOwner true for a legacy managed agent even when the current relay identity is neither its declared OA owner nor a relay admin; useIdentityArchive explicitly exposes canArchive as the render guard, while the relay re-verifies authority. This paints an action that deterministically fails. Gate the row with archiveActions.canArchive (plus isBot) 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.

klopez4212 and others added 4 commits August 11, 2026 18:43
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>
@klopez4212
klopez4212 force-pushed the kennylopez-channel-settings-review branch from 135abfb to 366df02 Compare August 11, 2026 17:48
klopez4212 and others added 3 commits August 11, 2026 18:54
…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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread desktop/src/features/agents/ui/AgentConfigPanel.tsx
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>
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.

2 participants