Skip to content

Add storage balloon pre-check with actionable error messages because browsers lie about storage space availability. - #231

Closed
nelsonjchen wants to merge 4 commits into
commaai:masterfrom
nelsonjchen:codex/storage-balloon-test
Closed

nelsonjchen wants to merge 4 commits into
commaai:masterfrom
nelsonjchen:codex/storage-balloon-test

Conversation

@nelsonjchen

@nelsonjchen nelsonjchen commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Browsers can report enough available storage while still failing when a large flash image is written to persistent site storage. This adds a storage reservation check as the first step in the existing flashing flow, before device selection.

If the check fails, the UI gives focused recovery guidance:

  1. Use a regular browser window rather than Incognito, InPrivate, or Private mode.
  2. Free at least 6 GiB of device storage.
  3. Review site-data permissions at chrome://settings/content/siteData, including settings that delete data when the browser closes.
  4. Fully quit and reopen the browser, then retry.
  5. If none of those steps work, try again from an Android phone running Chrome while following the same requirements.

The existing skip action remains available for users who know they can proceed. Holding Shift while skipping exposes the failure UI for testing.

Screenshot

Context

Validation

  • pnpm exec vitest run src/utils/image.test.js src/app/App.test.jsx
  • pnpm run build

Implementation note

The existing image-size estimate is not sufficient on its own because browser storage APIs can overstate what the page can actually reserve.

@nelsonjchen nelsonjchen changed the title Add storage balloon pre-check Add storage balloon pre-check with actionable error messages Aug 23, 2026
@nelsonjchen

Copy link
Copy Markdown
Contributor Author
image

@nelsonjchen

Copy link
Copy Markdown
Contributor Author

Needs a refactor to unslop. too many lines.

@nelsonjchen
nelsonjchen force-pushed the codex/storage-balloon-test branch from 976a0cf to a7dba0d Compare August 24, 2026 06:07
@nelsonjchen

Copy link
Copy Markdown
Contributor Author

Hints for people testing: Ask your agent to make a sparse file to load some weight. It's a lot faster than making a real file to chew space.

@nelsonjchen

Copy link
Copy Markdown
Contributor Author
image

meh, still a lot of lines so idk. Anyways, if someone wants to follow up with theiir own spin that is smaller, let me know. In the meantime, I'll be passing my fork of the flasher around with this error message until then.

@nelsonjchen

Copy link
Copy Markdown
Contributor Author

instances where this helped where a user's hdd was full

https://discord.com/channels/469524606043160576/1540488202127806494/1540519057323720754

@nelsonjchen nelsonjchen changed the title Add storage balloon pre-check with actionable error messages Add storage balloon pre-check with actionable error messages because browsers lie about storage space availability. Sep 6, 2026
@nelsonjchen
nelsonjchen force-pushed the codex/storage-balloon-test branch from a7dba0d to b6af59a Compare September 15, 2026 02:19
@nelsonjchen

Copy link
Copy Markdown
Contributor Author

Closing in favor of #233

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