FIX: Render target capabilities as structured columns in config table#1691
Merged
romanlutz merged 10 commits intomicrosoft:mainfrom May 7, 2026
Merged
Conversation
- Add TargetCapabilitiesInfo model (6 boolean capability fields) to backend - Populate capabilities in target mapper from target_obj.capabilities - Add capability columns with checkmark/dismiss/dash indicators to TargetTable - Update Chat components to prefer capabilities object with legacy fallback - Add backend + frontend tests for capabilities population and rendering Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add target_configuration to extracted_keys so the verbose capabilities blob does not leak into the Parameters column - Make checkmark/dismiss icons 16px bold for better visibility - Add regression test for target_configuration filtering Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Switch to CheckmarkCircleFilled/DismissCircleFilled for better visibility - Add sticky header so column names stay visible when scrolling Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…capabilities-rendering
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jbolor21
reviewed
May 6, 2026
jbolor21
reviewed
May 6, 2026
jbolor21
approved these changes
May 6, 2026
Contributor
jbolor21
left a comment
There was a problem hiding this comment.
left some tiny comments but looks good to me!
- Move capability icon colors and cell width into makeStyles using design tokens (colorPaletteGreenForeground1, colorPaletteRedForeground1); drop hardcoded fontSize so icons inherit.
- Drop `Text size={200}` wrapper on table headers so they match other tables; switch tooltip trigger to a span with cursor:help class.
- Add tooltips for Type, Model, Endpoint, and Parameters columns.
- Tighten dash-count assertions to `toHaveLength(9)` and update inline comment to include the params dash.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Backend: expose flattened `supported_input_modalities` and `supported_output_modalities` on `TargetCapabilitiesInfo` so the frontend can render modality icons without re-deriving them. - Frontend: new Inputs and Outputs columns rendering Fluent UI icons with hover tooltips. Canonical icon order: text, image, audio, video, reasoning, function call, function call output, tool call, binary, url. `function_call_output` is rendered as a composite `f(x)` plus return-arrow badge in the top-right corner. - Adjust column widths so Endpoint has 1.5x more space (~450px) by trimming Type/Model/Capabilities/Parameters; Inputs gets a wider 160px column to accommodate up to 7 modality icons. - Replace `Badge` for the Type column with plain `Text` to avoid the pill outline visual and prevent overlap with Model. - Tighten `TargetConfig` test regex (`/reasoning_effort:/`) so the new Parameters tooltip text doesn't trigger a false positive. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ndow The frontend was reading the deprecated top-level `supports_multi_turn` field via `capabilities.supports_multi_turn ?? supports_multi_turn`. Since the backend now always populates `capabilities`, the fallback is dead code and creates a two-source-of-truth issue. The legacy field will be removed in microsoft#1692; tightening the read sites here keeps that follow-up cleaner. - ChatInputArea single-turn warning: read only from `capabilities`. - ChatWindow single-turn limit and `isSingleTurn` flag: same. - Tests: replace top-level `supports_multi_turn` fixtures with `capabilities` populated via a small `buildCapabilities` helper. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
romanlutz
added a commit
to romanlutz/PyRIT
that referenced
this pull request
May 8, 2026
Resolve overlapping `TargetCapabilitiesInfo` introduction between this branch (modality blocking refactor) and main's PR microsoft#1691 (config table capability columns): - Use main's field naming: `supported_input_modalities` and `supported_output_modalities` (not `_data_types`) - Drop the now-removed top-level `supports_multi_turn` from `TargetInstance` and its legacy-compat test - Keep `capabilities` required (cleaner contract; main had it optional) - Combine both filter additions in target_mappers.py: filter all `CapabilityName` enum values plus `target_configuration` - Adopt main's `buildCapabilities` test helper everywhere; drop my duplicate `makeCaps` helper - Update `ChatInputArea.tsx` modality check to use the renamed `supported_input_modalities` field Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
The target config page was rendering capabilities as a verbose JSON blob inside the Parameters column. This PR restructures the rendering to show capabilities as dedicated columns with clear visual indicators.
Changes
Backend
pyrit/backend/models/targets.py: AddedTargetCapabilitiesInfoPydantic model with 6 boolean capability fields. Addedcapabilitiesfield toTargetInstance.pyrit/backend/mappers/target_mappers.py: Populatecapabilitiesfromtarget_obj.capabilities. Addedtarget_configurationtoextracted_keysto filter the verbose blob from Parameters.Frontend
frontend/src/types/index.ts: AddedTargetCapabilitiesInfointerface andcapabilitiesfield toTargetInstance.frontend/src/components/Config/TargetTable.tsx: Added 6 capability columns (Multi-turn, Multi-piece, JSON Schema, JSON Output, Edit History, System Prompt) with filled circle ✓/✗/— indicators and tooltip descriptions. Sticky table header for scroll visibility.frontend/src/components/Chat/ChatWindow.tsxandChatInputArea.tsx: Updatedsupports_multi_turnchecks to prefercapabilities?.supports_multi_turnwith legacy fallback.Tests
target_configurationexclusion.Testing
Screenshot