Skip to content

feat(workbench,nsh-ios): add remote Host pairing/store and iOS AppOptions EngineConfig hooks - #7141

Open
me2seeks wants to merge 1 commit into
stack/ios-app-1-remote-client-splitfrom
stack/ios-app-2-saved-hosts-and-pairing-ui
Open

me2seeks wants to merge 1 commit into
stack/ios-app-1-remote-client-splitfrom
stack/ios-app-2-saved-hosts-and-pairing-ui

Conversation

@me2seeks

@me2seeks me2seeks commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Stack B: iOS App & Remote Client (Stacked PRs)

Part PR Branch Base
B1 #7140 stack/ios-app-1-remote-client-split rust-preview
B2 (this PR) #7141 stack/ios-app-2-saved-hosts-and-pairing-ui stack/ios-app-1-remote-client-split

Add remote Host pairing tickets, persistent multi-computer Host storage, and AppOptions EngineConfig forwarding for nsh-platform-ios.

Changes

  • products/maka/workbench/src/remote_hosts.rs: PairingTicketV1 (URI codec, redacted Debug, expiration, 6-digit SAS), SavedHostProfile, SavedHostStore (path-traversal-safe root_id validation, atomic NamedTempFile persistence with rollback, pinned peer_id verification, cross-computer HostViewFilter and drawer collapse state).
  • third-party/nsh/crates/nsh-platform-ios/src/app.rs: forward assets, chunk_loader, runtime, data_dir, context, and host through AppOptions.

Verification

  • cargo test --locked -p maka-workbench --lib remote_hosts::tests (pass)
  • node scripts/asf-license-headers.mjs check (pass)

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one persistence issue that prevents a paired Host from surviving a normal client restart.

Reviewed head: 1c7f0fed44820069314972ce010082b3b32a6a48.


Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.

host_name: String,
peer_id: String,
endpoints: Vec<String>,
credential_id: String,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1][normal restart path] Persist the Host bearer needed to reconnect

PairingTicketV1 carries the actual bearer in pairing_token, but the persisted profile keeps only credential_id. Nothing else in this stack stores that bearer in Keychain or another credential store. After pairing is finalized and the ticket object is dropped (or the iOS app restarts), HostClient::connect_websocket still requires the same bearer on every connection; a credential ID cannot authenticate, so this saved Host cannot reconnect.

There is a second gap in the same handoff: the maka://pair/v1 payload emitted by #7139 does not contain credentialId, although this constructor requires it, and finalize_access returns no ID. The test hides both gaps by inventing "cred-mac" after decoding instead of exercising pair -> persist -> restart -> reconnect.

Please add a secure client credential-store seam (Keychain on iOS), commit the bearer only after successful finalization, coordinate removal/rollback with the metadata store, and carry or return the credential ID if later revocation needs it. A real Host regression should pair, destroy all in-memory ticket state, reload the profile and secret, reconnect, then remove/revoke them together.

This branch has not been deployed

No deployments
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.

2 participants