merge: integrate foreground conversation reconciliation

# Conflicts:
#	tests/e2e/pi-coding-first-chat.spec.ts
This commit is contained in:
inman
2026-09-03 10:47:56 +08:00
6 changed files with 439 additions and 22 deletions

View File

@@ -538,14 +538,12 @@ export function createCodingConversationStore(
};
});
const entry = get().entriesByConversationId[conversationId];
const snapshotFlight = !entry?.reducer.snapshot
|| entry.reducer.invalidation
|| entry.loadState !== 'live'
? get().loadSnapshot(
conversationId,
entry?.reducer.invalidation ? 'recovering' : 'loading',
)
: Promise.resolve(entry.reducer.snapshot);
const refreshMode = entry?.reducer.invalidation
? 'recovering'
: entry?.reducer.snapshot && entry.loadState === 'live'
? 'silent'
: 'loading';
const snapshotFlight = get().loadSnapshot(conversationId, refreshMode);
await Promise.all([snapshotFlight, get().connectEvents()]);
},