Skip to content

Revamp new agent dialog#1201

Open
klopez4212 wants to merge 6 commits into
mainfrom
kennylopez-new-agent-modal
Open

Revamp new agent dialog#1201
klopez4212 wants to merge 6 commits 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".

Comment thread desktop/src/features/agents/ui/personaDialogState.test.mjs
Comment thread desktop/src/features/agents/ui/usePersonaActions.ts Outdated
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: 9587e6bb13

ℹ️ 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
Comment thread desktop/src/features/agents/ui/usePersonaActions.ts
@klopez4212 klopez4212 force-pushed the kennylopez-new-agent-modal branch from 9587e6b to 9b228b4 Compare June 25, 2026 13:15

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

ℹ️ 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/PersonaDialog.tsx Outdated
Comment thread desktop/src/features/agents/ui/PersonaDialog.tsx 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: 6fb341bc61

ℹ️ 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/personaDialogState.ts Outdated
Comment thread desktop/src/features/agents/ui/PersonaDialog.tsx

@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: 5cfe774546

ℹ️ 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/BatchImportDialog.tsx Outdated
@klopez4212 klopez4212 force-pushed the kennylopez-new-agent-modal branch from 15e9e48 to 17b5b77 Compare June 25, 2026 14:19

@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: 17b5b7749e

ℹ️ 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 on lines +364 to +365
model: trimmedRuntime ? model.trim() || undefined : undefined,
provider: trimmedRuntime ? provider.trim() || undefined : 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 Preserve model/provider when runtime is unset

When editing an existing persona that has a saved model or provider but no preferred runtime, saving any unrelated field now submits both values as undefined because they are gated on trimmedRuntime. The backend update path treats undefined/missing optional fields as clearing those persona fields, so an edit like renaming a legacy/imported persona with no runtime silently drops its model/provider configuration.

Useful? React with 👍 / 👎.

Comment on lines 127 to 129
const existingAvatar = normalizeOptionalText(persona.avatarUrl);
const importedAvatar = normalizeOptionalText(preview.avatarDataUrl);
const importedAvatar = normalizeOptionalText(importedAvatarUrl(preview));
if (existingAvatar !== importedAvatar) {

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 Ignore unsafe avatar refs instead of selecting a clear

Fresh evidence in the current code is that an unsafe imported avatar ref is filtered to "", and the import-update dialog selects every detected field change by default. If an existing persona has an avatar and the imported .persona.md/pack only has a relative avatar such as ./avatars/lep.png, this line turns that into a real avatar diff from the current URL to blank; applying the default update then clears the existing avatar rather than ignoring the unusable imported ref.

Useful? React with 👍 / 👎.

Comment on lines +792 to +799
{providerOptions.map((option) => (
<option
key={option.id || AUTO_PROVIDER_DROPDOWN_VALUE}
value={option.id || AUTO_PROVIDER_DROPDOWN_VALUE}
>
{option.label}
</option>
))}

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 Offer a custom provider entry

For new personas/agents, the LLM provider field is now limited to this fixed option list, so users cannot enter a valid provider name that is not baked into PERSONA_LLM_PROVIDER_OPTIONS even though the backend stores provider as an opaque pass-through string and the previous text input accepted custom values. This blocks configuring non-listed runtime providers unless the persona was imported with that exact value already present.

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