Repository navigation
feat(computers): sync account settings across linked computers - #157
Merged
Merged
Conversation
nixuuu
force-pushed
the
feat/linked-shared-config-1
branch
from
November 5, 2026 12:22
36d6281 to
c199188
Compare
nixuuu
force-pushed
the
feat/linked-shared-config-1
branch
from
November 5, 2026 14:43
c199188 to
ab88c3e
Compare
nixuuu
marked this pull request as ready for review
November 5, 2026 14:43
nixuuu
added a commit
that referenced
this pull request
Nov 5, 2026
Settings → Linked computers no longer shows amber route failures for a
computer that is connected, and the configuration sharing note says
which computer needs an update.
**Why routes showed "Failed" while connected**
- A gateway dials a partner only when it has no link to it. When the
partner dialled first, failures from an earlier dial pass (for example
while the partner slept or restarted) stayed stored, and the UI showed
them in amber whatever the link status.
- The listener port is stable, but two gaps around announced addresses
also existed:
- announced addresses were never retired;
- addresses that changed during a handshake were not re-announced.
**What the card shows now**
- **Status:** "Connected · incoming" when only the partner dialled.
- **Routes:**
- the route the outgoing link runs over: "In use · 4 ms";
- a failed route while the link is up, in neutral tone: "Not needed
while connected · failed 14 minutes ago";
- amber only while the link is down.
- **Old addresses:** an address the partner no longer announces gets an
"Old address" badge. It is tried last, and it is removed once a current
route works or after 7 days. An empty announcement (listener off) marks
nothing as old. Changed addresses are announced right after the
handshake.
**Configuration sharing**
- The capability check was right: `config_sync` first shipped in
nightly.67, so a nightly.65 partner cannot share yet. The note now names
the computer:
- "{name} runs 0.2.0-nightly.65 and needs an update to share
configuration."
- "This computer needs an update to share configuration."
- The switch shows this computer's saved choice and stays usable. A line
that is always there says "Sharing starts after the update." or "Sharing
stays off after the update.", so nothing moves. Turning it off while
waiting needs no confirmation.
**Contracts**
- Proto (additive): `LinkedComputer.connection_direction` (26),
`config_update_node_id` (27), `ComputerRoute.in_use` (7) and
`withdrawn_at_ms` (8).
- Migration `0082_computer_route_withdrawn`, renumbered after #204's
0081.
**Tests**
`tests/integration/linked-routes-status.test.ts`:
- an incoming-only link with failed outgoing routes;
- the dialling side marks its route "In use";
- a reconnect clears a route's failure;
- a partner on a new port, where the old address is marked, tried last,
then removed;
- a re-announced address that loses the "Old address" badge.
`config-sync.test.ts` checks that both sides name the older computer.
The `lan-routes` and `linked-computers` tests pass. `check:tmp`: 1348
passed, 0 failed.
**Checked** in a browser with two gateways and fixture names and
addresses: light and dark, desktop and phone, with long names and
addresses.
**Copy audit (§8)**
- "Connected · incoming", "In use · 4 ms" and "Not needed while
connected · failed …".
- "Old address".
- The update notes and "Sharing starts / stays off after the update."
- One idea per sentence, active voice, and failures always say "Failed",
not colour alone.
Related: #35, #157
nixuuu
added a commit
that referenced
this pull request
Nov 5, 2026
Linked computers now show the real provider status of each other's workers, and no longer report equal shared settings as conflicts. **1. A remote worker's instance status was dropped** (introduced by #176) On each Mac, the other computer's worker showed only "Available", with no auth, version or connection details. So each Mac looked as if the other used the device login, though both used the proxy. - **Fix:** overview snapshots and updates carry the home worker's report: auth kind, CLI version, effective connection kind (with per-worker overrides) and check time. - **Older peer:** a peer that does not send the report gets an explicit "unavailable" status instead. **2. Conflicts were recorded for equal values** (introduced by #164) Conflict detection compared stored representations: - re-encrypted secrets, whose ciphertext differs on each computer; - proxy aliases; - defaults versus explicit values. So almost every field looked different. It now compares effective values: the secret plaintext inside the gateway, canonical proxy aliases and effective defaults. HLC ordering is unchanged, and a reused clock with a different value is still rejected. **3. Stale notices stayed open** (introduced by #157) Notices whose values have converged are now dismissed automatically, including stored legacy notices and after a restart. Real conflicts keep Restore and Dismiss. No migration is needed. **Tests:** 8 new regression tests across two linked gateways: - remote provider rows on both sides; - identical encrypted values give no notice; - a real divergent edit gives exactly one notice; - convergence clears notices, also after a restart; - version skew and clock ties. `check:tmp`: 1406 passed, 0 failed. **Checked** in a browser with two linked gateways: light and dark, desktop, narrow and phone width, with long names, real conflict notices and automatic clearing. **Copy audit (§8):** explicit unknown states, sentence case, no duplicated "Proxy" label, and no meaning carried by colour alone. **After updating both Macs:** both provider rows should show Proxy with auth, version and check time, and the equal stale notices should disappear. `native` stays the instance id; "Proxy" names its connection. Fixes: #176 Fixes: #164 Fixes: #157
This was referenced Nov 13, 2026
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.
Stage 1 of 7 of shared configuration across linked computers. The design is in
docs/linked-computers.md("Konfiguracja", "Udostępnianie per łącze", "Konkretny protokół: wspólna konfiguracja"). This stack stays a draft until all stages are done.Sync engine
config_itemsholds per-field versions with hybrid logical clocks; the latest change wins per field.config_historykeeps the losing values. A notice offers Restore or Dismiss.ConfigSyncService.WatchConfigsends changes over the existing mTLS link: first catch-up from a cursor, then a live stream, with a full resend when a peer's cursor is too old. Each computer passes on what it merged, so the group converges.config_synccapability handles version differences.Account settings are the first shared kind. Existing opt-in settings data (0050) is converted.
Per-link "Share configuration"
Migration:
0073_config_sync. All proto changes are additive.Tests: gateway↔gateway integration with three databases:
Copy audit (
docs/copy.md§8): the per-item "Share with linked computers" text is replaced with per-link and group text. Statuses: "Configuration up to date", "Syncing configuration…", "Needs an update to share configuration".