Sessions Integration Feature

Nucleic-Session: FC94353F-9F0D-4BCC-AD7C-0FB14E38C2E5
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-05 01:57:07 -07:00
co-authored by Nucleic
parent 698717beae
commit 674f7ffcdb
@@ -55,9 +55,6 @@ struct SettingsView: View {
Section("Connection") {
LabeledContent("Status", value: store.connectivity.label)
if !store.hostName.isEmpty {
LabeledContent("Mac", value: store.hostName)
}
// What this pairing can dial — the live transport is in Status above.
if let host = IdentityStore.loadPairedHost() {
LabeledContent("Transports", value: Self.transportsLabel(host))
@@ -66,14 +63,13 @@ struct SettingsView: View {
.disabled(!store.isPaired)
}
// Mesh P3: every Mac this phone is paired with. Today the connection uses the
// "Active" one (most-recently paired); the multiplexer will connect to all. Removing
// the active Mac unpairs the live connection; removing another just forgets it.
// Mesh P3: every Mac this phone is paired with — all connected at once and shown
// together in the app (no active-host selector). Removing one forgets just that Mac
// and drops its connection; the others keep running.
let pairedHosts = IdentityStore.pairedHosts()
if !pairedHosts.isEmpty {
Section("Mesh") {
ForEach(pairedHosts, id: \.fingerprint) { host in
let isActive = host.fingerprint == pairedHosts.last?.fingerprint
HStack(spacing: 10) {
Image(systemName: "desktopcomputer").foregroundStyle(.secondary)
VStack(alignment: .leading, spacing: 2) {
@@ -82,15 +78,8 @@ struct SettingsView: View {
.font(.footnote.monospaced()).foregroundStyle(.secondary)
}
Spacer()
if isActive {
Text("Active").font(.caption).foregroundStyle(.secondary)
}
Button(role: .destructive) {
if isActive {
store.unpair()
} else {
IdentityStore.removePairedHost(id: host.fingerprint)
}
store.unpair(host.fingerprint)
pairedHostsToken = UUID()
} label: {
Image(systemName: "minus.circle")