All checks were successful
Build & Test WASM / build-and-test (push) Successful in 1m43s
3.5 KiB
3.5 KiB
TODO
Done
- Device detection proof of concept (File System Access API)
- Serial prefix → model mapping (verified against official Kobo help page)
- Architecture planning (fully client-side WASM, no backend)
- Installed Go via Homebrew (v1.26.1)
- Verified all kobopatch tests pass natively + WASM
- Created
kobopatch-wasm/with setup.sh, build.sh, go.mod, main.go - WASM wrapper compiles successfully (9.9MB)
- GitHub/Gitea CI workflow (build + test)
- Patch UI: loads patches from zip, parses YAML, renders toggles
- PatchGroup mutual exclusion (radio buttons)
- Full app flow: connect → detect → configure patches → upload firmware → build → write/download
- Patches served from
src/public/patches/withindex.jsonfor version discovery - JSZip for client-side zip extraction
- Renamed
src/frontend→src/public(webroot) - Moved
patches/intosrc/public/patches/ - Manual mode fallback for non-Chromium browsers (model + firmware version dropdowns)
- Auto-download firmware from Kobo's servers (CORS confirmed working)
- Firmware download URLs hardcoded per device prefix and version
- Firmware download URL displayed in build step for user verification
- Fixed CRLF line ending bug in patch YAML parser
- Copy
kobopatch.wasm+wasm_exec.jstosrc/public/as part of build - Progress reporting: download % with MB, WASM log output in terminal window
- WASM
patchFirmwareaccepts optional progress callback (4th arg) - Verified patched binaries are byte-identical between native and WASM builds
- Web Worker for WASM patching (non-blocking UI, live progress)
- Cache-busting timestamp on WASM file (
?ts=query string) - Matched log output to native kobopatch (no debug spam from patchfile.Log)
- Step navigation: 3-step indicator (Device → Patches → Build) with back/forward
- Discrete steps with proper state management
- Scrollable patch list (50vh max height with border)
- Toggleable patch descriptions (hidden by default,
?button) - UI polish: renamed to "KoboPatch Web UI", styled firmware URL, patch count hint
- Disambiguated identical model names in dropdown (serial prefix suffix)
To Test
- End-to-end test in browser with real Kobo device (auto mode)
- Verify File System Access API write to
.kobo/KoboRoot.tgz - Test manual mode flow across Firefox/Safari/Chrome
Remaining Work
- Better error messages for common failures
- Test with multiple firmware versions / patch zips
Future / Polish
- Host as static site (GitHub Pages / Netlify)
- NickelMenu install/uninstall support
- Dark mode support
Architecture Change Log
- Switched from PHP backend to fully client-side WASM. Reason: avoid storing Kobo firmware files on a server (legal risk).
- Patches served from zip files in
src/public/patches/. App scanspatches/index.jsonto find compatible patch zips for the detected firmware. - Firmware auto-downloaded from Kobo's CDN.
ereaderfiles.kobo.comservesAccess-Control-Allow-Origin: *, so directfetch()works. User no longer needs to provide firmware manually. URLs hardcoded inkobo-device.js. - Web Worker for WASM.
Moves patching off the main thread so progress updates render live during the build.
patch-worker.jsloadswasm_exec.js+kobopatch.wasm, communicates viapostMessage.