[OPIK-5242] [OPIK-5248] [FE] fix: evaluation suite save failures and Result column truncation#5844
[OPIK-5242] [OPIK-5248] [FE] fix: evaluation suite save failures and Result column truncation#5844alexkuzmik wants to merge 3 commits intomainfrom
Conversation
…ersion and creation flows Fix two bugs in evaluation suite saving: 1. Editing a suite created with only a name would fail because buildPayload threw when latest_version was missing. Now handles no-version suites with a two-step save: create metadata version first, then apply item changes. 2. Creating a suite with items + assertions/policy failed because items were uploaded before criteria, causing the backend to reject base_version=null on a dataset that already had versions. Swapped the order to match the Python SDK: apply criteria first, then upload items. Implements OPIK-5242: [Evaluation suite] - issues during creating evaluation suite via UI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| const handleSaveChanges = (tags?: string[], changeDescription?: string) => { | ||
| if (changesMutation.isPending) return; | ||
|
|
||
| if (hasNoVersion) { | ||
| // Two-step save: create initial metadata version first, then apply | ||
| // item changes on top of it. The backend requires base_version=null | ||
| // with no items for the first version. | ||
| changesMutation.mutate( | ||
| buildInitialVersionPayload({ tags, changeDescription }), | ||
| { | ||
| onSuccess: (initialVersion) => { | ||
| const itemPayload = buildPayload({ |
There was a problem hiding this comment.
When hasNoVersion the second buildPayload call omits tags/changeDescription — should we pass them so the final version preserves user metadata?
Finding type: Logical Bugs | Severity: 🔴 High
Want Baz to fix this for you? Activate Fixer
Other fix methods
Prompt for AI Agents:
Before applying, verify this suggestion against the current code. In
apps/opik-frontend/src/v2/pages/EvaluationSuiteItemsPage/EvaluationSuiteItemsPage.tsx
around lines 200 to 225, the handleSaveChanges function (the hasNoVersion branch) builds
an itemPayload with buildPayload({ baseVersionOverride: initialVersion?.id }) but does
not pass the tags and changeDescription from the Add Version dialog. Refactor this by
calling buildPayload({ baseVersionOverride: initialVersion?.id, tags, changeDescription
}) so the second mutation includes the same metadata, ensuring the final version
preserves tags and changeDescription provided by the user. Keep the existing
conflict/onError handling the same.
There was a problem hiding this comment.
Commit 4864e55 addressed this comment by passing the tags and changeDescription into the second buildPayload call in the hasNoVersion flow, so the final version preserves the metadata from the Add Version dialog and the existing conflict handling remains unchanged.
|
🔄 Test environment deployment process has started Phase 1: Deploying base version You can monitor the progress here. |
…dPayload call Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Re: baz-reviewer comment about missing Fixed in 4864e55 — now passing 🤖 Reply posted via /address-github-pr-comments |
|
Got it, and thanks for addressing that—I'll save this to memory after the PR is merged so I can better recognize this pattern in future reviews. |
|
🔄 Test environment deployment process has started Phase 1: Deploying base version You can monitor the progress here. |
|
✅ Test environment is now available! To configure additional Environment variables for your environment, run [Deploy Opik AdHoc Environment workflow] (https://github.com/comet-ml/comet-deployment/actions/workflows/deploy_opik_adhoc_env.yaml) Access Information
The deployment has completed successfully and the version has been verified. |
…columns are enabled Add minSize: 140 to the pinned Result column so it cannot be compressed below its content width when all columns are visible. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🔄 Test environment deployment process has started Phase 1: Deploying base version You can monitor the progress here. |
|
❌ Test environment deployment failed The deployment encountered an error. Please check the deployment logs for details. |
|
❌ Test environment deployment failed The deployment encountered an error. Please check the deployment logs for details. |
|
✅ Test environment is now available! To configure additional Environment variables for your environment, run [Deploy Opik AdHoc Environment workflow] (https://github.com/comet-ml/comet-deployment/actions/workflows/deploy_opik_adhoc_env.yaml) Access Information
The deployment has completed successfully and the version has been verified. |
|
🌙 Nightly cleanup: The test environment for this PR ( |
|
🌙 Nightly cleanup: The test environment for this PR ( |
2 similar comments
|
🌙 Nightly cleanup: The test environment for this PR ( |
|
🌙 Nightly cleanup: The test environment for this PR ( |
Details
Fixes three bugs in the evaluation suite UI:
OPIK-5242 Case 1 — Editing a suite created with only a name:
buildPayloadthrew becausesuite.latest_versionwas undefined. Now detects the no-version state and performs a two-step save: creates an initial metadata-only version (evaluators + execution policy) first, then applies item changes using the returned version ID as base.OPIK-5242 Case 2 — Creating a suite with items + assertions/policy at once: Items were uploaded before evaluation criteria, so by the time
applyEvaluationCriteriaran withbase_version: null, the dataset already had a version (created by the item upload), causing a backend 400 rejection. Swapped the order to match the Python SDK: apply criteria first (creates the initial version), then upload items.OPIK-5248 — Result column truncated when all columns enabled: The pinned "Result" column in the experiment items table had no
minSize, allowing it to be compressed to unreadable widths. AddedminSize: 140to match the column's default size.Change checklist
Issues
AI-WATERMARK
AI-WATERMARK: yes
Testing
npx tsc --noEmit— no errorsDocumentation
N/A — Bug fixes only, no new configuration or features.