Skip to content

v1.19.0: configurability, wire-protocol fixes, modularization - #34

Merged
bethropolis merged 13 commits into
mainfrom
dev/next
Sep 18, 2026
Merged

bethropolis merged 13 commits into
mainfrom
dev/next

Conversation

@bethropolis

Copy link
Copy Markdown
Owner

Release v1.19.0. dev/next is 12 commits ahead of main:

  • feat(config): v1.19 configurability (network, reconnect, discovery, cache, pairing)
  • P0 wire-protocol compatibility: stock pairing verification codes, SMS v2 schema with numeric read flags, battery state-request answers, telephony cancel/missed-call tolerance, manual-dial TargetDeviceID, side-channel idle abort, per-device status table, notification dismiss from desktop
  • refactor: modularize oversized packages into focused files (refactor: modularize oversized packages into focused files #33), reconciled with the above fixes

Gates green locally (vet, unit, integration -race, lint, static build). Awaiting CI.

…ache, pairing)

- TCP plumbing: listener and identity advertise cfg.TCPPort; reconnect\n  falls back to cfg.TCPPort when LastPort unknown (UDP discovery stays 1716)\n- [network] dial_timeout/handshake_timeout/sidechannel_timeout; shared\n  transport.DialSidechannel replaces 4 per-plugin dialers (setup-only\n  timeout, payload streaming unbounded, pin verification preserved)\n- [reconnect] initial_backoff/max_backoff/flap_threshold (overflow-safe)\n- [discovery] broadcast_interval/broadcast_idle_interval\n- [pairing] intent_ttl + listen_timeout (CLI client deadline = listen\n  timeout + 10s headroom, overflow-clamped)\n- [cache] sms_attachments_dir/album_art_dir/contacts_dir overrides\n- [notifications] app_name reserved key; Filters() excludes it\n- config.Duration helper; Load validates positivity and ordering\n- tests across config/daemon/device/discovery/ipc/cmd; docs + example
Regression for the AfterFunc variant considered mid-review: a Handle-scoped\ncontext dies when the packet handler returns, while download goroutines\ncontinue streaming. ctx now bounds establishment only; pin the behavior.
Sort public-key DERs larger-first, append the initial request's ASCII
timestamp for protocol v8, and display the first 8 hex chars uppercased,
so the code shown by kcd pair matches the phone. Accept, reject and
unpair packets no longer carry a fresh timestamp that would split the
two sides' codes; the request generates and stores one timestamp and
sends exactly what it stores.
Stock message apps read only messageBody with the recipient list in
addresses and require version 2; the previous flat phoneNumber payload
made the phone transmit a blank text. Inbound message batches carry the
SQLite read column as 0/1, which strict bool decoding rejected and
dropped whole threads — a shared tolerant boolean now covers both
numeric and string spellings.
Stock peers request our battery with request:true inside a regular
battery packet; the empty body decoded as a 0% not-charging update and
wiped the real charge. Requests are now answered with the local state
and never reach UpdateBattery, and the connect-time probe uses the
packet shape stock peers honor.
Stock phones end calls with isCancel as the string "true", which
strict bool decoding rejected and left the ringing state stuck, and
report missed calls as missedCall, which matched nothing. Both
spellings are now accepted and missedCall feeds the standard missed
event so existing watchers keep working.
Dismissals previously had no send path, so clearing a notification here
left it standing on the phone. A new notify_dismiss command flows from
the dismiss CLI through the daemon to a cancel request packet, and the
matching desktop popup closes with it.
Transfers streamed with no deadline at all, so a phone leaving Wi-Fi
mid-file left io.Copy blocked until TCP keepalive gave up minutes
later. Streams now carry an activity deadline that renews on every
read and write — slow links run as long as they make progress, dead
ones fail fast — governed by network.transfer_idle_timeout, with
corrupt partials removed on failure.
Connect-by-IP stamped the placeholder "manual" into the pre-TLS
identity's targetDeviceId, and stock phones drop any pre-TLS identity
addressed to another device. Unknown targets now omit the field
entirely, which peers treat as broadcast, and the dial uses the
configured TCP port instead of a hardcoded one.
The status summary knew only counts, forcing a second command for
anything about a device. The daemon now reports each known device
with its state, address, cached battery and last-seen time, and the
CLI renders it as an aligned, sectioned table with the plugin
inventory counted.
fix: P0 wire-protocol compatibility + status table
* refactor(battery): split plugin into types, handle and local files

* refactor(systemvolume): split plugin into types, handle and backend files

* refactor(mousepad): split plugin into types, dispatch and input files

* refactor(pair): split plugin into types, handle and actions files

* refactor(share): split plugin into types, handle and send files

* refactor(sms): split plugin into types, handle, attachment and send files

* refactor(notification): split plugin into types, handle, icon, desktop and actions files

* refactor(clipboard): split plugin into types, backend, handle and push files

* refactor(contacts): split plugin into types, request, store, sync and vcard files

* refactor(sftp): split plugin into types, handle, request and mount files

* refactor(mpris): split plugin into core, types, handle, local, remote, art and telephony files

* refactor(device): split device into core, session, telemetry and discovery files

* refactor(discovery): split into controller, broadcaster, listener and mdns files

* refactor(ipc): extract watch stream handler into server_watch.go

* refactor(config): split config into core, validate and store files

* refactor(daemon): split transport into dial, handshake and reconnect files

* refactor(client): split client by domain into focused files

* refactor(cli): extract mpris parse and format helpers

* refactor(cli): extract pair commands into cli_pair.go

* chore(merge): port dev/next bugfixes into refactor split files

Carry the P0 wire-protocol fixes across the file split so no behavior
regresses: battery request/Request field, clipboard/sms partial cleanup,
notification Dismiss, pair timestamp-seeded verification codes, share
sidechannel options, SMS v2 schema with FlexBool read flags.
- sidechannel_test: use ListenConfig.Listen instead of net.Listen.
- telephony missed-call test: plugin notifies via a background
  goroutine that can outlive the test; give it a detached Nop
  logger so late writes cannot panic the test runner.
@bethropolis
bethropolis merged commit 013a33d into main Sep 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant