261
}
262
}
264
>
// Read live state for an unopened session: synthesise the aggregate
265
>
// from the live `changeKind: 'branch'` changeset state. Counts stay
266
>
// in lockstep with the actual changeset state for the session-list chip.
267
>
const liveSession = this._stateManager.getChangesetState(buildBranchChangesetUri(sessionUri));
268
>
const liveChanges = computeChangesSummaryFromLiveState(liveSession);
269
>
if (liveChanges) {
270
// Migrate the changes summary to the new storage mechanism.
271
this.persistChangesSummary(sessionUri, liveChanges);
272
return liveChanges;
273
}
275
>
// No live source — try persisted blobs (if the caller batched them).
276
>
const branchRaw = metadata[META_CHANGESET_BRANCH];
277
>
const legacyRaw = metadata[META_LEGACY_DIFFS];
278
if (branchRaw === undefined && legacyRaw === undefined) {
280
>
}
281
const restored = this.parsePersistedStaticChangesets(sessionUri, { branchRaw, legacyRaw });
282