fix(webui): settle completed turns across reconnect paths
Separate named completion facts from history adoption, preserve newer and anonymous activity, and keep one mounted whole-snapshot adopter. Unify explicit-ID lifecycle/content closure without discarding uncovered content. Cover the real client/hooks reconnect and selection races, await asynchronous browser fixture startup, and retain current-policy bounded TLC models and missing-evidence limits. Archive historical/candidate verification separately.
This commit is contained in:
1 parent
9e499ad539
commit
53a556585e
34 files changed
+1891
-46
No files matched your search
@@ -544,7 +544,7 @@ export function useNanobotStream(
|
||||
}, [chatId, client]);
|
||||
const settleFragment = useCallback((owner: ThreadTranscript) => {
|
||||
if (!chatId || !owner.fragmentCompletedTurnIds.length) return;
|
||||
client.settleFragmentRunLifecycle(chatId, owner.fragmentCompletedTurnIds);
|
||||
client.settleCompletedRunLifecycle(chatId, owner.fragmentCompletedTurnIds);
|
||||
if (!client.getRunState(chatId)?.active) setRetryStatus(null);
|
||||
}, [chatId, client]);
|
||||
|
||||
@@ -575,7 +575,9 @@ export function useNanobotStream(
|
||||
if (chatId && canonical && (ownRead || !seed)) {
|
||||
if (body?.page?.record_range) {
|
||||
if (accepted) settleFragment(owner);
|
||||
} else if (ownRead && !owner.hasPendingFragmentGap) {
|
||||
} else if (!owner.hasPendingFragmentGap) {
|
||||
// A published reconnect page supersedes this owner's shared read.
|
||||
// The owner must reconcile its completion facts after that handoff too.
|
||||
reconcileCanonical(generation, canonical, accepted);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user