FIX: Correct invalid target initializer guidance#2248
Open
romanlutz wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ab91a04f-c845-47f5-9501-adee5fc55ae0
Contributor
There was a problem hiding this comment.
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
targetinitializer and describe its behavior. - Update help text in the Create Target dialog to clarify that
targetregisters prompt targets from configured environment endpoints. - Add focused Jest/RTL assertions to ensure
targetguidance is present andairtguidance 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
airtinitializer guidance in CoPyRIT target configuration with supportedtargettargetregisters available prompt targets from configured environment endpointsValidation
npm test -- --runInBand --runTestsByPath src\components\Config\TargetConfig.test.tsx src\components\Config\CreateTargetDialog.test.tsx(60 passed)npm run build