1
0
Files
kobopatch-webui/wip/todo.md
Nico Verbruggen 1af67eea4e
All checks were successful
Build & Test WASM / build-and-test (push) Successful in 2m45s
WIP
2026-03-15 22:31:07 +01:00

2.9 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/ with index.json for version discovery
  • JSZip for client-side zip extraction
  • Renamed src/frontendsrc/public (webroot)
  • Moved patches/ into src/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.js to src/public/ as part of build
  • Progress reporting: download % with MB, WASM log output in terminal window
  • WASM patchFirmware accepts optional progress callback (4th arg)
  • Verified patched binaries are byte-identical between native and WASM builds

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

In Progress

  • Web Worker for WASM patching (avoid blocking UI, enable live progress)
    • patch-worker.js created, not yet wired up

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 scans patches/index.json to find compatible patch zips for the detected firmware.
  • Firmware auto-downloaded from Kobo's CDN. ereaderfiles.kobo.com serves Access-Control-Allow-Origin: *, so direct fetch() works. User no longer needs to provide firmware manually. URLs hardcoded in kobo-device.js.
  • Web Worker for WASM (in progress). Moves patching off the main thread so progress updates render live during the build.