Skip to content

Reliable Linux window controls + resilient peer discovery#92

Merged
johnjazzi merged 4 commits into
mainfrom
dev
Jun 15, 2026
Merged

Reliable Linux window controls + resilient peer discovery#92
johnjazzi merged 4 commits into
mainfrom
dev

Conversation

@johnjazzi

Copy link
Copy Markdown
Contributor

Summary

Follow-ups after live-testing on the LAN.

Peer discovery — diagnosed and hardened

Tested mdns-sd live on the network: announce is visible to the system Bonjour stack (dns-sd -B), and the browser resolves other machines' shares cross-host (found two live shares at 192.168.1.217 on en0). The protocol/network are fine — the gap was app-side:

  • discovery.rs: update the discovered-peer registry unconditionally (was gated behind the app handle being cached), so a resolve landing before the frontend listener attaches is still recoverable. Emits stay best-effort. Added info logs.
  • store: pull the backend registry once on startup (live peers:found events aren't buffered, the registry is).
  • PeersPanel: refresh discovered peers on mount and show a count badge on the Discover tab, so peers are visible even while the default Favorites tab shows.

Linux window controls — reliable platform detection

navigator.platform is unreliable on WebKitGTK and could make isMac wrongly true → the macOS path fired on Linux (controls hidden, traffic-light padding). Platform now comes from Rust (std::env::consts::OS). Also added the frameless controls to the compact header (a narrow window drops the titlebar, leaving no min/max/close).

All 311 tests pass; cargo check clean.

🤖 Generated with Claude Code

john and others added 4 commits June 15, 2026 08:59
… header

Linux WebKitGTK reports navigator.platform unreliably, which could make isMac
wrongly true → the macOS code path fired on Linux (window controls hidden via
v-if="!isMac", traffic-light padding). Source the platform from Rust
(app_platform → std::env::consts::OS) and correct isMac on mount.

Also add the frameless window controls to the compact mobile-header: a narrow
window drops the titlebar, so on Linux/Windows there was previously no way to
minimize/close. macOS keeps native traffic lights.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e UI

Diagnosed live with mdns-sd on the LAN: announce is visible to the system
Bonjour stack and the browser resolves other machines' shares cross-host. The
stack works — the gap was app-side:

- discovery.rs: update the discovered-peer registry unconditionally instead of
  only when the app handle is already cached. Emits stay best-effort. So a
  resolve that lands before the frontend listener attaches is still recoverable
  via the pull-based refresh. Added info logs for resolved peers.
- store: pull the backend registry once on startup (live peers:found events
  aren't buffered, but the registry is) so peers found early aren't lost.
- PeersPanel: refresh discovered peers on mount and show a count badge on the
  Discover tab, so peers are visible even while the default Favorites tab is
  showing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ignored test that browses _canonic._tcp with the real mdns-sd lib and prints
resolved peers — proves cross-machine discovery on the actual hardware without
building the app. Used to confirm the discovery stack works (the GUI gap was
app-side, see fix in this branch).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@johnjazzi johnjazzi merged commit b519db4 into main Jun 15, 2026
5 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