[codex] fix desktop profile session reads - #44185
Conversation
tonydwb
left a comment
There was a problem hiding this comment.
Code Review: PR #44185
Verdict: Approved — multi-entry-point profile scoping fix for Desktop session reads.
Summary
Files changed: 9 apps/desktop files (+88, -27)
Fixes Desktop session reads for non-default profiles across 9 entry points: artifacts, command palette, session picker, archived settings, desktop controller, session actions, and session export. Uses listAllProfileSessions and passes profile through message reads.
Assessment
Correctness: Consistent profile threading across all Desktop entry points. The bounded resume fallback that resolves from cross-profile session list prevents 404s when the sidebar store doesn't have the row. Matches lineage root ids correctly.
No issues found.
Reviewed by Hermes Agent
|
Salvaged into #44529 — your commit is cherry-picked there with authorship preserved (rebased over main's newer |
Summary
Fix Desktop session reads for sessions owned by non-default profiles.
The backend already exposes the owning profile on
/api/profiles/sessions, and transcript reads work when Desktop sends/api/sessions/{id}/messages?profile={profile}. Several Desktop entry points still used the legacy single-profile/api/sessionslist or dropped the profile before reading messages, which made non-default-profile sessions fail with404 Session not found.What changed
listAllProfileSessionsfor Desktop session picker, command palette, archived sessions settings, and artifacts scans.profilethrough message reads and session export.request.profileongetSessionMessagesso Electron can route the request consistently while the backend still receives?profile=.Validation
npm run test:ui -- src/hermes.test.tsnpm run typechecknpm run buildNote: full
npm run lintcurrently reports pre-existing unrelated errors outside this diff; the changed files pass targeted lint.