fix: annotation queue related issues#4333
Conversation
…estset synchronization logic
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis PR enhances evaluator resolution and scenario export logic across the annotation system. It introduces ChangesEvaluator Resolution and Export Handling
🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly Related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…on, add trace handling
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 123f19ed-9e06-4f76-b009-1dda1f76036b
📒 Files selected for processing (9)
web/packages/agenta-annotation-ui/src/components/AnnotationQueuesView/cells/EvaluatorNamesCell.tsxweb/packages/agenta-annotation-ui/src/components/AnnotationSession/AnnotationFormField.tsxweb/packages/agenta-annotation-ui/src/components/AnnotationSession/ScenarioListView.tsxweb/packages/agenta-annotation-ui/src/components/AnnotationSession/index.tsxweb/packages/agenta-annotation/src/state/controllers/annotationFormController.tsweb/packages/agenta-annotation/src/state/controllers/annotationSessionController.tsweb/packages/agenta-annotation/src/state/testsetSync.tsweb/packages/agenta-annotation/src/state/types.tsweb/packages/agenta-entities/src/evaluationRun/state/molecule.ts
| function getEvaluatorEntryKey(entry: EvaluatorEntry) { | ||
| return entry.evaluatorId ?? entry.evaluatorRevisionId ?? entry.evaluatorSlug ?? "unknown" | ||
| } |
There was a problem hiding this comment.
Dedup and React keys should prioritize evaluatorRevisionId (not evaluatorId).
Current key precedence merges multiple revisions under one evaluator ID, so distinct evaluator revisions can disappear from the cell/tooltip list.
Suggested fix
function getEvaluatorEntryKey(entry: EvaluatorEntry) {
- return entry.evaluatorId ?? entry.evaluatorRevisionId ?? entry.evaluatorSlug ?? "unknown"
+ if (entry.evaluatorRevisionId) return `rev:${entry.evaluatorRevisionId}`
+ if (entry.evaluatorId) return `id:${entry.evaluatorId}`
+ if (entry.evaluatorSlug) return `slug:${entry.evaluatorSlug}`
+ return "unknown"
}
@@
- const key = col.evaluatorId ?? col.evaluatorRevisionId ?? col.evaluatorSlug
+ const key =
+ (col.evaluatorRevisionId && `rev:${col.evaluatorRevisionId}`) ||
+ (col.evaluatorId && `id:${col.evaluatorId}`) ||
+ (col.evaluatorSlug && `slug:${col.evaluatorSlug}`) ||
+ nullAlso applies to: 45-46, 73-73, 95-95
| function stripOutputSuffix(value: string | null): string | null { | ||
| if (!value) return null | ||
| const parts = value.split(".").filter(Boolean) | ||
| if (parts.length < 2) return value | ||
| return parts.slice(0, -1).join(".") || value | ||
| } |
There was a problem hiding this comment.
stripOutputSuffix is over-stripping non-output names.
This removes the last segment for any dotted string, so valid values like quality.score become quality. That can mis-derive evaluatorSlug and break downstream matching.
Suggested fix
function stripOutputSuffix(value: string | null): string | null {
if (!value) return null
const parts = value.split(".").filter(Boolean)
if (parts.length < 2) return value
- return parts.slice(0, -1).join(".") || value
+ const last = parts.at(-1)?.toLowerCase()
+ if (last !== "output" && last !== "outputs") return value
+ return parts.slice(0, -1).join(".") || value
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| function stripOutputSuffix(value: string | null): string | null { | |
| if (!value) return null | |
| const parts = value.split(".").filter(Boolean) | |
| if (parts.length < 2) return value | |
| return parts.slice(0, -1).join(".") || value | |
| } | |
| function stripOutputSuffix(value: string | null): string | null { | |
| if (!value) return null | |
| const parts = value.split(".").filter(Boolean) | |
| if (parts.length < 2) return value | |
| const last = parts.at(-1)?.toLowerCase() | |
| if (last !== "output" && last !== "outputs") return value | |
| return parts.slice(0, -1).join(".") || value | |
| } |
Railway Preview Environment
|
Fixed: