Skip to content

feat(import): progress bar + quiet expected "not found" misses - #139

Merged
itabajah merged 1 commit into
mainfrom
feat/import-progress-and-quiet-404s
Jul 7, 2026
Merged

feat(import): progress bar + quiet expected "not found" misses#139
itabajah merged 1 commit into
mainfrom
feat/import-progress-and-quiet-404s

Conversation

@itabajah

@itabajah itabajah commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Two import follow-ups from live testing: make slow imports feel like they're working, and stop expected failures from spamming the console.

1. Progress feedback (the "make it look like it's really working" ask)

runBatchIcsImport now reports per-semester progress (Preparing… → each semester name → Done). The Fetch Data tab renders it:

  • Bulk import → a real determinate progress bar with Winter 2024-2025 · 2/8, advancing as each semester lands.
  • Single fetch → an indeterminate sweeping bar, so an unknown-duration fetch clearly shows activity.

New ProgressBar component — monochrome, theme-aware, and static under prefers-reduced-motion.

2. Quiet expected "not found" misses

A missing Cheesefork semester returns 404. Previously the client treated that like any failure and fell through to the public proxies, which sprayed the console with CORS errors for a file that simply doesn't exist. Now:

  • The proxy chain short-circuits on an authoritative 404 (flagged notFound) instead of trying the rest — so no fallback CORS spam, and bulk imports over ranges with gaps are faster (one request per missing semester instead of six).
  • The worker + dev proxy report a not-found as a 200 + X-Proxy-Status: 404 header rather than a bare 404, so the browser doesn't log its own error for an expected miss. The client reads the header and skips quietly.

Net effect: a bulk import over a wide range no longer fills the console with red — expected misses are silent, and only genuine errors surface.

Verification

Gates green locally: typecheck, lint (0 warnings), format, 953 tests (+6: proxy short-circuit ×2, batch progress, ProgressBar ×3), build, 234 KB gzip.

Note: browser-level logging can't be suppressed from JS, so the fix works by avoiding the failed requests (short-circuit) and not returning error statuses for expected misses (the 200 + header) — that's why expected misses now produce zero console output while real errors still do.

🤖 Generated with Claude Code

Two import UX/robustness follow-ups from live testing:

1. Progress feedback. runBatchIcsImport now reports per-semester progress
   (Preparing → each semester → Done); the Fetch Data tab shows a real
   determinate progress bar for bulk imports and an indeterminate one for a
   single fetch, so a slow import clearly looks like it is working. New
   ProgressBar component (monochrome, reduced-motion aware).

2. Quiet expected misses. A missing Cheesefork semester returns 404; the
   client now short-circuits the proxy chain on an authoritative 404 rather
   than falling through to the public proxies (which sprayed the console with
   CORS errors for a file that isn't there) — this also speeds up bulk imports
   over ranges with gaps. The worker and dev proxy report a not-found as a
   200 + `X-Proxy-Status: 404`, so the browser never logs its own error for an
   expected miss.

Gates green: typecheck, lint, format, 953 tests, build, 234 KB gzip.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@itabajah
itabajah merged commit 15b92a6 into main Jul 7, 2026
2 checks passed
@itabajah
itabajah deleted the feat/import-progress-and-quiet-404s branch July 7, 2026 09:59
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.

1 participant