Skip to content

fix: use API name for published agents in preview picker @W-21258414@#328

Merged
EstebanRomero84 merged 3 commits intomainfrom
ml/W-21258414-use-api-name-on-published-agents
Feb 17, 2026
Merged

fix: use API name for published agents in preview picker @W-21258414@#328
EstebanRomero84 merged 3 commits intomainfrom
ml/W-21258414-use-api-name-on-published-agents

Conversation

@marcelinollano
Copy link
Collaborator

What does this PR do?

The preview picker was displaying published agents using their MasterLabel (friendly display name) instead of the DeveloperName (API name). This was inconsistent with other pickers (activate/deactivate, test run) which all use API names. This PR fixes the preview picker to use developerName for published agents, sorts agents by type (script first, then published) and alphabetically within each group, and adds unit tests.

What issues does this PR fix or reference?

@W-21258414@

Functionality Before

Published agents displayed their label name (e.g., "Guest Experience Agent") in the preview picker.

Functionality After

Published agents now display their API name (e.g., "Guest_Experience_Agent") in the preview picker, consistent with all other agent pickers. Agents are also sorted with script agents first, then published, alphabetically within each group.

Testing Setup Notes

Run the preview picker tests:

npx mocha test/commands/agent/preview/index.test.ts --require ts-node/register

To verify manually, run sf agent preview against an org with both published and script agents and confirm the picker shows API names and sorts correctly.

@marcelinollano marcelinollano requested review from a team and EstebanRomero84 February 13, 2026 20:55
@EstebanRomero84
Copy link
Contributor

QA Notes

I ran sf agent preview and verified that:

  • Published agents display API name.
Screenshot 2026-02-17 at 11 34 15 AM - Agent Script are displayed first. Screenshot 2026-02-17 at 11 33 58 AM
  • Agents are sorted alphabetically.

@EstebanRomero84 EstebanRomero84 merged commit f86401e into main Feb 17, 2026
17 checks passed
@EstebanRomero84 EstebanRomero84 deleted the ml/W-21258414-use-api-name-on-published-agents branch February 17, 2026 14:36
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