feat(run-detail): Add score summary and AI notes - #283
Open
kaapi-agent-bot[bot] wants to merge 1 commit into
Open
kaapi-agent-bot[bot] wants to merge 1 commit into
kaapi-agent-bot[bot] wants to merge 1 commit into
Conversation
…etail page Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Closes #271
Summary
OverallScoreCardoverall_score,verdictbadge, and per-metricbreakdown.AiSummaryNoteai_summaryis present.OverallScoreandScoreBreakdownIteminNewScoreObjectV2.getOverallScore,getAiSummary, andgetVerdictColor.Checklist
Before submitting a pull request, please ensure that you mark these task.
npm run devandnpm run buildin the repository root and test.Original PR description
Closes #271
What changed
v2 evaluation runs carry
score.overall(a weighted rollup) and anai_summarydiagnostic string, but neither was rendered on the run detail page. This adds:OverallScoreCard— new card rendered at the top of the run detail page (above Metrics Overview) showingoverall_score, averdictbadge, and the per-metricbreakdown(name, score, weight, delta, verdict) as a grid of chips.AiSummaryNote— a diagnostic note rendered above the per-row "Detailed Results" table whenai_summaryis present.OverallScore/ScoreBreakdownItemonNewScoreObjectV2, plusoverall?: OverallScore | nullandai_summary?: string | nullfields.getOverallScore,getAiSummary, andgetVerdictColorinapp/lib/utils/evaluation.ts, reusing the existingstatus-success/status-warning/status-error/status-defaultdesign tokens.Graceful degradation
overallabsent (v1 runs, or before the backend populates it):OverallScoreCardsimply isn't rendered — no error, no empty card.ai_summaryisnull/absent: the diagnostic note isn't rendered.Assumptions
Since this run can't reach the backend to confirm the exact v2 response contract, I inferred the shape from the issue text and existing `NewScoreObjectV2ig fields:
score.overallis shaped as{ overall_score: number; verdict: string; breakdown: { name: string; score: number; weight: number; delta?: number | null; verdict: string }[] }. Thenamefield on each breakdown item (to label it, e.g. againstCorrectness/Cosine/etc.) isn't explicitly listed in the issue but is needed to render each metric — please confirm the actual field name if it differs (e.g.metricinstead ofname).verdictvalues are free-form strings (e.g.pass/fail/warning/excellent/etc.);getVerdictColormaps a small known set to success/warning/error styling and falls back to a neutral "default" style for anything else, so unknown values still render sensibly.ai_summaryis a plain string (not markdown) and is rendered as-is inside the note.Test plan
npm run lintpasses (no new errors; only pre-existing warnings elsewhere)npm run buildpasses