Skip to content

Fix bug tickets: session-not-found, in-flight rows, markdown/UI (#17, #26, #27)#29

Open
goncharik wants to merge 13 commits into
push-notificationsfrom
worktree-fix-bug-tickets
Open

Fix bug tickets: session-not-found, in-flight rows, markdown/UI (#17, #26, #27)#29
goncharik wants to merge 13 commits into
push-notificationsfrom
worktree-fix-bug-tickets

Conversation

@goncharik

@goncharik goncharik commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Fixes the three open bug-tagged issues: #17, #26, #27.

Note

This branch is stacked on push-notifications (not yet merged to main). Targeting main as requested, so the diff currently also includes the push-notifications commits. Either merge push-notifications first (the diff then collapses to just the bug fixes), or re-point this PR's base to push-notifications for a bug-fix-only review.

#17 — "session not found" on the next RPC after background→foreground

  • Added GatewayError.isSessionNotFound.
  • Outbound RPCs (prompt.submit, attach uploads, session.title rename) now self-heal: on a server "session not found" they re-resume the stored session for a fresh liveSessionID — or session.create when there's no stored id (the fresh-session root cause) — then replay the RPC once; the banner shows only if the heal or retry also fails. Foreground session.resume "session not found" now recreates instead of being silently swallowed. Shared withSessionHeal helper.

#26 — in-flight thinking / tool-call rows vanished on background→foreground

  • On a still-running foreground hydrate, the client now preserves its live thinking + tool rows (the server inflight payload carries only user/assistant text — no reasoning/tools), re-appending them after the authoritative history; completed turns still replace wholesale. Elapsed timer resumes instead of restarting.
  • Known limitation (documented): events that stream while the app is backgrounded (socket dead) can't be recovered — only pre-background rows are preserved.

#27 — markdown support + chat UI restructure

  • Block-level headers, blockquotes, tables (pure parsing in MarkdownSegment, rendered in MarkdownText; fenced code still takes precedence; malformed markup degrades to prose).
  • Agent responses are fully selectable/copyable (.textSelection).
  • Bubble-less restructure: assistant text, tool rows, and thinking rows render as plain content; only user messages keep a bubble (Claude iOS app style). Snapshots re-recorded.

Tests

  • 597 HermesKit tests + 71 snapshot tests pass.
  • New: GatewayErrorTests, SelfHealTests (11), ChatRowCopyTests; extended HydrateTests, MarkdownSegmentTests.

Manual verification still needed (background→foreground is not automatable here)

@goncharik goncharik changed the base branch from main to push-notifications June 24, 2026 08:38
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