fix(desktop): preserve active profile gateway isolation - #67190
fix(desktop): preserve active profile gateway isolation#67190konsisumer wants to merge 1 commit into
Conversation
Related to #67097: this focused patch fixes its first root cause, the |
|
Thanks for the clarification. Addressed in this push:
Addressing maintainer feedbackRelated: #67097 (multi-cause Desktop profile-routing report). This update addresses only its Verification: |
4c475fa to
879f712
Compare
|
Superseded by merged main commit 4539895 (fix(desktop): never resolve a missing named gateway scope to the primary), which implements this PR's activeGateway() null fallback and adds the related eviction invariant. |
What does this PR do?
Prevents a transient profile mismatch from routing a request to the primary gateway. When the active profile does not have its own secondary socket, the registry now reports no active gateway, allowing callers to take their existing unavailable/fallback path instead of silently sending work to another profile.
Related Issue
Refs #67097
Type of Change
Changes Made
apps/desktop/src/store/gateway.ts: returnnullrather than the primary gateway when the active non-primary profile has no registered secondary socket.apps/desktop/src/store/gateway.test.ts: cover a primary-profile re-home while the previous profile remains active.How to Test
apps/desktop, runnpm exec -- vitest run src/store/gateway.test.ts --project ui.tscand Vitest could not run here; the required Python suite instead stopped at two unrelated ACP approval failures before completion.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & 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/AFor New Skills
N/A — no skill added.
Screenshots / Logs
N/A — routing-only change.