Repository navigation
fix(website): show a busy line while a settings import archive is checked - #24842
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. Both screenshots show the new busy line and the dimmed picker, and the blind reader read the line correctly as "a busy line saying the app is checking the file I uploaded". Notes
[UX-REVIEWED] ea92966 Description read[DESCRIPTION-READ] 1868953fc1140a7daae709d78c55717903c8e96615d3ae1e30d16e09e6a0bf5c That sha256 names everything this verdict read: the PR description, plus the 5 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (2 items) — 2 justifiedIntent: let someone restoring a large Settings export see that the archive is being checked, not a page that looks frozen. FIX (#24799).
[FIRST-PRINCIPLES-REVIEWED] ea92966 Description read[DESCRIPTION-READ] 85d7986708d73603e63dd1ec14a6c563c880075b1eb59f670aca3ee6a1a1ec6a That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change is a small, reversible busy-state fix with rendered evidence attached. [DESIGN-REVIEWED] ea92966 Description read[DESCRIPTION-READ] 3f5132ff6b80f06c0611dbcc922fe684bf77fd734fb999a2384ca58c4db095d3 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
1ccd861 to
5d9cbfd
Compare
5d9cbfd to
ea92966
Compare
|
Review-ready at ea92966: PR Readiness passed (107 checks, 0 failing), label |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (15 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: shows a busy status line and disables the file input while a settings import archive is checked; locale strings and tests.
Problem / Motivation
Goal: While Settings import checks a chosen archive, the user sees that work is in progress instead of a page that looks frozen.
After you pick a zip on the Import card, the dashboard sends it to
/api/portability/previewand waits. Until that answer comes back, nothing on the card changes: the Import button just stays disabled. A large archive (about 200 MB in the report) takes several minutes, so the page looks stuck or broken.Why it matters
People who see no feedback for minutes retry the pick or close the page, which restarts or abandons a slow check. Anyone restoring a large export hits this.
Not a goal
What changed (motivation → approach → change)
The card had no state for "the archive is being checked", so it had nothing to draw. The card now tracks that state for as long as the preview request is open, whether it succeeds, is refused or fails on the network.
While it is set, a muted status line with a spinning icon appears under the buttons: "Checking the archive... A large file can take a few minutes." The file picker is disabled during the check, so a second pick cannot start an overlapping check whose older answer could replace the newer file's preview.
Options considered, smallest picked:
Loader2spinner, like the card's own "Importing..." lineThe line reuses the existing pattern: lucide
Loader2withanimate-spin, as inReleasesPanelandImportSessionItem. The dashboard has no shared spinner component, so none was added. The new stringchecking_archiveis added to every catalog underwebsite/src/i18n/locales/;en-XAis regenerated withnpm run i18n:pseudo.Backwards compatibility
Compatible: the change only adds a status line and disables the file picker while a check is open; every request and response is unchanged.
Removes nothing: no field, route, key or behaviour is taken away.
Tests
PortabilityTab.test.tsx› "shows a busy line while the chosen archive is checked, and clears it after": holds the preview request open, asserts therole="status"line and its text, that the picker and Import button are disabled, then answers and asserts the line is gone and both controls are enabled. It fails on the parent commit (no line is drawn).catalogParity.test.tspasses with the new key in every locale.Determinism: both new tests passed 10 of 10 repeats with
--sequence.shuffle, and the wholePortabilityTab.test.tsxfile (44 tests) passed in shuffled order. The tests wait on a promise the test itself resolves; there are no timers or sleeps.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Scoped vitest (
PortabilityTab*,catalogParity), eslint on both changed files,tsc -p tsconfig.app.json, semgrep (diff-scoped) and the flake-pattern ratchet run locally. The new test was run against the parent'sPortabilityTab.tsxand failed as expected.Local GPT/Opus review did not run: host memory was too low to start the reviewers. Self-review notes instead:
finally, so success, a refusal and a network error all end it (the refusal path has its own test).Screenshots / video
The Import card while a chosen archive is being checked (Settings → Imports, built dist on an isolated loopback dev gateway; the preview request was held open so the state stays on screen). The spinner line sits under the Choose file / mode / Import row, styled like the existing "Importing..." line; Choose file is dimmed and Import stays disabled.
Light:
Dark:
Related Issues
Closes #24799
Sibling sweep
Swept: git grep -n "portability/preview|accept=".zip" -- website/src
Siblings: none -- the preview request and the zip picker exist only in PortabilityTab.tsx; the chat import (ImportSessionItem.tsx) already shows a Loader2 spinner while busy.
Pattern harvest
Not generalizable: a single async request that had no busy state; the dashboard already uses one busy pattern elsewhere.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)