[verified] fix(desktop): list named remote profiles from the profile store - #87203
[verified] fix(desktop): list named remote profiles from the profile store#87203d31tcjg wants to merge 1 commit into
Conversation
…store Named remotes that share a gateway were listed via /api/sessions, which returns the host default store. Desktop then relabeled those rows as the named profile. Ask /api/profiles/sessions?profile=<name> first and trust any 200, including an empty named store. Fall back only when that endpoint is missing: try /api/sessions?profile= before the unscoped dedicated store. 5xx and unknown-profile 404s must not leak the default store. Keep ?profile= on shared-gateway open/resume.
fix(desktop): list named remote profiles from the profile store
|
What does this PR do?
Named Desktop remotes that share a gateway were listed through
/api/sessions. That endpoint returns the host default store, and Desktop then relabeled those rows as the named profile. Opening/resuming the same remotes also dropped?profile=, so the host opened the default store again.This routes named remotes through
/api/profiles/sessions?profile=<name>first:200from the aggregator is authoritative, including an empty named store (total: 0or omittedprofile_totals).404/ HTML). Try/api/sessions?profile=before the unscoped dedicated-remote store.5xx/ timeouts and404 Profile does not existdo not fall back to the default store.?profile=so the host opens the right store.Related Issue
No existing issue. Related but not a duplicate of #83708 (messaging scoped to the active remote), #81457 (global sessions across local overrides), or closed #85932 (dedicated-remote resume). This PR is the shared-gateway list/open leak: named remotes were reading and opening the host default store.
Type of Change
Changes Made
apps/desktop/electron/profile-session-routing.ts— named-profile list first; trust any 200; missing-endpoint fallback via scoped then unscoped/api/sessionsapps/desktop/electron/main.ts— keep?profile=on shared-gateway session open/resumeapps/desktop/electron/profile-session-routing.test.ts— 15 cases covering shared-gateway empty/unknown profiles, 5xx, scoped fallback, and dedicated remotesHow to Test
cd apps/desktop && npx vitest run --project electron electron/profile-session-routing.test.ts/api/profiles/sessions?profile=<name>, not the default store.?profile=.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass — N/A (JS-only Desktop change; targeted Vitest: 15 passed)Documentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A