mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-05-15 22:30:38 +08:00
fix: clear stale accepted commit marker after deleting local IndexedDB caches
When users delete local BME IndexedDB via UI actions (delete current/all IDB), the chat metadata's st_bme_commit_marker was not cleared. This left an accepted high-revision promise with no local DB backing, causing persist-mismatch:indexeddb-behind-commit-marker and blocking graph load indefinitely. - index.js: add clearCurrentChatCommitMarker() helper and expose via runtime - ui-actions-controller.js: call clearCurrentChatCommitMarker before syncGraphLoadFromLiveContext after IDB deletion - p0-regressions.mjs: regression test asserting marker is cleared before reload after current-IDB deletion
This commit is contained in:
@@ -1193,6 +1193,10 @@ export async function onDeleteCurrentIdbController(runtime) {
|
||||
});
|
||||
}
|
||||
runtime.clearCachedIndexedDbSnapshot?.(chatId);
|
||||
runtime.clearCurrentChatCommitMarker?.({
|
||||
reason: "manual-delete-current-idb",
|
||||
immediate: true,
|
||||
});
|
||||
runtime.syncGraphLoadFromLiveContext?.({
|
||||
source: "manual-delete-current-idb",
|
||||
force: true,
|
||||
@@ -1245,6 +1249,10 @@ export async function onDeleteAllIdbController(runtime) {
|
||||
runtime.clearAllCachedIndexedDbSnapshots?.();
|
||||
const activeChatId = runtime.getCurrentChatId?.();
|
||||
if (activeChatId) {
|
||||
runtime.clearCurrentChatCommitMarker?.({
|
||||
reason: "manual-delete-all-idb",
|
||||
immediate: true,
|
||||
});
|
||||
runtime.syncGraphLoadFromLiveContext?.({
|
||||
source: "manual-delete-all-idb",
|
||||
force: true,
|
||||
|
||||
Reference in New Issue
Block a user