Skip to content

UI - Ability to Annotate multiple traces at once within a Project#5193

Open
buildingvibes wants to merge 1 commit intocomet-ml:mainfrom
buildingvibes:feature/bulk-annotate-traces
Open

UI - Ability to Annotate multiple traces at once within a Project#5193
buildingvibes wants to merge 1 commit intocomet-ml:mainfrom
buildingvibes:feature/bulk-annotate-traces

Conversation

@buildingvibes
Copy link
Copy Markdown

Summary

Resolves #1010

/claim #1010

  • Adds a new "Annotate" bulk action button (MessageSquarePlus icon) to the traces/spans action panel toolbar
  • Clicking the button opens a BulkAnnotateDialog that displays all configured feedback definitions (numerical, boolean, categorical)
  • Users can set scores for any combination of feedback definitions, then apply them all at once to every selected trace/span
  • The dialog shows a loading state while scores are being applied and displays a success toast on completion

How it works

  1. Select multiple traces/spans using the existing checkbox selection in the table
  2. Click the new "Annotate" button in the toolbar (appears next to the "Add tags" button)
  3. In the dialog, set feedback scores using the same input controls as the single-trace annotation sidebar (numerical inputs, boolean toggles, categorical selects/toggles)
  4. Click "Apply to N traces" to submit all scores to all selected traces

Implementation details

  • New component: BulkAnnotateDialog in apps/opik-frontend/src/components/pages-shared/traces/BulkAnnotateDialog/
  • Modified component: TracesActionsPanel - added the annotate button and dialog integration
  • Reuses the existing useTraceFeedbackScoreSetMutation hook for applying scores (same API as single-trace annotation)
  • Supports all three feedback definition types: numerical, boolean, and categorical
  • Follows the same dialog pattern as AddTagDialog and other bulk action dialogs in the codebase
  • Uses the existing FeedbackScoresEditor UI patterns (ColoredTagNew, DebounceInput, ToggleGroup, SelectBox) for consistent look and feel

Test plan

  • Select multiple traces in a project, verify the "Annotate" button becomes enabled
  • Open the dialog, verify all feedback definitions from Configuration are displayed
  • Set a numerical score, verify it appears in the scores to apply
  • Set a boolean score (true/false toggle), verify it works
  • Set a categorical score, verify the dropdown/toggle works
  • Clear a score using the X button, verify it is removed
  • Click "Apply", verify scores are applied to all selected traces
  • Verify the success toast shows the correct count
  • Verify the dialog closes after successful application
  • Verify scores appear on each trace's feedback scores column
  • Test with spans view as well (not just traces)
  • Verify the button is disabled when no traces are selected

🤖 Generated with Claude Code

…oject

Add the ability to select multiple traces/spans and annotate them all at
once with feedback scores. This adds a new "Annotate" button to the traces
action panel that opens a dialog where users can set feedback scores from
their configured feedback definitions. All selected scores are applied to
every selected trace/span.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR]: UI - Ability to Annotate multiple traces at once within a Project

1 participant