Skip to content

fix(backup): stop import spinner on arch rejection + reading-time Snackbar duration#40

Merged
luisguzman-adfa merged 2 commits into
mainfrom
fix/import-spinner-stop
Jun 24, 2026
Merged

fix(backup): stop import spinner on arch rejection + reading-time Snackbar duration#40
luisguzman-adfa merged 2 commits into
mainfrom
fix/import-spinner-stop

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

Two small UX fixes in the backup import flow.

1. Spinner stuck on rejection. When an imported rootfs is rejected (wrong arch / corrupt / not-a-rootfs), stopImportSpinner() was missing in that branch (it's present in the success and catch paths), so the braille spinner kept overwriting the button text every 90ms — the button looked stuck spinning forever. Now the spinner stops and the rejection ends cleanly.

2. Snackbar too short for long messages. Snackbar only offers SHORT/LONG (~2.75s); the arch-mismatch message is too long to read in time. Added util/SnackbarDuration (pure, unit-tested): ~200 wpm reading speed (320ms/word) + 1.5s base, clamped to [3s, 10s]. A showImportSnackbar() helper routes the import messages (rejection, manifest/checksum warnings, success, failure) through the computed duration. Example: the arch-mismatch text goes from 2.75s to ~6s; short ones stay at the 3s floor.

Verified locally: brace balance, SnackbarDurationTest passes (pure JVM).

On WRONG_ARCH/CORRUPT/not-rootfs the import is rejected, but stopImportSpinner()
was missing in that branch (it's present in the success and catch paths), so the
braille spinner kept running and overwrote the button text every 90ms — the
button looked stuck spinning forever. Stop the spinner so the rejection ends cleanly.
…ime)

Snackbar only offers SHORT/LONG; the arch-mismatch rejection text is too long to
read in LONG (~2.75s). Add SnackbarDuration (pure, unit-tested): ~200 wpm reading
speed + base, clamped to [3s, 10s]. Route the import Snackbars (rejection, manifest/
checksum warnings, success, failure) through a showImportSnackbar() helper that
sets the computed duration.
@luisguzman-adfa luisguzman-adfa changed the title Fix/import spinner stop fix(backup): stop import spinner on arch rejection + reading-time Snackbar duration Jun 24, 2026
@luisguzman-adfa luisguzman-adfa merged commit 3c70a0b into main Jun 24, 2026
1 check passed
@luisguzman-adfa luisguzman-adfa deleted the fix/import-spinner-stop branch June 24, 2026 04:55
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