Repository navigation
feat(app): take pairing requests only for 3 minutes after the owner turns pairing on - #547
Merged
Merged
Conversation
The wrong-token lockout truncated its remaining wait like pairing did, so a client that waited as told was refused again. Both now share retryAfterSeconds, which rounds up.
…urns pairing on Devices could ask to pair whenever this device was shared. Pairing is now off until the owner turns it on in Settings › Sharing, which takes requests for 3 minutes, counted down there and in a banner on every other page, and ends early once a device is let in, the owner turns it off or sharing stops. Requests meanwhile get 403 pairing_closed, which the asking device explains. The Add device sheet now searches the local network as it opens on phones too, and its button reads Find on local network, so it is clear nothing is searched beyond the LAN.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2103638c38
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…lowed Allowing a device closed the pairing window, but requests already waiting could still be allowed after it, letting several devices in on one window. Allowing one now turns the others away.
Turning sharing on now also starts it with Ketch, and Stop sharing stops that too, so a device shared once stays reachable after a restart until it is stopped. The Start sharing when Ketch opens switch moves out of Advanced to the top of Settings › Sharing.
…evices control Ketch Pairing requests and Share when Ketch opens (renamed from Start sharing when Ketch opens) are now rows of the Pair a device card, shown while sharing runs, instead of cards of their own. Sharing texts said other devices control this Mac, when they only control Ketch on it; they now say so in every language (German, whose device noun is accusative, says they manage its downloads).
New code, and Rotate under Advanced, replaced the code at once, which disconnects every paired device and voids the pairing link and QR code. Both now ask first, with a Danger button; creating the first code still does not. Pairing requests now show below the Pair a device card, under the pairing controls they answer to.
Contributor
linroid
enabled auto-merge (squash)
October 14, 2026 02:48
linroid
disabled auto-merge
October 14, 2026 02:48
# Conflicts: # app/shared/src/commonMain/kotlin/com/linroid/ketch/app/ui/feedback/BannerHost.kt
A request that brought the owner to Sharing shows first again, above the Pair a device card.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #545, which was merged before these two commits were pushed.
Why
Since #545, devices on the LAN can ask to pair whenever this device is shared, and the owner answers in Settings › Sharing. Being shared should not mean always taking pairing requests: pairing is now something the owner turns on, briefly, when they mean to pair.
What changed
Pairing is off until the owner turns it on
PairingWindowGroup). Requests are taken for 3 minutes (PairingRequests.WINDOW), counted down there and in a banner on every other page ("Pairing is on for 2m 41s", with Show and Turn off).403 pairing_closedwithout asking the owner (KetchServer(pairingOpen = ...)), and these requests count against no address's backoff.RemotePairingreturnsPairingResult.Closed, and the asking device explains how to turn pairing on there.pairing=1whenever a device can pair. A device found while pairing is off gets the Closed message rather than being hidden.Finding devices on the local network
Server
Retry-Afterrounds the remaining wait up, as pairing's already does: a client that waited as told was refused again. Both now shareretryAfterSeconds.All new strings are translated into the ten languages. AGENTS.md and
docs/architecture.mdare updated.Testing
:library:server:test: pairing route refused while closed (no strike),retryAfterSecondsrounding:library:remote:jvmTest:pairingTurnedOff_isClosed:app:shared:jvmTest:PairingRequestsTest(window opens for 3 minutes, Allow closes it, Don't allow keeps it), toast and notification tests:app:desktop:test:app:android, iOS tests and:cliConnectSnapshots.pairingWindow_offAndCountingDownand the pairing banner inPulseUiSnapshots