feat(import): progress bar + quiet expected "not found" misses - #139
Merged
Conversation
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>
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.
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)
runBatchIcsImportnow reports per-semester progress (Preparing…→ each semester name →Done). The Fetch Data tab renders it:Winter 2024-2025 · 2/8, advancing as each semester lands.New
ProgressBarcomponent — monochrome, theme-aware, and static underprefers-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:
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).200+X-Proxy-Status: 404header 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