Files
nucleic-remote-ios/NucleicRemote
abkslmandClaude Fable 5 d4734e5872 Phone-initiated project creation: projectCreated reply + iOS Add Project UI
The createProject verb landed host-side but nothing sent it. This adds the
client half (CLOUD_RUNTIME §6 "phone-initiated project creation"):

Wire: WireCreateProjectRequest gains an optional requestID;
HostMsg.projectCreated (WireProjectCreated: requestID echo + projectID/name
on success, error message on failure) answers the requesting connection —
additive (.unknown fallback on old clients) with the SyncClient.Event case
+ messageLoop branch per the §11.2 checklist. SyncHostBridge.createProject
now returns the outcome; ConnectionHandler folds a thrown WireError into a
failed outcome so the asking UI always settles.

iOS: Projects tab gains an Add Project sheet (git URL + optional
name/branch, host picker when several live hosts advertise
canCreateProjects), driven by RemoteStore.addProject state — creating →
created/failed, correlated by requestID so a stale reply can't settle a
newer request. The project row itself arrives via the dashboard push.

Verified: macOS nucleicd/NucleicApp builds + protocol/sync suites green;
iOS xcodebuild green; Linux nucleicd build + protocol suite green (167
tests, incl. new round-trip/legacy-tolerance coverage).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-10 21:18:51 +00:00
..
2026-06-27 15:24:50 -07:00
2026-07-06 17:17:16 -07:00
2026-07-04 23:31:40 -07:00

NucleicRemote (iPhone client)

The thin iOS remote client for Nucleic (PLAN milestone M4). It's a pure projection of the Mac host over LAN: monitor sessions, read transcripts/diffs, answer approvals, and send follow-up input — scope approve. No local git or CLI; the Mac is the single authority (see docs/UX_IOS.md and docs/SYNC_PROTOCOL.md).

Architecture

All wire/crypto logic is shared with the Mac via the NucleicProtocol SwiftPM library (this Xcode project links it as a local package at ../..):

  • Transport — NWFrameChannel (NWConnection) + LANDiscovery (Bonjour _nucleic._tcp).
  • Engine — NucleicProtocol.SyncClient runs the Noise handshake (XXpsk0 to pair, IK to reconnect), exchanges hello/welcome, and turns HostMsgs into a SyncClient.Event stream.
  • State — RemoteStore (ObservableObject) is the single on-device UI state, a pure projection of the host. Identity + pinned host live in IdentityStore (Keychain + UserDefaults).
  • UI — SwiftUI: SessionsView (attention-first list), SessionDetailView (transcript/diff + status-driven action area), ApprovalCardView (approve/deny, high-risk answered in-app), PairingScannerView (QR), SettingsView.

Build & run

# Resolves the local NucleicProtocol package automatically.
xcodebuild -project ios/NucleicRemote/NucleicRemote.xcodeproj \
  -scheme NucleicRemote \
  -destination 'platform=iOS Simulator,name=iPhone 17 Pro' build

Or open NucleicRemote.xcodeproj in Xcode and run. To pair, start the sync server on the Mac (Nucleic ▸ Settings ▸ Add iPhone shows the QR), then scan it. On a real device, both must be on the same Wi‑Fi.

Status

The full pair → list → subscribe → approve → reconnect path is implemented and the protocol/ server side is covered by tests in Tests/NucleicProtocolTests and Tests/NucleicCoreTests. Push notifications / Live Activity (UX_IOS §5.1/§5.3) are the M5 follow-up (needs the relay).