Skip to content

Revamp new agent dialog#1201

Open
klopez4212 wants to merge 1 commit into
mainfrom
kennylopez-new-agent-modal
Open

Revamp new agent dialog#1201
klopez4212 wants to merge 1 commit into
mainfrom
kennylopez-new-agent-modal

Conversation

@klopez4212

@klopez4212 klopez4212 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Revamps the new/edit agent dialog UI and dialog state handling.
  • Adds runtime/model helper coverage for persona dialog behavior.
  • Keeps this slice scoped to the modal flow; no Radix Select dependency or internal avatar media bundle is included.

Validation

  • cd desktop && pnpm check
  • cd desktop && pnpm typecheck

@klopez4212 klopez4212 force-pushed the kennylopez-new-agent-modal branch from 558fa41 to 9efe199 Compare June 23, 2026 16:15
@klopez4212 klopez4212 force-pushed the kennylopez-agent-profile-sidebar branch from 37d03e8 to 309889d Compare June 23, 2026 16:15
@klopez4212 klopez4212 changed the base branch from kennylopez-agent-profile-sidebar to main June 23, 2026 16:15
@klopez4212 klopez4212 marked this pull request as ready for review June 23, 2026 16:17

@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: 9efe199544

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

sourceFile: "goosey.persona.md",
});

assert.equal(state.initialValues.avatarUrl, "app-avatar:gloopies-19");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Wire avatarRef through before asserting it

This new test currently fails because importPersonaDialogState still derives avatarUrl only from persona.avatarDataUrl, and the Tauri ParsePersonaFilesResult type does not populate an avatarRef field. In the added scenario where avatarDataUrl is null, the actual value is "", so the desktop unit suite is blocked until avatarRef is carried through the parser/state path or this assertion is removed.

Useful? React with 👍 / 👎.

mcpCommand: runtime.mcpCommand ?? "",
personaId: persona.id,
systemPrompt: persona.systemPrompt,
avatarUrl: persona.avatarUrl ?? undefined,

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 Upload data-URI avatars before creating the agent

When this dialog is submitted after importing a PNG persona card, persona.avatarUrl can be a data:image/... URI. Passing that directly into createManagedAgent persists and publishes the data URI as the agent profile picture; larger cards can exceed the relay event content limit or leave the profile with an unhosted avatar, which is why the existing channelAgents creation path uploads data URIs before calling createManagedAgent. This new create-agent path should perform the same upload before setting avatarUrl.

Useful? React with 👍 / 👎.

systemPrompt: persona.systemPrompt,
avatarUrl: persona.avatarUrl ?? undefined,
model: persona.model ?? undefined,
envVars: persona.envVars,

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 Omit persona envVars when linking the agent

For agents created from a persona with saved env vars, this copies the persona env into the per-agent env_vars while also setting personaId. The runtime later merges persona env first and agent env second via merged_user_env, so this duplicate per-agent copy shadows any future persona env edits or secret rotations for the newly created agent. Leave envVars unset here unless the dialog is collecting real per-agent overrides.

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.

1 participant