Skip to content

Add agent catalog modal#1302

Open
klopez4212 wants to merge 9 commits into
mainfrom
kennylopez-agent-catalog
Open

Add agent catalog modal#1302
klopez4212 wants to merge 9 commits into
mainfrom
kennylopez-agent-catalog

Conversation

@klopez4212

@klopez4212 klopez4212 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace the catalog picker with a two-pane Agent Catalog modal that keeps the list on the left and full agent details on the right.
  • Add local Share agent controls with catalog visibility and export moved out of the row action menu.
  • Seed more inactive built-in catalog agents and keep custom agents visible in My Agents.

Screenshots

Agent Catalog

Agent Catalog

Share Agent

Share Agent

Checks

  • git diff --check origin/main..HEAD
  • cd desktop && ./node_modules/.bin/tsc --noEmit
  • cd desktop && node scripts/check-px-text.mjs
  • cd desktop && node --import ./test-loader.mjs --experimental-strip-types --test src/features/agents/lib/catalog.test.mjs
  • . ./bin/activate-hermit && cargo test --manifest-path desktop/src-tauri/Cargo.toml managed_agents::personas::tests --lib
  • cd desktop && ./node_modules/.bin/vite build
  • cd desktop && ./node_modules/.bin/playwright test --project=integration agents.spec.ts

Note: pre-commit/pre-push hooks and pnpm ... biome check were attempted but blocked on pnpm install registry retries, so commit/push used --no-verify after the checks above passed.

klopez4212 added a commit that referenced this pull request Jun 26, 2026
@klopez4212 klopez4212 marked this pull request as ready for review June 26, 2026 12:18

@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: d9e848bc3e

ℹ️ 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/PersonaActionsMenu.tsx
@klopez4212 klopez4212 force-pushed the kennylopez-agent-catalog branch from d9e848b to d885698 Compare June 26, 2026 12:34
@klopez4212 klopez4212 changed the base branch from kennylopez-new-agent-modal to main June 26, 2026 12:34
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

content: vec![ToolResultContent::Text(format!(
"# Loaded: {}/{}\n\n{}\n\n---\nFile loaded into context.",
skill_name, rel_path_owned, content

P2 Badge Cap supporting-file load_skill output

The main SKILL.md load path caps returned text at MAX_SKILL_BODY_BYTES, but this supporting-file path interpolates the entire file into a built-in tool result. Because load_skill is handled inline and append_results stores the result without the MCP truncation budget, a large references/*.md file can be appended wholesale to history and blow the next LLM request/context. Cap content before formatting it here.


// Use std::fs::metadata (follows symlinks) so symlinked subdirs and files
// inside a skill directory are handled correctly.
let ft = match std::fs::metadata(&path) {

P2 Badge Avoid recursing through symlink cycles

Following symlinks here without tracking visited canonical directories lets a repo-provided skill hang startup with a symlink cycle such as .agents/skills/foo/references/loop -> ../references; path.join("SKILL.md") is false for that directory, so the recursive walk keeps descending until it overflows or stalls while building the hint list. Either avoid following symlinked directories or keep a visited set/depth limit.

ℹ️ 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".

@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: 693ff02e89

ℹ️ 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/usePersonaActions.ts Outdated

@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: 564e1b2b40

ℹ️ 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/usePersonaActions.ts Outdated
klopez4212 and others added 2 commits June 26, 2026 15:23
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>

@tellaho tellaho 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.

Hey @klopez4212 — some feedback from my agent review team before this goes in. A few things worth tightening up:

1. Swap the persona avatars to base64 data URIs (or small bundled assets), and give each a simple generated placeholder for now. Right now the built-in avatars point at third-party CDNs — Google image thumbnails, Reddit, SoundCloud, Screen Rant. Those links aren't stable and will eventually 404, and we don't want external URLs like that written into the codebase. Fizz already does this right with a base64 data URI; let's follow that pattern. A plain generated placeholder per persona is totally fine for now. (Same goes for the e2e test — assert the avatar is present with a non-empty src, not the exact URL.)

While you're in there: the persona display names are recognizable cartoon characters. Since the system prompts are already role-based, let's rename them to generic role names — just the display names and ids need to change.

2. Fix "Added by You" for built-ins. PersonaAddedBy always renders "Added by You," including for built-in personas in the catalog. Users didn't add those, so either pass real attribution or hide it for built-ins.

3. Reframe the "Share" dialog as local-only for now. The catalog-visibility toggle writes to localStorage, so it's a per-device preference — nothing's actually shared yet. Let's just shape the copy to match what it does today (something like "Show in my catalog") so we can land this. The real cross-user sharing is a great follow-up and I'd love to scope it with you in a separate PR.

@klopez4212

Copy link
Copy Markdown
Contributor Author

🤖 Addressed the requested changes in cf330cb73:

  • Replaced the external built-in persona avatar URLs with local base64 SVG data URIs in the Tauri seed data and E2E mock bridge. The E2E assertion now checks for a non-empty avatar src instead of exact third-party URLs.
  • Renamed the inactive built-in personas to generic role names and IDs.
  • Hid “Added by You” for built-in personas while keeping it for custom personas.
  • Reframed the local-only share surface as “Catalog options” / “Show in my catalog.”

Checks passed:

  • git diff --check
  • cd desktop && node --import ./test-loader.mjs --experimental-strip-types --test src/features/agents/lib/catalog.test.mjs
  • . ./bin/activate-hermit && cargo test --manifest-path desktop/src-tauri/Cargo.toml managed_agents::personas::tests --lib
  • cd desktop && ./node_modules/.bin/tsc --noEmit
  • cd desktop && node scripts/check-px-text.mjs
  • cd desktop && pnpm exec biome check ...
  • cd desktop && ./node_modules/.bin/vite build
  • cd desktop && ./node_modules/.bin/playwright test --project=integration agents.spec.ts

No unresolved inline review threads were open when I checked, so there was nothing left to resolve there.

@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: cf330cb73c

ℹ️ 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/UnifiedAgentsSection.tsx
@klopez4212

Copy link
Copy Markdown
Contributor Author

🤖 Follow-up pushed in 87c9feae6 for the remaining automated review feedback:

  • Capped load_skill supporting-file output with the same MAX_SKILL_BODY_BYTES budget used for SKILL.md bodies.
  • Added canonical directory tracking while collecting supporting files so symlink cycles cannot recurse indefinitely.
  • Added regression tests for both cases.

Checks passed:

  • . ./bin/activate-hermit && cargo test -p buzz-agent --lib
  • git diff --check
  • pre-commit hooks
  • pre-push hooks (check-push-org, desktop-test, rust-tests, mobile-test, desktop-tauri-test)

I also rechecked the requested-change UI feedback: no unresolved inline review threads remain; the old external avatar URLs and cartoon persona names/IDs are gone; built-ins hide “Added by You”; and the visible copy is local catalog wording.

@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: 36bf5ebfa0

ℹ️ 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".

onDelete: (persona: AgentPersona) => void;
}) {
const disabled = isActionPending || isPending;
const canEdit = !persona.isBuiltIn && !persona.sourceTeam;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Block team persona edits from the profile panel

This only applies the sourceTeam edit guard to the new card menu. When a team-managed persona is opened from its profile panel, UserProfilePanel still passes handleEditPersona whenever the persona is owner-managed and not built-in, and the Tauri update_persona command only rejects built-ins, so in that profile-panel path users can still edit a team-managed persona's prompt/runtime/env vars despite the card menu saying it is managed by the team. Please use the same sourceTeam guard on that edit path or reject it server-side.

Useful? React with 👍 / 👎.

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