Problem
When a user opens a project in ProjectView, indexing starts automatically. The
indexing progress is only visible while the user stays on ProjectView - it
renders the progress inline in that screen.
If the user navigates away (e.g. starts a chat, switches to another view), they have
no indication that:
- Indexing is still running in the background
- Indexing has completed successfully
- Indexing has failed
This creates a confusing experience: the user may start chatting expecting RAG to be
available, but the index isn't ready yet - with no feedback.
Root Cause
ProjectIndexer emits IndexingStartedEvent, IndexingQueuedEvent,
IndexingCompletedEvent, and IndexingFailedEvent to EventBus.userEvents, but
NotificationComponents.notificationIcon currently only listens for
UpdateAvailableEvent and ShellErrorEvent. Indexing events are silently dropped.
Proposed Solution
1. Handle indexing events in notificationIcon (NotificationComponents.kt)
The existing LaunchedEffect in notificationIcon already collects from
EventBus.userEvents. Extend notificationEventCard to render cards for:
| Event |
Icon |
Card style |
IndexingQueuedEvent |
HourglassEmpty |
neutral surfaceVariant |
IndexingStartedEvent |
Sync (animated spin) |
neutral surfaceVariant |
IndexingCompletedEvent |
CheckCircleOutline |
tertiaryContainer (green-ish) |
IndexingFailedEvent |
ErrorOutline |
error-tinted surfaceVariant |
The card should show:
- Project name (
event.projectName)
- Status label (e.g. "Indexing…", "Index ready", "Indexing failed")
- Timestamp
- For
IndexingCompletedEvent: files indexed count (event.filesIndexed)
- For
IndexingFailedEvent: error message + selectable stack trace (same pattern as
ShellErrorEvent cause expansion)
- For
IndexingStartedEvent / IndexingQueuedEvent: auto-dismiss the card once
IndexingCompletedEvent or IndexingFailedEvent arrives for the same project
(replace in the events list by projectId)
2. Auto-open bell for terminal states
Mirror the existing behaviour for UpdateAvailableEvent and ShellErrorEvent:
IndexingFailedEvent → auto-open the notification popup (user must know)
IndexingCompletedEvent → increment unread badge only (don't force-open)
3. Deduplicate in-progress cards
If IndexingStartedEvent arrives for a project that already has a
IndexingQueuedEvent card, replace the queued card in-place rather than appending.
Use projectId as the deduplication key.
Files Affected
| File |
Change |
NotificationComponents.kt |
Handle IndexingStartedEvent, IndexingQueuedEvent, IndexingCompletedEvent, IndexingFailedEvent in notificationEventCard and notificationIcon |
| i18n resource files |
Add keys: event.indexing.started, event.indexing.queued, event.indexing.completed, event.indexing.failed, event.indexing.files_indexed |
Problem
When a user opens a project in
ProjectView, indexing starts automatically. Theindexing progress is only visible while the user stays on
ProjectView- itrenders the progress inline in that screen.
If the user navigates away (e.g. starts a chat, switches to another view), they have
no indication that:
This creates a confusing experience: the user may start chatting expecting RAG to be
available, but the index isn't ready yet - with no feedback.
Root Cause
ProjectIndexeremitsIndexingStartedEvent,IndexingQueuedEvent,IndexingCompletedEvent, andIndexingFailedEventtoEventBus.userEvents, butNotificationComponents.notificationIconcurrently only listens forUpdateAvailableEventandShellErrorEvent. Indexing events are silently dropped.Proposed Solution
1. Handle indexing events in
notificationIcon(NotificationComponents.kt)The existing
LaunchedEffectinnotificationIconalready collects fromEventBus.userEvents. ExtendnotificationEventCardto render cards for:IndexingQueuedEventHourglassEmptysurfaceVariantIndexingStartedEventSync(animated spin)surfaceVariantIndexingCompletedEventCheckCircleOutlinetertiaryContainer(green-ish)IndexingFailedEventErrorOutlinesurfaceVariantThe card should show:
event.projectName)IndexingCompletedEvent: files indexed count (event.filesIndexed)IndexingFailedEvent: error message + selectable stack trace (same pattern asShellErrorEventcause expansion)IndexingStartedEvent/IndexingQueuedEvent: auto-dismiss the card onceIndexingCompletedEventorIndexingFailedEventarrives for the same project(replace in the events list by
projectId)2. Auto-open bell for terminal states
Mirror the existing behaviour for
UpdateAvailableEventandShellErrorEvent:IndexingFailedEvent→ auto-open the notification popup (user must know)IndexingCompletedEvent→ increment unread badge only (don't force-open)3. Deduplicate in-progress cards
If
IndexingStartedEventarrives for a project that already has aIndexingQueuedEventcard, replace the queued card in-place rather than appending.Use
projectIdas the deduplication key.Files Affected
NotificationComponents.ktIndexingStartedEvent,IndexingQueuedEvent,IndexingCompletedEvent,IndexingFailedEventinnotificationEventCardandnotificationIconevent.indexing.started,event.indexing.queued,event.indexing.completed,event.indexing.failed,event.indexing.files_indexed