mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
Overview cache had no self-invalidation: once written it would return stale lastMessageTs forever if the postImportHook failed silently. Analysis query cache (17 chart/stats queries) was never cleared on import, so charts showed stale data until the user triggered a manual invalidate. Add MAX(message.id) fingerprint to OverviewCache and introduce getValidatedOverviewCache(), which recomputes automatically when new messages are inserted. Update resolveOverview() in the Electron worker to use this instead of bare getCache(). In both postImportHooks (incrementalImport, streamImport) also call deleteSessionCache against the query cache directory so chart data is fresh after every import. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>