Commit Graph

14 Commits

Author SHA1 Message Date
Youzini-afk
05d3fe3fbd fix: harden mobile local store recovery flow 2026-04-15 12:43:43 +08:00
Youzini-afk
1867662653 fix: align cleanup actions with opfs storage 2026-04-14 19:55:30 +08:00
Youzini-afk
5bd29c99d5 fix: orphan accepted commit marker self-healing — auto-clear stale marker when no recoverable graph source exists
- Add maybeResolveOrphanAcceptedCommitMarker() for conservative orphan detection:
  - Chat-state sidecar rescue first (preserves marker, keeps mismatch diagnostic)
  - Only clears marker when ALL local sources confirmed absent
  - Guards: shadow-available, migration-failed, chat-switched all block clearing
- Enhance clearCurrentChatCommitMarker() with resetAcceptedRevision option
  - Resets lastAcceptedRevision and acceptedStorageTier when marker is orphan
- Integrate orphan resolution into loadGraphFromIndexedDb() empty+mismatch branch
- Update onDeleteCurrentIdbController/onDeleteAllIdbController to resetAcceptedRevision
- Update graph-persistence regressions:
  - Orphan marker scenario now auto-heals to EMPTY_CONFIRMED (was: permanently BLOCKED)
  - Add chat-state rescue guard test: sidecar data prevents marker clearing
2026-04-12 20:36:03 +08:00
Youzini-afk
05083ef5f0 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
2026-04-12 20:07:05 +08:00
Youzini-afk
de7e598490 fix: graph load stuck in LOADING after IndexedDB cache deletion or commit-marker mismatch
- reconcileIndexedDbProbeFailureState now handles persist-mismatch:indexeddb-* reasons, ensuring bounded retries and transition to BLOCKED instead of hanging forever in LOADING
- expose clearCachedIndexedDbSnapshot, clearAllCachedIndexedDbSnapshots, closeBmeDb, closeAllBmeDbs, syncGraphLoadFromLiveContext in runtime context for UI actions
- onDeleteCurrentIdbController / onDeleteAllIdbController now clear in-memory caches, close DB handles, and force a fresh graph load sync after deletion
- humanize persist-mismatch:indexeddb-behind-commit-marker panel messages into user-friendly Chinese text
- add regression test for empty IndexedDB + accepted commit marker mismatch fallback-to-blocked scenario
2026-04-12 19:00:30 +08:00
Youzini-afk
b2d8fcc7a1 Fix processed history hash rebuild after recovery 2026-04-11 01:45:47 +08:00
Hao19911125
9a6645609c Merge branch 'main' into main 2026-04-10 19:06:23 +08:00
Youzini-afk
7b1f125e17 Move summary clear into cleanup 2026-04-10 18:56:31 +08:00
Hao19911125
965e5dff0a Merge branch 'main' into main 2026-04-10 18:43:42 +08:00
Youzini-afk
517abc6a30 Refactor rerun and summary rebuild ranges 2026-04-10 18:38:54 +08:00
Hao19911125
09b6e1e566 Add manual cloud backup controls and manager modal 2026-04-10 17:26:57 +08:00
Youzini-afk
e4feda5471 Add hierarchical summary frontier system 2026-04-09 14:50:52 +08:00
Youzini-afk
29af3d164e feat: 新增「数据清理」配置页
- 图谱清理:清空当前图谱、按楼层范围删除节点
- 缓存清理:清空向量缓存、清空提取历史
- 存储清理:清空当前/全部 IDB、清空服务端同步文件
- 高危操作全部需要 confirm 弹窗确认
- 清空全部 IDB 和清空服务端同步文件需要输入 DELETE 确认
2026-04-08 14:29:13 +08:00
Youzini-afk
feec17f3e3 Reorganize modules into layered directories 2026-04-08 01:17:57 +08:00