-
Notifications
You must be signed in to change notification settings - Fork 228
feat(compass-indexes): add index build progress COMPASS-9495 #7200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds index build progress tracking to the MongoDB Compass indexes table, showing a percentage indicator when indexes are being built. The implementation introduces a new hook for polling index progress via currentOp
command and updates the UI to display build progress and a spinner for in-progress indexes.
- Adds
useIndexProgress
hook for tracking index build progress via polling - Updates Redux state to track progress percentage for in-progress indexes
- Modifies UI components to display progress indicators and spinners for building indexes
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
test/setup-store.ts |
Adds mock currentOp method to test data service |
src/stores/store.ts |
Extends data service type to include currentOp for progress tracking |
src/modules/regular-indexes.ts |
Adds progress tracking logic, new actions, and getIndexesProgress thunk |
src/modules/regular-indexes.spec.ts |
Adds tests for index progress tracking functionality |
src/hooks/use-index-progress.ts |
New custom hook for managing index build progress polling |
src/components/regular-indexes-table/regular-indexes-table.tsx |
Integrates progress hook and updates index filtering logic |
src/components/regular-indexes-table/regular-indexes-table.spec.tsx |
Updates tests to mock the progress hook |
src/components/regular-indexes-table/regular-index-actions.tsx |
Adds progress display UI with spinner and percentage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Description
Add a percentage to the index build row in the table if it is in progress.
https://jira.mongodb.org/browse/COMPASS-9495
Checklist
Motivation and Context
Open Questions
For reviewers:
useIndexProgress
?getInProgressIndexInfo
used to just list stub indexes because even in progress ones would be listed as "ready" while they continued to build on the server. We now will list "real" indexes via this function. Is that the right approach?Dependents
Types of changes
Screen.Recording.2025-08-15.at.2.29.25.PM.mov
index_finish.mov