fix(desktop): preserve profile when resuming chat sessions - #57983
fix(desktop): preserve profile when resuming chat sessions#57983nxtlevel-starfleet wants to merge 1 commit into
Conversation
Duplicate of #48049 — both patch the same code-site in |
|
Thanks for preserving the owner profile through dashboard resume links. The current-head premise remains: named-profile session rows are tagged with The proposed explicit URL propagation fits the existing A member has identified open #48049 as the canonical related PR; maintainers should reconcile the overlapping server-side implementation during salvage. This is an automated hermes-sweeper review. |
Summary
Fix Desktop Chat resume routing so sessions from named/default profiles keep their owning profile when resumed from the dashboard.
This change:
profilewhen Chat sidebar and Sessions page links navigate to/chat?resume=...;/api/ptythat infers the unique local profile owning the resume session;profile=current.Why
Desktop can list/manage sessions across profiles, but the Chat resume path previously navigated with only
resume=<session_id>. In a multi-profile install that can spawn the PTY under the dashboard/current profile rather than the session owner's profile, so the resumed TUI may load the wrong config, skills, memory, and state DB.Validation
python -m pytest tests/hermes_cli/test_web_server_profile_unification.py tests/hermes_cli/test_web_server_pty_reconnect.py -q→ 40 passed, 3 warningspython -m ruff check hermes_cli/web_server.py tests/hermes_cli/test_web_server_profile_unification.pypython -m py_compile hermes_cli/web_server.py tests/hermes_cli/test_web_server_profile_unification.pygit diff --checknpm --prefix web run typecheckNotes
The inference helper returns a profile only when exactly one local profile DB contains the target session. Ambiguous or missing matches fall back to the legacy unscoped path rather than guessing.