perf(app): stabilize live session timeline updates
Virtualize SessionDetail rows behind stable presentation boundaries and apply typed incremental patches only after visible commits. Preserve reader state across live updates, handle coalesced and reordered patches, and verify the 120Hz append path with Electron tracing.
This commit is contained in:
@@ -4,6 +4,7 @@ import assert from 'node:assert/strict';
|
||||
import {
|
||||
createSessionLiveState,
|
||||
consumeSessionDirty,
|
||||
markSessionDirty,
|
||||
noteSessionUpdated,
|
||||
} from '../app/src/renderer/src/session-live.mjs';
|
||||
|
||||
@@ -25,3 +26,12 @@ test('session live state reloads the visible session without leaving it dirty',
|
||||
assert.deepEqual(action, { reload: true, sessionId: 'session-1' });
|
||||
assert.equal(consumeSessionDirty(live, 'session-1'), false);
|
||||
});
|
||||
|
||||
test('a rejected visible commit can put the session back into the dirty set', () => {
|
||||
const live = createSessionLiveState();
|
||||
|
||||
noteSessionUpdated(live, 'session-1', 'session-1');
|
||||
markSessionDirty('session-1', live);
|
||||
|
||||
assert.equal(consumeSessionDirty(live, 'session-1'), true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user