Skip to content

feat: pair, discover, and manage display recovery from the manager - #11

Merged
jdvmi00 merged 2 commits into
developfrom
feature/pairing-and-recovery
Sep 6, 2026
Merged

feat: pair, discover, and manage display recovery from the manager#11
jdvmi00 merged 2 commits into
developfrom
feature/pairing-and-recovery

Conversation

@jdvmi00

@jdvmi00 jdvmi00 commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

Adds in-app pairing, computer discovery, and managed display recovery setup, plus launcher removal.

Discovery and pairing

  • Setup lists computers found through Tailscale (tailscale status --json) and on the LAN (avahi-browse _nvstream._tcp), merged by name, with platform, online state, and paired state.
  • Picking an unpaired computer or entering an address shows a PIN page and runs Moonlight's own moonlight pair HOST --pin PIN. Certificates and the client identity stay in Moonlight; the app reads the new host back from Moonlight's configuration. Refused while the Moonlight GUI is open.

Managed display recovery

  • macOS: follow the main display, or manage a chosen display with BetterDisplay, with displays and modes read over SSH.
  • Windows: console helper with SSH alias, host inspection (displays, Sunshine output, helper state), capture display choice, and helper installation from the app.
  • The check step also proves SSH and the chosen display, read-only.

Backend

  • New settings discover, pair, inspect, and install-helper commands; a Python setup module; a read-only list operation in the macOS adapter; Windows inspect and install functions.
  • SSH user, control socket, alias, and the default profile's display block become editable; everything else is preserved as before.
  • Also includes the daemon fix for a rebuilt binary breaking supervisor launches, and worker errors keeping their cause chain.

Manager

  • Add to or Remove from app launcher, based on whether the desktop entry exists.

Verification

  • python3 scripts/check.py, cargo fmt --check, cargo clippy --all-targets --locked -- -D warnings, cargo test --locked, cargo build --locked
  • python3 -m unittest discover -s tests -v (36 tests, including the new test_setup.py with fake tailscale, avahi-browse, moonlight, and pgrep)
  • python3 tests/integration.py -v (26 tests, including discover, pair, inspect through a fake ssh, and editable recovery fields)
  • ctest --test-dir build/ui (26 suites, including the demo pairing, inspection, helper install, and launcher removal flows, and smoke renders of the new pages)
  • Live read-only discovery run against this machine's Tailscale and LAN.

… causes

A daemon started from a binary that is later rebuilt sees its own
executable as deleted, so every supervisor launch failed with the bare
message "launch supervisor". The path is now resolved once at startup,
and worker errors keep their cause chain in the session record.
Setup
- Discover computers through Tailscale peers and Sunshine's mDNS
  announcements, merged by name, with platform, reachability, and whether
  Moonlight already paired them. Both tools are optional.
- Pair a host from the app with a PIN. Pairing runs Moonlight's own
  `moonlight pair` so certificates and the client identity stay in
  Moonlight; the result is read back from its configuration. Refused while
  the Moonlight window is open.
- Managed display recovery per platform: on macOS follow the main display
  or manage a chosen display with BetterDisplay, reading displays and modes
  over SSH; on Windows use the console helper with an SSH alias, host
  inspection, capture display choice, and helper installation from the app.
  The check step also proves SSH and the chosen display, read-only.

Backend
- `settings discover`, `settings pair`, `settings inspect`, and
  `settings install-helper` in the Rust CLI, backed by a new Python setup
  module, a read-only macOS display listing, and Windows inspection that
  reuses the shipped display enumerator over SSH.
- SSH user, control socket, and alias plus the default profile's display
  block are editable through settings get/save; other fields stay untouched.

Manager
- Discovery picker, pairing page, and display recovery section in setup.
- Add to or Remove from app launcher, reflecting the desktop entry's presence.

Tests and docs cover the new operations with fake tools on PATH.
@jdvmi00
jdvmi00 merged commit 1371c7c into develop Sep 6, 2026
3 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