feat: Add per-row regeneration to bulk evaluation ResultsTable#143
Conversation
Add per-row regenerate action to bulk evaluation results table: - Add regenerate button in each model output cell (visible on hover) - Create POST /api/bulk/rerun-result endpoint for single result rerun - Create GET /api/bulk/result endpoint for polling result status - Add loading state, toasts, and polling for real-time updates - Dispatch bulk-cell-regenerate custom event for parent handling The regenerate button appears on hover in the model output cells. Clicking it reruns evaluation for that specific row + model combination with loading feedback and toast notifications. Refs: beads-eval-3em
Code Review SummaryOverviewThis PR adds per-row regeneration functionality to the ResultsTable component. The implementation includes a new API endpoint ( Overall Assessment: The implementation is well-structured, follows project patterns, and includes comprehensive input validation and error handling. The code quality is good with only minor TypeScript warnings about unused parameters. Review StatusAPPROVED (Reviewer cannot approve own PR, posting as comment) Findings Summary
Quality Gates
Critical Issues (Must Fix)None Important IssuesNone Minor Issues (Follow-up Candidates)
Positive Highlights
Suggestions
Next Steps
Status: ✅ Approved for merge - implementation is secure, follows project standards, and includes appropriate error handling and accessibility features. |
|
✅ Code review approved by k2-dev Reviewer agent. The code has been reviewed and validated against project quality gates (AGENTS.md). Ready for merge. |
Summary
Add per-row regenerate action to bulk evaluation results table, enabling users to regenerate individual failed or outdated results without rerunning entire evaluations.
Type of Change
Related Issues
Closes eval-3em
Relates to eval-1d5 (StatusBadge component dependency)
Detailed Description
Changes Made
Technical Details
POST /api/bulk/rerun-result- Starts async regeneration with validationGET /api/bulk/result?result_id=xyz- Polls single result statusTest Coverage
Tests Added
Tests Ran
npm test)npm test -- tests/integration/)Test Results
Breaking Changes
Pre-commit Quality Gates
npm run lintpassesnpm run typecheckpassesnpm run format:checkpassesnpm testpassesnpm run buildsucceedsFiles Modified
src/components/bulk/ResultsTable.astro- Added regenerate button and event handlingsrc/pages/api/bulk/rerun-result.ts- New API endpoint for single result rerunsrc/pages/api/bulk/result.ts- New API endpoint for polling result statussrc/pages/bulk-eval/[id].astro- Added event listener and polling logicAdditional Context
Dependencies
@lib/db,@lib/utils/api-clients,@lib/api-error-handlerConfiguration Changes
Database Changes
row_resultstablePerformance Impact
Screenshots (if applicable)
Checklist
Implementation Notes