fix(web): reconcile title snapshots on recovery

This commit is contained in:
Tianyi Cui
2026-07-23 20:08:22 +08:00
parent 3bd27df5a2
commit 41a6a07833
3 changed files with 38 additions and 1 deletions
@@ -177,6 +177,13 @@ export class SessionManager {
this.notifier.markDirty()
return
}
if (frame.type === 'session/subscribed') {
const current = this.titleSnapshots.get(frame.sessionId)
if (current !== undefined && current.eventSeq > frame.lastSeq) {
this.titleSnapshots.delete(frame.sessionId)
this.notifier.markDirty()
}
}
const session = this.sessions.get(frame.sessionId)
if (session === undefined) {
// Approval/question frames never hit history: buffer for replay on instantiation;