Skip to content

fix(ui): failed uploads reachable from the browser; keep uploadId (#187) - #219

Merged
amar-python merged 2 commits into
mainfrom
claude/issue-187-failed-uploads-reachable
Nov 9, 2026
Merged

amar-python merged 2 commits into
mainfrom
claude/issue-187-failed-uploads-reachable

Conversation

@amar-python

Copy link
Copy Markdown
Owner

Fixes #187.

Problem

An all-failed upload has no migrated file, and the Review link was built only from migrated files (f.upload_id). So a reviewer had no way, from the browser, to reach the stored rows and validation errors of an upload that failed (BR-25). The upload-response schema also dropped the returned uploadId.

Change

  • Upload responses keep uploadId on every outcome (ok, duplicate, invalid structure, error).
  • New "Upload attempts" card on the home page, fed by the existing GET /api/csv/uploads (every attempt, failed included, so no backend change). Each row has a status badge, the failed-row count and a Review link. A filter, on by default, shows only failed or partly failed uploads.
  • Rejected uploads (empty or header-only files) get no Review link, since nothing was stored to review.
  • The home loader refetches the attempts together with the files list, so a failed upload shows up straight after it happens.

Tests

  • upload-attempts.test.tsx: uploadId survives success, partial and all-failed responses; an all-failed upload is listed with a Review link; clean imports are hidden until the filter is turned off; rejected has no link; nothing is rendered with no attempts.
  • files-refresh.test.ts updated: the loader now makes two requests, and the test checks the attempts list refetches too.
  • vitest 164/164, tsc clean. Lint: only the existing Prettier baseline in the dense index.tsx style; the new test file is clean.
  • Not checked in a real browser, only in vitest.

Merges cleanly with #188 in either order. React stopgap: the Streamlit migration plan is #212, whose spike picker already lists every attempt.


Generated by Claude Code

An all-failed upload has no migrated file, and review links were built
only from migrated files, so a reviewer had no way from the browser to
reach its stored rows (BR-25). The upload-response schema also dropped
the returned uploadId.

- Upload responses keep uploadId on every outcome (ok, duplicate,
  invalid, error).
- New "Upload attempts" card, fed by the existing GET /api/csv/uploads
  (every attempt, failed included): status badge, failed-row count,
  "only failed or partial" filter (on by default) and a Review link.
- The home loader refetches the attempts with the files list, so a
  failed upload shows up straight after it happens.

Stopgap on the React screen until the Streamlit migration (#212).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011T6Wqi8yaiaYWUVH8C4QAY
Keeps this branch's import edit off the line #188 also changes, so the two merge in either order.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011T6Wqi8yaiaYWUVH8C4QAY
@amar-python
amar-python marked this pull request as ready for review November 9, 2026 10:31
@amar-python
amar-python merged commit 8e6aaa0 into main Nov 9, 2026
3 checks passed
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.

RV-F10 (BR-25): failed uploads unreachable through normal browser review flow

2 participants