Skip to content

Release XX (v0.51.668): WebUI<->Desktop session reconciliation (#4834, fixes #4833) - #4954

Merged
nesquena-hermes merged 3 commits into
masterfrom
stage/4834-desktop-reconcile
Jun 26, 2026
Merged

nesquena-hermes merged 3 commits into
masterfrom
stage/4834-desktop-reconcile

Conversation

@nesquena-hermes

Copy link
Copy Markdown
Collaborator

Release XX (v0.51.668) — WebUI stays in sync after the Desktop app continues a session

Ships #4834 (@franksong2702, T1) — fixes #4833. Anchor-B (continue a WebUI session from the official Hermes Desktop app) + Anchor-A (session state is core).

What it fixes

After the Desktop app continues a WebUI-origin session (appending settled rows to the shared Agent state.db) and you return to WebUI, the sidebar/detail showed a stale/incomplete transcript and the next WebUI turn's context missed the externally-appended settled messages. Fix: batch-read state.db count+max-ts in the sidebar override helper + overlay newer WebUI-origin state.db onto stale sidecar rows only when the DB strictly grew; make /api/sessions cache stamps observe state.db even when CLI sessions are hidden (active-stream hold-down preserved). Read-only, metadata-only — no Desktop change, no live-stream mirroring.

Gate (converged after a prior bounce)

The reconciliation LOGIC was already validated SAFE by the prior dual-gate (read-only/content-free overlay). The bounce was a parallel test-isolation regression (test_session_list_cache_follower_wait_stage_when_rebuild_inflight failed under xdist because the always-on state.db stamp perturbed shared cache state). The re-push isolated the cache tests + a try/int() coercion fix.

  • Codex: SAFE TO SHIP — test-isolation fix is test-only (autouse cache-clear fixture + stable-stamp pin); the two prod-behavior changes are the intended feature (guard removal) + a legitimate stale-while-revalidate consequence (traced); overlay metadata-only, gated state_db_source=='webui' + strictly-grew (no resurrection), full transcript still via append-only reconciliation.
  • Opus: SHIP IT — same conclusions, confirmed prior SAFE finding holds at HEAD.
  • Full xdist suite: 10631 passed (the prior failing follower_wait regression test now PASSES under the full parallel run; 1 unrelated known order-flake passes in isolation).
  • Pre-merge head re-check: gated == live (3ec1da6).

Credit @franksong2702.

@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR keeps WebUI session views in sync after Desktop appends settled messages. The main changes are:

  • Sidebar metadata now reads message count and latest timestamp from state.db.
  • WebUI-origin sidebar rows can overlay newer settled state.db counts.
  • Session-list cache stamps now observe state.db while CLI sessions are hidden.
  • Missing sidecar rows can be recovered into the sidebar index.
  • Tests cover cache isolation, stale follower reuse, Desktop append reconciliation, and full-load deduplication.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
api/models.py Adds read-only state.db sidebar metadata, guarded WebUI-origin overlays, and recovery for sidecars missing from the index.
api/routes.py Updates session-list cache behavior so stale follower payloads can be reused and hidden-CLI views still notice state.db changes.
tests/test_session_sidebar_cache.py Adds cache-state isolation and tests for singleflight and stale follower behavior.
tests/test_streaming_session_sidebar.py Adds coverage for recovering a messageful sidecar that is missing from the sidebar index.
tests/test_webui_state_db_context_reconciliation.py Adds persistence checks for externally appended messages included in the next WebUI turn.
tests/test_webui_state_db_reconciliation.py Adds tests for sidebar overlay counts, Desktop append reconciliation, and full session-load deduplication.
CHANGELOG.md Adds the release note for v0.51.668.

Reviews (1): Last reviewed commit: "Release XX (v0.51.668): WebUI<->Desktop ..." | Re-trigger Greptile

@nesquena-hermes
nesquena-hermes merged commit e96b95d into master Jun 26, 2026
11 checks passed
@nesquena-hermes
nesquena-hermes deleted the stage/4834-desktop-reconcile branch June 26, 2026 00:49
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.

WebUI falls out of sync after Hermes Desktop continues a WebUI-created session

1 participant