Draft: Add support for local zip files
Description
For #38
Implemented using codex.
Prompt used
Goal: Add a UI choice between downloading the build (current behavior) or selecting a local .zip, using two separate buttons. Keep changes to the minimum number of files. No translations/i18n work.
Repo/context:
- CWD: /home/rajk/Work/projects/eos-installer
- Likely files to touch: index.html, viewManager.js (avoid touching anything else unless absolutely necessary)
Current behavior (important):
- The app checks device info and then automatically starts downloading the build (there is no “manual start download” button today).
- There’s no existing local-file selection flow.
- I previously “hacked” this by pointing the downloader at a local HTTPS server URL that serves a local zip; that works, so the post-download pipeline is OK.
Required UX change:
- After device info verification completes, DO NOT auto-start download.
- Instead, show two buttons in the same area where “download” is currently represented:
1.Download build → continues the existing download flow (should behave exactly like the old auto-download path, just triggered by this button).
2.Use local ZIP → opens a file picker restricted to .zip.
Local ZIP requirements:
- After the user selects a zip file, run the same verification/processing steps that currently happen AFTER the download finishes (i.e., skip only the network download portion, but keep everything else).
- If the user cancels, do nothing and keep the two-button state.
- If a non-zip is selected, show a simple error message (English only) and do not proceed.
Implementation constraints:
- Minimal diff and minimal refactor: adjust the existing flow/state machine as little as possible.
- Prefer implementing the picker via a hidden <input type="file" accept=".zip"> in index.html and wiring it in viewManager.js, unless the codebase already uses an Electron/native dialog.
- Reuse existing “post-download” handler(s) by feeding them the selected file path/blob in the closest supported format (avoid duplicating install/verify logic). If the current code only accepts a URL, adapt it in the smallest way to also accept a local file (or create a minimal local-file codepath that calls the same downstream function).
Acceptance criteria:
- Device info verification still runs as before.
- After verification, the app waits for a user choice (no automatic download).
- Download build produces the same outcome as before.
- Use local ZIP + selecting something.zip proceeds through the same post-download verification/install pipeline.
- Only the minimum number of files changed; list the changed files at the end.
Deliverable:
-Make the changes directly in the repo and briefly explain what you changed in each file.
Screenshots
Technical details
Tests
Issues
10 commandments of code review
Closes #38
Edited by Raj Khemani


