Skip to content

Fix stale cache refresh for updated session files#4

Merged
abasiri merged 1 commit intodoctly:mainfrom
AliFozooni:main
Mar 15, 2026
Merged

Fix stale cache refresh for updated session files#4
abasiri merged 1 commit intodoctly:mainfrom
AliFozooni:main

Conversation

@AliFozooni
Copy link
Contributor

Summary

  • derive the cached folder index timestamp from the project directory and its root session .jsonl files
  • use that timestamp consistently in the initial worker scan and in background refresh checks
  • add a regression test for appending to an existing session file

Why

Background refresh currently keys off the project directory mtime. Appending to an existing session file updates the file mtime but usually leaves the directory mtime unchanged, so long-running sessions can keep stale ordering, message counts, titles, and search data until a new file appears or the app restarts.

Verification

  • npm test

@abasiri abasiri self-requested a review March 15, 2026 20:53
@abasiri abasiri merged commit 90c3507 into doctly:main Mar 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants