Skip to content

FIX: Render target capabilities as structured columns in config table#1691

Open
romanlutz wants to merge 6 commits intomicrosoft:mainfrom
romanlutz:romanlutz/fix-target-capabilities-rendering
Open

FIX: Render target capabilities as structured columns in config table#1691
romanlutz wants to merge 6 commits intomicrosoft:mainfrom
romanlutz:romanlutz/fix-target-capabilities-rendering

Conversation

@romanlutz
Copy link
Copy Markdown
Contributor

@romanlutz romanlutz commented May 5, 2026

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: Added TargetCapabilitiesInfo Pydantic model with 6 boolean capability fields. Added capabilities field to TargetInstance.
  • pyrit/backend/mappers/target_mappers.py: Populate capabilities from target_obj.capabilities. Added target_configuration to extracted_keys to filter the verbose blob from Parameters.

Frontend

  • frontend/src/types/index.ts: Added TargetCapabilitiesInfo interface and capabilities field to TargetInstance.
  • 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.tsx and ChatInputArea.tsx: Updated supports_multi_turn checks to prefer capabilities?.supports_multi_turn with legacy fallback.

Tests

  • Backend: Added tests for capabilities population, legacy field consistency, and target_configuration exclusion.
  • Frontend: Updated TargetTable tests with capabilities data and column verification.

Testing

  • All 13 backend mapper tests pass
  • All 15 frontend TargetTable tests pass
  • All 91 frontend Chat component tests pass

Screenshot

image

romanlutz and others added 6 commits May 5, 2026 12:12
- 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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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