Settings Feature Enhancement

Nucleic-Session: 89BFAB13-D559-43FC-BE28-0B2639BECF0F
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-05 22:03:35 -07:00
co-authored by Nucleic
parent 383c8e1021
commit ed509cfb5b
@@ -78,6 +78,20 @@ final class RemoteStore: ObservableObject {
@Published private(set) var openDiff: WireSessionDiff?
@Published private(set) var diffLoading = false
/// "Add a device to this mesh" (Settings): the phone asks a connected Mac to mint a join code
/// and shows it as a QR / copyable link. The phone can't mint one itself (it runs no listener),
/// so this is always relayed through a live, capable host.
enum AddDeviceState: Equatable {
case idle
case requesting // waiting on the host's `pairingCode` reply
case ready(String) // the `nucleic://pair?d=…` join code to display
case unavailable // no live host could mint one right now
}
@Published private(set) var addDevice: AddDeviceState = .idle
/// The host we asked to mint the current code, so a dismiss can tell the *same* Mac to close
/// its pairing window.
private var pairingMintHostID: String?
/// A transient host-reported error (the mobile echo of the Mac's last-error bubble):
/// shown as a red bubble at the bottom of the screen, auto-dismissed after a few seconds.
struct LastError: Equatable, Identifiable {