收口 Makelore 客户端变更
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
inman committed 2026-08-12 22:43:09 +08:00
1 parent 253bad8b40
commit f4113a872f
232 files changed
+4617 -20121

No files matched your search

+13
View File
@@ -2,6 +2,7 @@ import { describe, expect, it } from 'vitest';
import {
completeProjectSession,
createProjectConversationState,
markProjectSessionRead,
normalizeProjectConversationState,
patchProjectSessionMetadata,
removeProjectSessionMetadata,
@@ -44,6 +45,18 @@ describe('project conversation metadata', () => {
expect(state.sessions[0]).toMatchObject({ unreadCount: 1, updatedAt: '2026-07-30T00:05:00.000Z' });
});
it('marks a session read without making navigation look like new activity', () => {
let state = createProjectConversationState();
state = upsertProjectSessionMetadata(state, 'ses-a', 'agent-a', '2026-07-30T00:01:00.000Z');
state = markProjectSessionRead(state, 'ses-a', '2026-07-30T00:04:00.000Z');
expect(state.sessions[0]).toMatchObject({
unreadCount: 0,
updatedAt: '2026-07-30T00:01:00.000Z',
});
expect(state.updatedAt).toBe('2026-07-30T00:04:00.000Z');
});
it('normalizes malformed persisted records and deduplicates by stable session id', () => {
const normalized = normalizeProjectConversationState({
schemaVersion: 1,