Make relay opt-in when pairing devices - #2706
Conversation
|
| Filename | Overview |
|---|---|
| packages/app/src/data/push-router.ts | Adds the owned pairing-offer query key to per-host reconnect invalidation, completing the previously requested stale-offer repair. |
| packages/app/src/desktop/components/pair-device-section.tsx | Implements capability-gated relay consent and refreshes the pairing offer after relay configuration changes. |
| packages/cli/src/commands/daemon/pair.ts | Gates daemon-backed pairing and relay configuration on advertised capabilities while providing update guidance for unsupported daemons. |
| packages/server/src/server/daemon-config-store.ts | Persists mutable relay configuration and coordinates field-change handlers with rollback on failure. |
| packages/server/src/server/relay-runtime.ts | Adds live relay transport enablement and disablement driven by persisted daemon configuration. |
| packages/server/src/server/session/daemon/daemon-session.ts | Serves pairing offers from the daemon’s current runtime relay configuration. |
Sequence Diagram
sequenceDiagram
participant U as User
participant C as CLI/Desktop
participant D as Daemon
participant R as Relay
C->>D: Request pairing offer
D-->>C: Relay disabled
C->>U: Ask whether to enable relay
alt User consents
C->>D: "Persist relay.enabled=true"
D->>R: Start relay transport
C->>D: Request fresh pairing offer
D-->>C: Relay pairing URL
else User declines
C-->>U: Show direct TCP/VPN alternatives
end
Reviews (16): Last reviewed commit: "fix(cli): pair from persisted relay stat..." | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86e6f02627
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4b3455152
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ac2461a79
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4e4731106
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90dc36dd13
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
paseo/packages/cli/src/commands/daemon/status.ts
Lines 267 to 272 in c1c5b22
When the PID file is missing or stale but the configured WebSocket target is reachable, this early return omits relayStatus, so applyProbeToStatus retains the persisted value even though statusPayload.relay contains the authoritative runtime state. A daemon manually launched with --relay, for example, is therefore reported as disabled; fresh evidence beyond the earlier status finding is this separate !state.running branch added to the live probe path.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59f279955a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed the latest status review in 3b1838c. A reachable daemon now supplies authoritative live relay state even when no local PID file exists. The real CLI IPC test removes the PID file and verifies the stopped-local/reachable-daemon combination still reports the live relay. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b1838c022
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86eb068efd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
86eb068 to
383d286
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da05b01521
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Keep Pair Device host-relative through the existing settings and daemon RPC flow. Route CLI output through an injected adapter so workflow tests do not mutate process globals.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6d76a98ac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Expose the host-relative Pair Device flow on every supported app platform. Reject a reachable daemon whose identity does not match the requested Paseo home before reading or mutating its pairing state.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3dfd7ab0ca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Generate SVG text without DOM or canvas and render it through the existing cross-platform SVG stack.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8947935b2a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Allow explicit relay pairing while the daemon is stopped when relay is already enabled in persisted configuration.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b9c09f333
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Verification
npm run typechecknpm run lintnpx vitest run packages/cli/src/commands/daemon/pair.test.ts packages/cli/src/run.test.ts packages/server/src/server/config-relay.test.ts packages/server/src/server/daemon-config-store.test.ts packages/server/src/server/persisted-config.test.ts packages/server/src/server/relay-runtime.test.ts packages/server/src/server/session/daemon/daemon-session.test.ts --bail=1(99 tests)npm run test:e2e -- e2e/pair-device-relay.spec.ts --workers=1(all scenarios passed; the retry assertion was then tightened and rerun independently)npm run test:e2e -- e2e/pair-device-relay.spec.ts --workers=1 --grep "launch override"npx vitest run packages/app/src/utils/host-routes.test.ts --bail=1Risk
The behavior change is limited to new homes. Existing saved relay choices and explicit environment/CLI overrides remain authoritative.