Skip to content

fix(desktop): scope session list to active profile; harden gateway startup/turn persistence#41103

Merged
teknium1 merged 3 commits into
mainfrom
hermes/hermes-8ffaea35
Jun 7, 2026
Merged

fix(desktop): scope session list to active profile; harden gateway startup/turn persistence#41103
teknium1 merged 3 commits into
mainfrom
hermes/hermes-8ffaea35

Conversation

@teknium1

@teknium1 teknium1 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Switching to a profile agent in the Desktop app no longer empties the session-history panel. Salvage of #40550 (@bmoore210) onto current main — all four concerns, contributor authorship preserved per-commit.

The desktop bug (reported by @Semah____): on a global-remote, single-host install (one gateway, all profiles on it, no per-profile remote URLs), switching from the default agent to a profile agent like RAAD showed an empty history panel. Root cause: the sidebar fetched the unified session list as profile='all' and filtered it client-side, so a profile with few recent sessions got windowed out of the cross-profile recency page entirely. Scoping the fetch to the active profile fixes it (and also fixes the startup Hermes couldn't start timeout on large multi-profile installs, where the all fetch exceeded the 15s IPC limit).

Changes

  • apps/desktop/src/app/desktop-controller.tsx: scope refreshSessions to the active profile (profileScope) instead of always 'all'; profileScope is now a useCallback dep, so the existing gateway-open effect re-pulls on profile switch. Cron-exclusion preserved.
  • apps/desktop/src/hermes.ts: 60s IPC timeout for both session-list calls.
  • apps/desktop/src/hermes.test.ts: cover the timeout.
  • agent/conversation_loop.py: persist the inbound user turn before provider/tool execution (idempotent via _last_flushed_db_idx) so a pre-run_conversation crash keeps the message.
  • gateway/run.py: repair stale/missing SSL_CERT_FILE; dedup-guarded crash-persist of the inbound user message on early agent failure.
  • scripts/release.py: AUTHOR_MAP entry for @bmoore210 (CI email gate).

Validation

Check Result
tests/run_agent/test_413_compression.py + test_860_dedup.py + tests/gateway/test_ssl_cert_detection.py 34 passed
apps/desktop tsc --noEmit clean (exit 0)
apps/desktop vitest run src/hermes.test.ts 2 passed
E2E: get_profiles_sessions(profile='raad') returns RAAD-only rows / total:1 / profile_totals:{raad:1} — confirms the scoped fetch populates the panel even when default dominates recency

Salvaged from #40550. Cherry-picked onto current main, conflicts in desktop-controller.tsx (cron-exclusion) and hermes.ts (source params) resolved to keep both main's additions and the PR's change. Authorship preserved via per-commit --author.

Infographic

profile-scoped-session-history

bmoore210 and others added 3 commits June 7, 2026 01:57
Persist the inbound user turn before provider/tool execution so a crash
before run_conversation() (e.g. provider/httpx client init failure) keeps
the inbound message in the transcript. Repair stale/missing SSL_CERT_FILE
state on gateway startup, and avoid duplicate gateway fallback writes.
The desktop sidebar fetched the unified cross-profile session list as
profile='all' and filtered it client-side by the active profile. On a
large multi-profile install the active profile's rows could be windowed
out of the cross-profile recency page entirely, so switching to a profile
agent showed an empty history panel (and the 'all' fetch could exceed the
15s IPC timeout on startup). Scope the fetch to the active profile so its
own page comes back on its merits, and bump the session-list IPC timeout
to 60s. profileScope is now a refreshSessions dep, so the existing
gateway-open effect re-pulls on profile switch.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder comp/gateway Gateway runner, session dispatch, delivery labels Jun 7, 2026
@teknium1 teknium1 force-pushed the hermes/hermes-8ffaea35 branch from 373efb8 to ebdc174 Compare June 7, 2026 08:58
@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-8ffaea35 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9985 on HEAD, 9985 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5178 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@teknium1 teknium1 merged commit 4b9862e into main Jun 7, 2026
23 checks passed
@teknium1 teknium1 deleted the hermes/hermes-8ffaea35 branch June 7, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants