Skip to content

fix(computers): show route and config sharing status in context - #205

Merged
nixuuu merged 1 commit into
devfrom
fix/linked-routes-status
Nov 5, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/linked-routes-status

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 5, 2026

Copy link
Copy Markdown
Member

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

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

A linked computer that dialled this one showed its routes as amber
failures while the link was connected. The gateway dials only when no
link exists, so failures from an earlier attempt stayed recorded and were
shown without context.

- The overview now says how the link runs (connection_direction:
  outgoing, incoming, both) and which route an outgoing link uses
  (ComputerRoute.in_use). The card shows "Connected · incoming", the
  route "In use · 4 ms", and a failed route while connected "Not needed
  while connected · failed 14 minutes ago". Amber only while the link is
  down.
- Announced addresses the partner no longer announces become old
  addresses (migration 0081, withdrawn_at): tried last, never a warning,
  and removed once a current route works or after 7 days. An empty list
  (listener off, shutdown) marks nothing old.
- Addresses that change during a handshake are announced right after it;
  before, that announcement was skipped and the partner kept the stale
  address.
- Config sharing names the computer that needs an update
  (config_update_node_id, from both sides' capabilities): "Laptop B runs
  0.2.0-nightly.65 and needs an update to share configuration." or "This
  computer needs an update to share configuration." The switch shows
  this computer's choice and stays usable; "Sharing starts after the
  update." / "Sharing stays off after the update."

Pinned TLS, owner scoping and address validation are unchanged.

Related: #35, #157
@nixuuu
nixuuu merged commit 026dabc into dev Nov 5, 2026
9 checks passed
@nixuuu
nixuuu deleted the fix/linked-routes-status branch November 5, 2026 17:13
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