Skip to content

feat(upload): post-upload validation report and diff (#110)#138

Merged
William-Hill merged 2 commits intomainfrom
feat/issue-110-upload-validation-report
May 3, 2026
Merged

feat(upload): post-upload validation report and diff (#110)#138
William-Hill merged 2 commits intomainfrom
feat/issue-110-upload-validation-report

Conversation

@William-Hill
Copy link
Copy Markdown
Collaborator

Epic

Advances #124 (AASCU Spring 2026 convening follow-ups) by shipping a concrete slice of #110.

What shipped

  • Richer commit APIPOST /api/admin/upload/commit returns row-level issues (line + optional column + message), totals, truncation flags, diff vs previous upload of the same schema (file_type), and timestamps.
  • Persisted report — Supabase migration adds upload_history.validation_report JSONB. Insert uses it when present; falls back to the legacy 8-column insert if the column is missing (42703).
  • UI — Upload complete step shows summary, comparison to prior upload, 50%+ swing warning, scrollable error table, Download report (CSV).
  • Testslib/__tests__/upload-validation-report.test.ts for diff + CSV.

Not in this PR (remaining #110 / #124 scope)

  • Field-level coercion log, dedup narrative, PDF/email, student-level add/drop diff (would need keyed row comparison against DB).
  • Apply the migration in each environment: supabase/migrations/20260503140000_upload_history_validation_report.sql.

Closes #110
Related #124

Made with Cursor

William-Hill and others added 2 commits May 3, 2026 14:42
Extends POST /api/admin/upload/commit with full row-level errors (capped),
comparison to the last upload of the same schema, and optional JSONB
validation_report on upload_history (migration + 42703 fallback).

Completes a first slice of epic #124 AASCU follow-ups: human-readable report
after upload, downloadable CSV, baseline for richer coercion/dedup later.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extract insertUploadHistoryRow, pg 42703 guard, uploadStatus helper;
centralize swing threshold constant; trim upload summary and step JSX.

Co-authored-by: Cursor <cursoragent@cursor.com>
@William-Hill William-Hill merged commit ba5b924 into main May 3, 2026
2 checks passed
@William-Hill William-Hill deleted the feat/issue-110-upload-validation-report branch May 3, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: upload validation report — row-level errors, coercions, and diff vs. last upload

1 participant