fix: IndexedDB probe 失败后不再永久卡在 loading,重试耗尽后回退到 blocked

- index.js: 新增 reconcileIndexedDbProbeFailureState,后台 probe 失败时先有限重试,耗尽后切到 blocked
- index.js: scheduleIndexedDbGraphProbe 的 .then/.catch 均接入 reconcile 逻辑
- index.js: createGraphLoadUiStatus blocked 文案更新
- ui/panel.js: _getGraphLoadLabel blocked 文案更新,不再误导为元数据未就绪
- tests/graph-persistence.mjs: 新增 manager-unavailable / read-failed 回归
- tests/graph-persistence.mjs: harness 支持 __indexedDbExportSnapshotShouldThrow / __indexedDbGetCurrentDbShouldThrow
This commit is contained in:
Youzini-afk
2026-04-12 16:49:48 +08:00
parent f192a7d23a
commit b31088cc35
3 changed files with 152 additions and 4 deletions

View File

@@ -9913,7 +9913,7 @@ function _getGraphLoadLabel(loadState = "") {
case "empty-confirmed":
return "当前聊天还没有图谱";
case "blocked":
return "聊天元数据未就绪,已暂停图谱写回以保护旧数据";
return "当前聊天图谱未能完成 IndexedDB 确认,请稍后重试";
case "loaded":
return "聊天图谱已加载";
case "no-chat":