Skip to content

FIX: Correct invalid target initializer guidance#2248

Open
romanlutz wants to merge 1 commit into
microsoft:mainfrom
romanlutz:romanlutz-fix-target-initializer-guidance
Open

FIX: Correct invalid target initializer guidance#2248
romanlutz wants to merge 1 commit into
microsoft:mainfrom
romanlutz:romanlutz-fix-target-initializer-guidance

Conversation

@romanlutz

Copy link
Copy Markdown
Contributor

Summary

  • replace removed airt initializer guidance in CoPyRIT target configuration with supported target
  • clarify that target registers available prompt targets from configured environment endpoints
  • add focused regression assertions for both guidance surfaces

Validation

  • npm test -- --runInBand --runTestsByPath src\components\Config\TargetConfig.test.tsx src\components\Config\CreateTargetDialog.test.tsx (60 passed)
  • targeted ESLint on the four changed frontend files
  • npm run build

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ab91a04f-c845-47f5-9501-adee5fc55ae0
Copilot AI review requested due to automatic review settings July 22, 2026 05:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the frontend UI guidance in the target configuration surfaces to reflect the supported target initializer (replacing obsolete airt guidance), aligning the UI with PyRIT’s current initializer registry naming and behavior, and adds regression assertions to prevent the old guidance from returning.

Changes:

  • Update help text in Target configuration UI to reference the supported target initializer and describe its behavior.
  • Update help text in the Create Target dialog to clarify that target registers prompt targets from configured environment endpoints.
  • Add focused Jest/RTL assertions to ensure target guidance is present and airt guidance is absent in both UI surfaces.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
frontend/src/components/Config/TargetConfig.tsx Updates empty-state guidance to reference the target initializer instead of airt.
frontend/src/components/Config/TargetConfig.test.tsx Adds regression assertions for the updated initializer guidance in the empty state.
frontend/src/components/Config/CreateTargetDialog.tsx Updates the Create Target dialog hint text to reference the target initializer and clarify behavior.
frontend/src/components/Config/CreateTargetDialog.test.tsx Strengthens the guidance test to assert target and absence of airt.

Azure OpenAI targets automatically. See the{' '}
For example, add <code>target</code> to the <code>initializers</code> list to register
available prompt targets automatically. See the{' '}
<Link href="https://github.com/microsoft/PyRIT/blob/main/.pyrit_conf_example" target="_blank" inline>
Targets can also be auto-populated by adding the <code>target</code> initializer to your{' '}
<code>~/.pyrit/.pyrit_conf</code> file, which registers available prompt targets from endpoints in{' '}
your <code>.env</code> and <code>.env.local</code> files. See{' '}
<Link href="https://github.com/microsoft/PyRIT/blob/main/.pyrit_conf_example" target="_blank" inline>
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.

3 participants