Skip to content

fix(desktop): refresh session model metadata on switch - #43977

Merged
austinpickett merged 1 commit into
NousResearch:mainfrom
OmarB97:fix/session-switch-model-metadata-20260611
Jun 11, 2026
Merged

fix(desktop): refresh session model metadata on switch#43977
austinpickett merged 1 commit into
NousResearch:mainfrom
OmarB97:fix/session-switch-model-metadata-20260611

Conversation

@OmarB97

@OmarB97 OmarB97 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Cache desktop session runtime metadata per session, including model, provider, reasoning effort, service tier, fast mode, personality, and yolo state.
  • Mirror the focused session's cached runtime metadata into the statusbar immediately when switching sessions.
  • Prevent background session.info updates from clobbering the foreground UI while still keeping each session cache fresh.
  • Clear stale model/effort/provider/fast state on cold resumes until the gateway returns exact runtime info.

Repair note

This upstream PR branch was replaced with a clean upstream/main cherry-pick after the earlier fork-sync branch became polluted/conflicting. The current head is 579c67dcfaa7b94f071ba8dd4bdb99a2ff9c89ec; the PR is mergeable and its diff is limited to the six desktop runtime-metadata files.

Verification

  • npm ci --workspace apps/desktop
  • npm --prefix apps/desktop run typecheck
  • cd apps/desktop && npx vitest run --environment jsdom src/app/session/hooks/use-session-state-cache.test.tsx
  • git diff --check upstream/main..HEAD

Notes: the vitest command passes 1 file / 5 tests. npm ci reports the existing Node engine warning for @icons-pack/react-simple-icons under Node v22.22.3. No screenshot/video is attached because this changes session-scoped state hydration for existing statusbar controls, not visual layout, styling, or labels.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants