feat(desktop): continue a secure session on phone - #67668
Open
joelbrilliant wants to merge 2 commits into
Open
joelbrilliant wants to merge 2 commits into
joelbrilliant wants to merge 2 commits into
Conversation
joelbrilliant
marked this pull request as ready for review
July 19, 2026 20:36
joelbrilliant
force-pushed
the
feat/desktop-continue-on-phone
branch
from
July 20, 2026 10:29
51bada5 to
1b79625
Compare
Contributor
Author
|
Rebased onto current main (766c617) and pushed follow-up fixes as 1b7962513. The rebase rewrote history, hence the forced update; the branch is the feature commit plus one fix commit on top.
Evidence: |
teknium1
reviewed
Jul 25, 2026
teknium1
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the carefully scoped handoff flow and the auth-gate checks. The feature remains absent from current main, but one profile-routing issue needs correction.
Problems
hermes_cli/web_server.py:18249resolves the URL without accepting or scoping theprofilequery. Desktop supplies the owning profile inapps/desktop/src/lib/continue-on-phone.ts:64; in global-remote mode Electron appends that query (apps/desktop/electron/connection-config.ts:353-387). The handler therefore ignores it and can return the dashboard process/default profile'sdashboard.public_url, while the QR keeps the named session profile.
Suggested changes
- Accept
profile: Optional[str] = Noneand resolve the URL inside_config_profile_scope(profile)(the existing per-request configuration scope athermes_cli/web_server.py:15412-15429). Add a named-profile endpoint regression test with distinct public URLs.
Automated hermes-sweeper review.
- Stamp the active gateway profile on sessions resolved by id in resolveStoredSession (matching upsertOptimisticSession), so the continue-on-phone URL resumes against the owning profile instead of whichever profile the gateway is on later. - Reword the continue-on-phone unavailable description (en/ja/zh/zh-hant) to require OAuth browser sign-in and state that token-authenticated dashboards cannot be opened from a phone browser; update the dialog test to match. - Clarify the session-actions-menu OPEN comment: continue on phone is orthogonal to tab-vs-window, so every surface always offers it. - test(web-server): cover /api/dashboard/remote-access through real config loading by writing dashboard.public_url into the isolated HERMES_HOME config.yaml instead of monkeypatching resolve_public_url. - docs(web-dashboard): document GET /api/dashboard/remote-access and add a "Continue a session on your phone" section covering prerequisites (public HTTPS URL, OAuth browser sign-in, no token-proxy topologies) and that the QR code encodes no credentials. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
joelbrilliant
force-pushed
the
feat/desktop-continue-on-phone
branch
from
July 30, 2026 11:15
1b79625 to
85ae7bb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Continue on phoneaction to persisted Desktop sessions.Why
Hermes already supports resuming a session in the dashboard with
/chat?resume=<session id>, but Desktop users have to reconstruct that URL themselves. This makes the existing remote path discoverable from the session they are already using.The security boundary is deliberate. The handoff never embeds a token or credential, refuses HTTP and URL user info, and does not expose a QR code for an unreachable or non-gated dashboard. The new configuration endpoint remains behind the existing dashboard authentication middleware.
Applicability
This is configuration-driven rather than tied to one operator. It works with any HTTPS, OAuth-gated Hermes dashboard, including path-prefixed and multi-profile deployments. No hostname, token, profile name, tunnel provider or install path is built in. Loopback-only and fixed-token deployments intentionally remain unavailable because a scannable URL must not contain credentials.
Verification
npx vitest run src/app/chat/continue-on-phone-dialog.test.tsx src/lib/continue-on-phone.test.ts src/app/chat/sidebar: 71 passed.python -m pytest tests/hermes_cli/test_web_server.py -q -k dashboard_remote_access: 2 passed.npm run typecheck: passed.npm run build: passed.Known upstream test debt
The full Desktop suite still has one
ToolsetConfigPanelassertion expectingInstalledwhile the component rendersReady. A cleanorigin-nous/mainworktree reproduced the same failure. The focused test file passes in isolation.The full
test_web_server.pyfile also reaches the existing shared virtual environment failure where its Python binary references a missing temporarylibpython3.11.dylib. The two new endpoint tests pass directly.