Adds an E2E test that reproduces the multi-pass transcript re-render
bug when loading a large previous session. The desktop's resumeSession
path does up to three message-set passes (warm cache → session.activate
projection → REST persisted transcript), each replacing the $messages
atom and rebuilding the transcript DOM — visible as a flicker on large
sessions.
The test:
- Seeds a real 53-message session (exported from state.db, stripped to
minimal stubs — 13.5KB) into a sandbox HERMES_HOME via
SessionDB.import_sessions before launch
- Opens the session from the sidebar
- Instruments the thread viewport with a MutationObserver to count DOM
mutation bursts (groups separated by a 30ms gap)
- Asserts >= 2 bursts, proving the transcript was rebuilt more than once
Also exports createSandbox, writeMockProviderConfig, writeEnvFile,
buildAppEnv, findElectron, and launchDesktop from fixtures.ts so the
new spec can compose its own seeded-backend fixture without duplicating
the sandbox/config/launch logic.