Dial the address mDNS resolved instead of the .local name - #232
Merged
Conversation
Addresses were the device identity: DHCP moved them, mDNS gave one box two names, and credentials keyed by address meant a device inheriting a recycled IP picked up the previous device's auth token. Devices now live in a registry keyed by an opaque recordId, with addresses demoted to endpoints hanging off the record. Credentials are stored under record:<recordId>, media and library caches namespace on the record key, and the device detail route takes a recordId rather than an address. Existing installs migrate once on hydrate: deviceHistory and deviceAddress become records, each carrying legacyCredentialKey so the old credential stays readable until the first authenticated connect re-keys it, after which both legacy Preferences entries are deleted. Migration is covered end to end, including the IPv6 normalisation change and corrupt-history recovery. Claude-Session: https://claude.ai/code/session_01MevSjtLDnHofR1Eub9vKGN
A device saved from a network scan keeps its `.local` hostname, which is the identity that survives a DHCP move. iOS WebSockets do not reliably bootstrap multicast resolution themselves, so connecting to that hostname could simply never come up. The provider now browses mDNS while the active record names a `.local` host, matches the announcement for that record on its service id (or hostname and port when it has none, never on an address — DHCP recycles those), and stores the resolved addresses on the endpoint. The socket and pairing dial the resolved address; the record still displays and stores the hostname, so the device is followed rather than duplicated when its IP changes. Browsing stops once the hostname is resolved on a live connection. Discovery is shared rather than exclusive now that two callers want it: the ZeroConf watch is owned by refcount, so the scan modal closing cannot stop the browse the connection provider still needs, and both see the same device cache. Also raises the licenses route test timeout — it renders the full production dependency list and was reaching the default 10s under a full parallel run. Claude-Session: https://claude.ai/code/session_01MevSjtLDnHofR1Eub9vKGN
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
A device saved from a network scan keeps its
.localhostname, which is the identity that survives a DHCP move. iOS WebSockets do not reliably bootstrap multicast resolution themselves, so connecting to that hostname could simply never come up.The provider now browses mDNS while the active record names a
.localhost, matches the announcement for that record on its service id (or hostname and port when it has none, never on an address — DHCP recycles those), and stores the resolved addresses on the endpoint. The socket and pairing dial the resolved address; the record still displays and stores the hostname, so the device is followed rather than duplicated when its IP changes. Browsing stops once the hostname is resolved on a live connection.Discovery is shared rather than exclusive now that two callers want it: the ZeroConf watch is owned by refcount, so the scan modal closing cannot stop the browse the connection provider still needs, and both see the same device cache.
Also raises the licenses route test timeout — it renders the full production dependency list and was reaching the default 10s under a full parallel run.
https://claude.ai/code/session_01MevSjtLDnHofR1Eub9vKGN