You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Configurable file watching and manual rescan for reference material directories #619
When a reference material directory is added to a project, Askimo automatically watches it for file changes. On Linux this relies on the kernel's inotify interface, which requires one watch per file and directory. The default system limit (fs.inotify.max_user_watches) is relatively low and can easily be exhausted by large reference material trees.
The issue may happens to other OS as well, so the solution does not check only Linux OS
Problems
Silent failure - When the inotify watch limit is exceeded, Askimo throws an exception internally and stops registering watches. The user receives no feedback and incorrectly assumes that change detection is active.
projectCoordinators.forEach { coordinator ->
try {
coordinator.startWatching(scope)
} catch (e: Exception) {
log.error("Failed to start watching for project $projectId", e)
// ← user never knows watching failed
}
}
The user sees a successful "Indexed" status but change detection is silently broken.
No user control over watching - Watching is always enabled for reference material directories. Users with large directories, resource-constrained systems, or no need for automatic change detection have no way to opt out.
If watching is disabled or has silently failed, the only way to pick up file changes is to remove and re-add the reference material, or scanning the entire project again - a poor experience.
Proposal
Per-source watch toggle - Add a watchForChanges flag to KnowledgeSourceConfig so the preference is persisted per knowledge source. The UI should expose this when adding or editing a reference material directory.
Manual "Rescan" action - Add a rescan button in the UI that emits a ProjectReIndexEvent (or a more targeted per-source event) to trigger ProjectIndexer's existing re-index flow on demand.
Surface watch failures - When startWatching() throws, emit an AppErrorEvent (already used elsewhere in ProjectIndexer) with a user-friendly message, e.g.: "File watching could not be started for this directory. You can rescan manually or increase fs.inotify.max_user_watches."
Activity
DenisFrolkov commentedon Aug 21, 2026
Hi @haiphucnguyen, is this still open? I'd like to give it a try
haiphucnguyen commentedon Aug 21, 2026
Hi @DenisFrolkov , it still be open. Assigned it to you, looking forward to your PR!