fix(scholars): improve validation, fix delete, add status badges #48

Merged
JustinZeus merged 5 commits from fix/scholar-validation-delete-refinement into main 2026-03-07 16:11:07 +01:00
JustinZeus commented 2026-03-07 14:26:33 +01:00 (Migrated from github.com)

Summary

  • Better validation: Extracted parsing logic to scholar-batch-parsing.ts with per-ID error feedback, URL edge case handling, and corruption detection
  • Fix delete: Added proper error handling for CASCADE failures in delete_scholar() (409 response instead of 500)
  • Status badges: New ScholarStatusBadges component showing Pending/Failed/Partial/OK status on scholar list rows and settings modal
  • Dashboard failure info: Shows failed_count and partial_count in latest run summary (hidden when zero)

Includes cherry-picks from feat/live-scholar-progress-counter:

  • Run/cancel buttons visible to all users
  • Hours interval + PDF queue for all users

Test plan

  • Add scholar with valid ID → succeeds, shows "Pending" badge
  • Add scholar with garbage input → clear per-ID error messages
  • Delete a scholar (with publications) → removed from list, no error
  • After a run with failures → dashboard shows failure count, scholar list shows warning icons
  • Run npm run test:run (123/123 pass)
  • Run ruff check . + ruff format --check . (all pass)
  • Run backend unit tests for validators

🤖 Generated with Claude Code

## Summary - **Better validation**: Extracted parsing logic to `scholar-batch-parsing.ts` with per-ID error feedback, URL edge case handling, and corruption detection - **Fix delete**: Added proper error handling for CASCADE failures in `delete_scholar()` (409 response instead of 500) - **Status badges**: New `ScholarStatusBadges` component showing Pending/Failed/Partial/OK status on scholar list rows and settings modal - **Dashboard failure info**: Shows `failed_count` and `partial_count` in latest run summary (hidden when zero) Includes cherry-picks from `feat/live-scholar-progress-counter`: - Run/cancel buttons visible to all users - Hours interval + PDF queue for all users ## Test plan - [ ] Add scholar with valid ID → succeeds, shows "Pending" badge - [ ] Add scholar with garbage input → clear per-ID error messages - [ ] Delete a scholar (with publications) → removed from list, no error - [ ] After a run with failures → dashboard shows failure count, scholar list shows warning icons - [ ] Run `npm run test:run` (123/123 pass) - [ ] Run `ruff check .` + `ruff format --check .` (all pass) - [ ] Run backend unit tests for validators 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No description provided.