mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
* test(desktop): e2e for warm-route resume render jitter Pre-seeds a 32-message session into state.db, boots the app, does a cold resume (populates warm cache), navigates away, then clicks back (warm resume). A MutationObserver + innerHTML-length poll detects whether the transcript is re-rendered after the initial warm-cache paint — the jitter bug where syncSessionStateToView fires twice (warm cache paint, then session.activate RPC reconcile). * fix(desktop): warm-route resume jitter from double setMessages The warm resume path in resumeSession() calls syncSessionStateToView twice: once for the warm cache paint, then again after the session.activate RPC reconciles messages. The second call created new message objects via toChatMessages (different references, same content), and flushPendingViewState's sameMessageList guard used reference equality per slot — so it always failed and setMessages fired a second time, causing a visible transcript re-render. Replace sameMessageList (reference equality) with chatMessageArraysEquivalent (deep content comparison: id, role, parts, pending, error, etc.). This was already used by the cold path's fast-path guard; the flush guard was the last holdout using shallow reference equality. Also updates the e2e test to use textContent polling on the first message element (instead of innerHTML on the full viewport) to avoid false positives from metadata-only DOM changes. * test(desktop): e2e for warm resume after background inference Extract the render counter (MutationObserver + text-content poll) and assertion into reusable helpers. Add a second test that sends a message, waits for the mock response to complete, navigates away, then warm- resumes — verifying the warm cache already has the completed turn from message.complete events and no second paint occurs. |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||