Repository navigation
Add opt-in receive confirmation to omdrop-core - #123
marselnenaj wants to merge 3 commits into
Conversation
|
Thanks for the draft PR. "Ask First" is a useful feature, and the core of it holds up: approval is checked again on Before marking ready1. With Do Not Disturb on, every request is declined without being shownThe notification uses Choose the behaviour on purpose and test it on stock Omarchy:
2. Anyone in range can close a prompting connection
We reproduced it with a scratch test: approver sleeping 1.5 s, The defaults are 64 connections, 8 per peer, so in Everyone mode this takes about eight source addresses. Only one connection can prompt at a time, so it is safe to call Should fix3. Approval from Auto-Accept carries over into Ask First
Either set the flag only when the approver returned 4. A mixed files-and-links Ask stores links the user never saw
A second, end-to-end test ran the real Build the prompt from what accepting the Ask will actually do. For a links Ask, list the link hosts. Alternatively, refuse an Ask that mixes both kinds in Ask First mode. 5. Terminal changes to the mode don't refresh the panel
Suggestions
Hardware tests before marking readyYour list (Accept, Decline, dismiss, timeout, links, Auto-Accept) covers the main paths. Please also record:
What we ran
|
|
Thanks for the detailed review and reproductions. The five findings are addressed in da65fdf and 7303c73:
Sender cancellation now releases the pending prompt early. Closing the native notification also declines promptly: Local validation: 539 Rust tests passed, 1 existing ignored; 418 Python tests passed; Clippy with I also checked the installed receiver under its real systemd restrictions using localhost and the live Omarchy daemon with stock delivery rules. Under DND, the prompt remained visible; a concurrent Ask received 503; dismissal returned 403 in 0.552 s; an unanswered request returned 403 after 30.038 s. Late replies were refused. An Accept command delivered after toast closure still succeeded. No Upload was sent in these checks, and DND was restored afterwards. An iPhone trial on the preceding test build produced Ask 200, Upload 200, and a saved file; the owner reports that Accept and Decline appear to work. Exact model/iOS details and the expanded Apple-device matrix remain outstanding, including the new dismissal behavior, sender-side timeout/status presentation, cancellation, and two real senders. I am keeping this draft until that evidence is available rather than treating synthetic clients as Apple interoperability proof. The GitHub Tests and Core (Rust) workflows are currently |
|
All five findings and both suggestions from the first review are fixed at
Items 1 and 5 are covered by your own tests, and we read the code paths for both. Should fix1. Approval doesn't limit what the upload containsThe prompt shows the Ask First is still worth shipping, since it stops unsolicited transfers. But the prompt describes what the sender claims, not what will land in Downloads, and a user may reasonably read it as the second. Do one of these:
2. Refusals that aren't the user's choice leave no trace
Before merge
Suggestions
Hardware testsYour list is complete for the design you chose. Please add:
What we ran
We approved the Tests and Core (Rust) runs for |
7303c73 to
1a29aac
Compare
|
We rebased this branch onto The conflicts were all version numbers:
No code changed. The only other difference: the At The two should-fix items from the second review and the hardware tests are still open. If you rebuild your test package, use this head. |
Incoming files and links are currently accepted automatically while Omdrop is visible. This adds opt-in Ask First to omdrop-core, with Accept and Decline before a transfer is accepted. Auto-Accept remains the default.
Choose either mode in the panel or with
omdrop receive-mode ask|auto. The setting is saved atomically and read by the running Rust receiver. The Python fallback keeps its existing behavior and does not display this control.Receiver and desktop behavior
omarchy-notification-sendand its native action buttons. Its defaultomarchy-actionidentity remains visible under Do Not Disturb. Other desktops retainnotify-send --wait;libnotifyis an optional dependency for that fallback.omdrop receive-answer TOKEN accept|decline. A fresh 128-bit token addresses one socket in a private, user-owned runtime directory. Replies cannot create requests; normal completion removes the socket, and the service cleans up the directory on stop. Late clicks cannot approve another transfer.files/linksAsks before prompting or writing. Link prompts show destination hosts; file prompts show the count, reported aggregate size (or unknown), and a bounded name preview.Peer text is bounded, escaped, and passed as separate arguments without shell evaluation. A pending decision has a 30-second deadline and ends earlier on disconnect; closing the notification can take up to two additional seconds. Existing connection, archive-member, byte-budget and free-space limits remain in force. Reply tokens grant no access outside the receiver's private runtime directory.
Core is 0.1.13, the plugin minimum core version is 0.1.13, and the updated package revision is 3. The service grants write access only to the dedicated reply directory in addition to its existing writable paths.
Validation
cargo test --locked --workspace: 539 passed, 1 existing ignored.cargo clippy --locked --workspace --all-targets -- -D warnings: passed.cargo fmt --all --checkandgit diff --check: passed.main: 417 passed.Manual desktop integration used a temporary Rust receiver on localhost only and the live Omarchy notification service, whose delivery rules match stock
Delivery.js. With Do Not Disturb enabled, the native request appeared in the live notification store asomarchy-action; nothing was saved before approval. Running the displayedreceive-answeraction command produced Ask 200 and Upload 200 with the exact synthetic payload. A late reply failed. The original DND state was restored. A follow-up loopback probe closed the actual Omarchy notification through its D-Bus API: Ask returned 403 in 0.559 seconds, no file was stored, and a late acceptance failed. The Accept/upload probe also passed after this change. These synthetic checks exercise the native action command and notification delivery, not a physical GUI click or Apple timeout compatibility.The installed, packaged receiver was then checked through localhost under its real systemd service restrictions (including the private runtime directory). With DND enabled, its prompt stayed live; a second concurrent Ask returned 503. Closing the first notification returned 403 in 0.552 seconds and revoked late replies. A valid Accept command delivered 100 ms after notification closure still returned 200, exercising the action-command grace period. An unanswered request returned 403 after 30.038 seconds and also revoked late replies. These checks sent no Upload body and saved no file in Downloads. DND was restored afterwards.
GitHub-hosted Tests and Core (Rust) runs for this fork commit are currently
action_required, awaiting maintainer approval. They have not executed; the passing results above are local checks. The re-review label workflow was skipped.These changes address the five findings in the review, plus the item-summary and sender-cancellation suggestions.
Hardware and remaining validation
Development machine: M1 MacBook Air, BCM4378 (14e4:4425), kernel 7.1.12-2-20261017.20-sep-ARCH, brcmfmac-awdl-dkms 0.10.5-1, Omarchy 4.5.0-3, Qt 6.12.0, Quickshell 0.3.2.r7.g2b4501a-1. Firmware: BCM4378/3, 18.20.383.15.7.8.150 (FWID 01-b37727a5), recorded during initial development.
The revised Rust receiver is now provisioned on the development machine for Apple-device testing: local omdrop-core 0.1.13-3.1 test package, debug profile, commit 7303c73. Binaries and the polkit policy were installed through pacman at their fixed root-owned package paths; no checkout-built root helper was executed as root. Ask First is enabled; visibility is bounded by a 15-minute test window. The user has now tried Accept and Decline from an iPhone and reports that both appear to work. The live receiver journal confirms a refused Ask (403), plus an accepted Ask (200) followed by Upload 200 and a saved file. Another accepted Ask did not have a subsequent upload; these observations establish a successful transfer, not a success-rate or timeout claim. The sender reports only the generic model string iPhone; exact model and iOS version remain to be confirmed. These phone trials used the preceding 0.1.13-2.1 test build; dismissal handling in 0.1.13-3.1 still needs a phone retest. Automated tests and the earlier synthetic desktop probe did not drive the live radio.
Draft pending real iPhone/Mac validation: Accept, Decline, dismissal, timeout, links, Auto-Accept, native button clicks, DND, sender cancellation, and two simultaneous senders. Also record each device/OS, how long it waits for Ask, and its presentation of 403 versus 503. Synthetic TLS clients establish enforcement but do not establish Apple timeout compatibility. Desktop-specific toast sizing is outside this PR.