more accurate sync progress report

This commit is contained in:
olcxja 2026-10-01 14:58:58 +02:00
commit c0f6e802ed
12 changed files with 390 additions and 63 deletions

View file

@ -23,7 +23,8 @@ src/ main process (Node/Electron backend)
paths.js portable layout, FILES-relative path helpers, translation sync
i18n.js translation loading + {0} placeholder filling
preload.js contextBridge API exposed to the renderer
lansync.js LAN sync: identity + pairing, hashing, HTTP receiver, UDP discovery
lansync.js LAN sync: identity + pairing, hashing, HTTP receiver (with its
receive-progress hook), UDP discovery
lansyncpush.js the pushing side (createPusher factory, keeps helper state out)
appicon.js window/taskbar icon
renderer/ UI (plain HTML/CSS/JS, no framework)
@ -66,7 +67,12 @@ handlers in src/ipc/. Keep new APIs in that pattern.
the flex gap of the container, not per-element magic numbers.
- LAN sync has two sides: the receiver lives in lansync.js, the sender in
lansyncpush.js and is built by createPusher(helpers) - several launcher
states share the module, so nothing may be kept in its module scope.
states share the module, so nothing may be kept in its module scope. Both
sides report their own progress (the receiver through the onReceive hook),
so each machine can show the transfer.
- A modal showing a running operation (a sync) opens locked:
showModal(html, { locked: true }) ignores the backdrop and Escape, because
the user cannot cancel the operation by dismissing it.
- Tests are plain assert-by-print scripts (see test/): set PLWL_BUILD_DIR to
a temp dir, check(), exit 1 on failure. Add one when fixing a bug.
@ -76,5 +82,6 @@ handlers in src/ipc/. Keep new APIs in that pattern.
node --check <changed js files> # syntax
node test/import.test.js # ...and the other test files
node test/lansync.test.js # LAN sync contract (identity, pairing, mirror)
node test/lansync-receiving.test.js # receive-side progress events (the popup)
npm start # click through the flow you touched
```