Skip to content

[DRAFT] GUI: Converters#3

Closed
jbolor21 wants to merge 511 commits intoromanlutz:mainfrom
jbolor21:bjagdagdorj/frontend_converters
Closed

[DRAFT] GUI: Converters#3
jbolor21 wants to merge 511 commits intoromanlutz:mainfrom
jbolor21:bjagdagdorj/frontend_converters

Conversation

@jbolor21
Copy link
Copy Markdown

@jbolor21 jbolor21 commented Mar 15, 2026

Description

[WIP] Adding converters to the GUI interface - forked off of Roman's front end branch

Current progress:

  • we can open a converter pane & select converter
  • can see which converters use an LLM
  • see a conversion preview

Still to do:

  • stack converters (ie let user use > 1)
  • clean up UI - current barebones are in
  • automatically preview conversion for non-LLM based converters
  • ensure the "converted" version is sent ie not double converting

Tests and Documentation

IN PROGRESS STILL

rlundeen2 and others added 30 commits December 31, 2025 12:54
Co-authored-by: Roman Lutz <romanlutz13@gmail.com>
…t#1261)

Co-authored-by: Robert Fitzpatrick <fitzpatrickr@microsoft.com>
Co-authored-by: Robert Fitzpatrick <robertfitzpatrick@Roberts-MacBook-Pro.local>
Co-authored-by: Richard Lundeen <rlundeen@microsoft.com>
Co-authored-by: Roman Lutz <romanlutz13@gmail.com>
Co-authored-by: Richard Lundeen <rlundeen@microsoft.com>
Co-authored-by: Richard Lundeen <rlundeen@microsoft.com>
Co-authored-by: hannahwestra25 <hannahwestra@microsoft.com>
Co-authored-by: Varun Joginpalli <varunj@microsoft.com>
…rosoft#1326)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: romanlutz <10245648+romanlutz@users.noreply.github.com>
Co-authored-by: Roman Lutz <romanlutz13@gmail.com>
…oft#1275)

Co-authored-by: Richard Lundeen <rlundeen@microsoft.com>
romanlutz and others added 26 commits March 10, 2026 07:03
When branching into a new conversation or copying to a new conversation
within the same attack, the conversations panel now opens automatically
so users can see and navigate between conversations.

Added setIsPanelOpen(true) to handleCopyToNewConversation and
handleBranchConversation handlers, plus 2 new tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When a new attack is created, capture the active target as attackTarget
so the cross-target guard fires if the user switches targets mid-
conversation. Previously attackTarget was only set when loading
historical attacks, so switching targets during a new attack was
not blocked.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When a previously generated video is carried over to a new conversation
(via copy/branch) and sent with a text prompt, the backend now
auto-resolves the video_id from the original piece's metadata and sets
it on both the text and video_path pieces. This enables seamless video
remixing without requiring the frontend to manage video_id metadata.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The frontend now carries prompt_metadata (including video_id) through
the full pipeline: backend response → MessageAttachment → outgoing
request. This ensures video_id is properly set on both text and video
pieces when remixing, without relying solely on the backend fallback.

Changes:
- Add metadata field to MessageAttachment type
- Add prompt_metadata to BackendMessagePiece and MessagePiece DTOs
- Preserve prompt_metadata in pieceToAttachment mapper
- Include prompt_metadata in attachmentToMessagePieceRequest
- Auto-set video_id on text piece in buildMessagePieces when video
  attachment with metadata is present
- Include prompt_metadata in backend pyrit_messages_to_dto_async mapper

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Victor Valbuena <vvalbuena@microsoft.com>
Co-authored-by: Spencer Schoenberg <23708360+spencrr@users.noreply.github.com>
The video target's _validate_video_remix_pieces was stripping
video_path pieces from the message in-place before the normalizer
stored the request. This meant the user's sent message only showed
the text piece, not the video attachment. The stripping was unnecessary
since the target only uses video_id from prompt_metadata for remix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Richard Lundeen <rlundeen@microsoft.com>
isMediaDataType() now includes 'binary' so that binary_path pieces
(PDFs, Word docs, etc.) are rendered as file attachments rather than
being dumped into the text content area.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The backend expects the query parameter 'label' (repeatable key:value)
but the frontend type definition used 'labels'. The caller in
AttackHistory.tsx was already using 'label' correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…r attacks

FastAPI parses ?converter_types= as [''], not []. The service treats
[] as 'only attacks with no converters' but [''] would try to match
a converter named ''. Now empty strings are stripped at the route level.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
show_logs() used the 'tail' command which doesn't exist on Windows.
Now reads last N lines and polls for new content in pure Python.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Aligns with all other timestamp fields in the API which use datetime.
Pydantic handles ISO 8601 serialization automatically.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previously _sign_blob_url_async returned URLs unchanged if they already
had a query string. This meant stored blob URLs with expired SAS tokens
(e.g. video input pieces carried over from prior conversations) would
never get fresh tokens. Now the old query string is stripped and a fresh
SAS is always generated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1. Add activateTarget() helper that navigates to Config, sets a target
   active by type, and returns to Chat. Called in beforeEach so all
   seeded tests have an unlocked UI (fixes 'no active target' issue).

2. Fix video/audio assertions in assertSeededAssistant() to use
   data-testid='video-error'/'audio-error' fallback elements instead
   of looking for <video>/<audio> tags that fail to render with
   invalid test base64 data.

3. Fix branch button test ID from 'branch-btn-1' to 'branch-conv-btn-1'
   to match the actual data-testid in MessageList. Also scope
   'new-conversation-btn' click to the conversation-panel to avoid
   strict mode violation with duplicate testids.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Address all 17 PR review comments from hannahwestra25
- Rename InputBox to ChatInputArea, extract banner sub-components
- Extract AttackHistory sub-components (FiltersBar, Table, Pagination)
- Extract styles to separate .styles.ts files
- Make ConnectionBanner presentational, move logic to App.tsx
- Merge Navigation button styles with data-active attribute
- Simplify role mapping, add clearAttackState helper
- Wrap CreateTargetDialog in <form> element
- Add braces to all braceless if-returns in ChatWindow

- Expand GUI documentation with full feature coverage and screenshots
- Fix all mock e2e tests (button names, strict mode, no-target state)
- Fix all seeded e2e tests (target activation, panel idempotency, media assertions)
- Add history filtering e2e tests (type, outcome, operator, reset, pagination)
- Add create target dialog e2e tests (full flow, validation)
- Add theme toggle e2e test
- Add unit tests to meet all coverage thresholds (93.5% stmts, 85.7% branches, 90.7% functions, 96.4% lines)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jbolor21 jbolor21 marked this pull request as draft March 15, 2026 19:00
@jbolor21 jbolor21 closed this Mar 15, 2026
@jbolor21
Copy link
Copy Markdown
Author

made PR in wrong place my bad :)

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.