feat(upload): post-upload validation report and diff (#110)#138
Merged
William-Hill merged 2 commits intomainfrom May 3, 2026
Merged
feat(upload): post-upload validation report and diff (#110)#138William-Hill merged 2 commits intomainfrom
William-Hill merged 2 commits intomainfrom
Conversation
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>
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.
Epic
Advances #124 (AASCU Spring 2026 convening follow-ups) by shipping a concrete slice of #110.
What shipped
POST /api/admin/upload/commitreturns row-level issues (line + optional column + message), totals, truncation flags, diff vs previous upload of the same schema (file_type), and timestamps.upload_history.validation_reportJSONB. Insert uses it when present; falls back to the legacy 8-column insert if the column is missing (42703).lib/__tests__/upload-validation-report.test.tsfor diff + CSV.Not in this PR (remaining #110 / #124 scope)
supabase/migrations/20260503140000_upload_history_validation_report.sql.Closes #110
Related #124
Made with Cursor