Skip to content

fix(website): show a busy line while a settings import archive is checked - #24842

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/settings-import-validating-spinner
Oct 27, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/settings-import-validating-spinner

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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/preview and 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

  • A real progress bar or percentage. The preview endpoint returns one answer at the end and reports no progress, so a bar would have nothing true to show.
  • Making the server-side check faster.
  • Changing the import step itself, which already shows "Importing...".

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:

Option Picked
Inline status line with Loader2 spinner, like the card's own "Importing..." line yes
Spinner inside the Import button no: the button means "import", not "check"
Blocking modal no: no modal exists in this flow, and it hides the card

The line reuses the existing pattern: lucide Loader2 with animate-spin, as in ReleasesPanel and ImportSessionItem. The dashboard has no shared spinner component, so none was added. The new string checking_archive is added to every catalog under website/src/i18n/locales/; en-XA is regenerated with npm 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 the role="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).
  • "clears the busy line when the check is refused": a 400 refusal leaves no busy line and re-enables the picker.
  • catalogParity.test.ts passes with the new key in every locale.

Determinism: both new tests passed 10 of 10 repeats with --sequence.shuffle, and the whole PortabilityTab.test.tsx file (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's PortabilityTab.tsx and failed as expected.

Local GPT/Opus review did not run: host memory was too low to start the reviewers. Self-review notes instead:

  • The busy state clears in finally, so success, a refusal and a network error all end it (the refusal path has its own test).
  • The Import button needs no change: it is already disabled until a preview arrives.
  • Disabling the picker during a check means a wrong pick cannot be swapped until the check answers. That trade keeps an older answer from replacing a newer file's preview.
  • Unmounting mid-check only drops a state update, which React ignores.

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:

Import card checking the archive, light

Dark:

Import card checking the archive, 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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 27, 2026 09:57
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 27, 2026
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of ea929667789e93f414080533627073efd2dd44c0 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Dark theme: the reader "can't tell whether 'Choose file' and 'Import' are switched off during the check", and found the busy line "very dim and easy to miss". On a dark background opacity-60 on the picker label barely shows, so use a stronger disabled treatment there, such as text-muted on the label.
  • The busy line doesn't say which file is being checked. Naming it would tell a user they picked the right archive while they wait several minutes, for example "Checking e.zip… A large file can take a few minutes."

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of ea929667789e93f414080533627073efd2dd44c0 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (2 items) — 2 justified

Intent: let someone restoring a large Settings export see that the archive is being checked, not a page that looks frozen. FIX (#24799).

  1. A status line with a spinner, "Checking the archive... A large file can take a few minutes.", shows under the Import row while the preview request is open — justified
  2. The Choose file picker is dimmed and disabled while a check is open — justified

[FIRST-PRINCIPLES-REVIEWED] ea92966

Description read

[DESCRIPTION-READ] 85d7986708d73603e63dd1ec14a6c563c880075b1eb59f670aca3ee6a1a1ec6a

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of ea929667789e93f414080533627073efd2dd44c0 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed ea929667789e93f414080533627073efd2dd44c0 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] ea92966

Verdict parsed from the review's SHA-scoped output markers for commit ea929667789e93f414080533627073efd2dd44c0.

False positive or not applicable? A repository writer can comment:
/ai-review override fable ea929667789e93f414080533627073efd2dd44c0 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of ea929667789e93f414080533627073efd2dd44c0 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] ea92966

False positive or not applicable? A repository writer can comment:
/ai-review override gpt ea929667789e93f414080533627073efd2dd44c0 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 27, 2026
@iamwhatever
iamwhatever force-pushed the fix/settings-import-validating-spinner branch from 1ccd861 to 5d9cbfd Compare October 27, 2026 11:38
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 27, 2026
@iamwhatever
iamwhatever force-pushed the fix/settings-import-validating-spinner branch from 5d9cbfd to ea92966 Compare October 27, 2026 12:51
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased onto main d069596, which carries #24774 (the fix for the main red in #24765 that failed Backend Tests (Windows) (2) here). No code change in this PR; PortabilityTab and catalogParity tests re-run green locally. CI re-running on ea92966.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 27, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Review-ready at ea92966: PR Readiness passed (107 checks, 0 failing), label readiness: passed, mergeable, base fresh (green_age: main moved in no file this PR touches). Design, First Principles and UX lanes PASS; GPT and Opus lanes fresh; no unresolved threads. Waiting on a maintainer review. Not merged, approved or set to auto-merge.

@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) October 27, 2026 15:07

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@KiroCrewCaptain
KiroCrewCaptain merged commit 4f79cdf into main Oct 27, 2026
108 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/settings-import-validating-spinner branch October 27, 2026 15:10
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 27, 2026
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.

Settings import: show a progress indicator (spinner/modal) while the zip is being validated

2 participants