Skip to content

fix(desktop): recover in-flight turn progress after restart - #196

Merged
OmarB97 merged 1 commit into
mainfrom
fix/crash-survivable-turn-progress-20260611
Jun 11, 2026
Merged

fix(desktop): recover in-flight turn progress after restart#196
OmarB97 merged 1 commit into
mainfrom
fix/crash-survivable-turn-progress-20260611

Conversation

@OmarB97

@OmarB97 OmarB97 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a bounded desktop in-flight turn journal that stores the active user plus assistant/tool tail locally during streaming
  • recover the journal on session resume when the DB only has the initiating user prompt, and discard it when stored history has caught up
  • consume the gateway session.resume/session.activate inflight payload so live running sessions rehydrate partial assistant text instead of opening blank

Task

  • hermes-desktop-crash-survivable-turn-progress-20260611

Verification

  • npm run test:ui -- src/lib/inflight-turn-journal.test.ts src/app/session/hooks/use-session-state-cache.test.tsx src/app/session/hooks/use-message-stream.test.tsx
  • npx eslint src/lib/inflight-turn-journal.ts src/lib/inflight-turn-journal.test.ts src/app/session/hooks/use-session-state-cache.ts src/app/session/hooks/use-session-actions.ts src/types/hermes.ts
  • npm run typecheck
  • git -c core.fsmonitor=false diff --check

Notes

  • This does not mutate model conversation history mid-turn, so prompt-cache and role-alternation behavior remain untouched.
  • I did not swap /Applications/Hermes.app yet to avoid interrupting currently active sessions before the fixed build is installed intentionally.

@github-actions

Copy link
Copy Markdown

🔎 Lint report: fix/crash-survivable-turn-progress-20260611 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: 10638 on HEAD, 10638 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5558 pre-existing issues carried over.

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

@OmarB97
OmarB97 merged commit cef201b into main Jun 11, 2026
26 checks passed
@OmarB97
OmarB97 deleted the fix/crash-survivable-turn-progress-20260611 branch June 11, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant