Skip to content

feat(indexing): Introduce notification for file removal during indexing - #676

Merged
haiphucnguyen merged 3 commits into
mainfrom
feature/show-notification-when-rag-changes-in-watchers
Aug 27, 2026
Merged

haiphucnguyen merged 3 commits into
mainfrom
feature/show-notification-when-rag-changes-in-watchers

Conversation

@haiphucnguyen

Copy link
Copy Markdown
Collaborator
  • Implements FileRemovedFromIndexEvent to track file deletions from the index.
  • Displays a visual notification in the UI when a watched file is removed.
  • Ensures users are aware of changes in the indexed content state.

- Implements FileRemovedFromIndexEvent to track file deletions from the index.
- Displays a visual notification in the UI when a watched file is removed.
- Ensures users are aware of changes in the indexed content state.
Copilot AI lite review requested due to automatic review settings August 27, 2026 17:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new user-facing notification when the file watcher detects a watched file/directory deletion and removes it from the project index, wiring the event from indexing/watch logic through to the desktop notification UI.

Changes:

  • Emit FileRemovedFromIndexEvent on watcher delete events and include projectName in watcher-driven indexing events.
  • Render the new removal event in the desktop notifications UI (label + icon) and add i18n strings across supported locales.
  • Bump langchain4j-jvector version and project version.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
shared/src/main/kotlin/io/askimo/core/rag/watching/FileChangeHandler.kt Emits removal + indexing lifecycle events from watcher callbacks; refactors reindexFile to return success.
shared/src/main/kotlin/io/askimo/core/rag/indexing/LocalFoldersIndexingCoordinator.kt Passes projectName into FileChangeHandler.
shared/src/main/kotlin/io/askimo/core/event/user/IndexingEvent.kt Introduces FileRemovedFromIndexEvent.
desktop-shared/src/main/kotlin/io/askimo/ui/shell/NotificationComponents.kt Displays the new removal notification (icon + label) and handles it in the internal event stream.
desktop-shared/src/main/resources/i18n/messages.properties Adds event.file.removed string.
desktop-shared/src/main/resources/i18n/messages_de.properties Adds event.file.removed string.
desktop-shared/src/main/resources/i18n/messages_es.properties Adds event.file.removed string.
desktop-shared/src/main/resources/i18n/messages_fr.properties Adds event.file.removed string.
desktop-shared/src/main/resources/i18n/messages_ja_JP.properties Adds event.file.removed string.
desktop-shared/src/main/resources/i18n/messages_ko_KR.properties Adds event.file.removed string.
desktop-shared/src/main/resources/i18n/messages_pt_BR.properties Adds event.file.removed string.
desktop-shared/src/main/resources/i18n/messages_vi_VN.properties Adds event.file.removed string.
desktop-shared/src/main/resources/i18n/messages_zh_CN.properties Adds event.file.removed string.
desktop-shared/src/main/resources/i18n/messages_zh_TW.properties Adds event.file.removed string.
gradle/libs.versions.toml Updates langchain4j-jvector version.
gradle.properties Bumps project version.
Suppressed comments (1)

shared/src/main/kotlin/io/askimo/core/rag/watching/FileChangeHandler.kt:77

  • indexedCount is incremented when reindexFile(file) returns true, but reindexFile currently returns true even when it intentionally skips indexing (e.g., no extractable/blank content). This will over-report filesIndexed in IndexingCompletedEvent and the UI (e.g., showing "1 file indexed" when none were indexed).
                var indexedCount = 0
                filePath.walk()
                    .filter { it.isRegularFile() && !shouldExcludePath(it) }
                    .forEach { file ->
                        if (reindexFile(file)) indexedCount++
                    }

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 53 to +63
if (kind == StandardWatchEventKinds.ENTRY_DELETE) {
log.debug("Path deleted: {}, removing from index...", filePath.fileName)
batchIndexer.removeDirectoryFromIndex(filePath)
batchIndexer.removeFileFromIndex(filePath)
EventBus.emit(
FileRemovedFromIndexEvent(
projectId = projectId,
projectName = projectName,
fileName = filePath.fileName.toString(),
),
)
haiphucnguyen and others added 2 commits August 27, 2026 11:10
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@haiphucnguyen
haiphucnguyen merged commit e5026c3 into main Aug 27, 2026
2 of 10 checks passed
@haiphucnguyen
haiphucnguyen deleted the feature/show-notification-when-rag-changes-in-watchers branch August 27, 2026 18:11
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