Skip to content

Conversation

nbbeeken
Copy link
Collaborator

@nbbeeken nbbeeken commented Sep 2, 2025

Description

Refactor compass index status to be related to buildProgress and change in-progress to be "creating" to reflect it's proper state.

https://jira.mongodb.org/browse/COMPASS-9821

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@nbbeeken nbbeeken force-pushed the COMPASS-9495-enchance-index-organization branch from bf80380 to ceaacbb Compare September 2, 2025 20:40
Comment on lines +84 to +92
{status === 'creating' && (
<Badge data-testid="index-creating" variant={BadgeVariant.Blue}>
Creating
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It wasn't strictly necessary to switch the name of this, but changing the type to something else helped with generating type errors on things that relied upon the current status that would break if we potentially changed when/how the status changed.

I can change it back to in-progress now, I offer that "creating" has alignment with "createIndex" the command that it represents.

Base automatically changed from COMPASS-9495 to main September 9, 2025 17:11
@nbbeeken nbbeeken force-pushed the COMPASS-9495-enchance-index-organization branch 4 times, most recently from 2f6edd7 to 84f1f4e Compare September 9, 2025 18:52
@nbbeeken nbbeeken marked this pull request as ready for review September 9, 2025 18:52
@Copilot Copilot AI review requested due to automatic review settings September 9, 2025 18:52
@nbbeeken nbbeeken requested a review from a team as a code owner September 9, 2025 18:52
Copy link
Contributor

@Copilot Copilot AI left a 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 refactors compass index status terminology by changing "in-progress" to "creating" for better semantic clarity and consolidates index action handling. The change also introduces a "building" status distinction for indexes that have actual build progress.

  • Replaced "inprogress" status with "creating" throughout the codebase
  • Consolidated RegularIndexActions and InProgressIndexActions into a unified IndexActions component
  • Added logic to map regular index build progress to appropriate status display

Reviewed Changes

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

Show a summary per file
File Description
packages/compass-indexes/test/fixtures/regular-indexes.ts Updated test fixtures to use 'creating' status
packages/compass-indexes/src/modules/regular-indexes.ts Changed status type from 'inprogress' to 'creating'
packages/compass-indexes/src/index.spec.tsx Updated test expectations for 'Creating' badge text
packages/compass-indexes/src/components/regular-indexes-table/status-field.tsx Added 'inprogress' to type union and updated badge rendering
packages/compass-indexes/src/components/regular-indexes-table/regular-indexes-table.tsx Added status determination logic and consolidated action components
packages/compass-indexes/src/components/regular-indexes-table/regular-indexes-table.spec.tsx Updated test data to use 'creating' status
packages/compass-indexes/src/components/regular-indexes-table/regular-index-actions.tsx Removed (consolidated into index-actions.tsx)
packages/compass-indexes/src/components/regular-indexes-table/regular-index-actions.spec.tsx Removed (consolidated into index-actions.spec.tsx)
packages/compass-indexes/src/components/regular-indexes-table/index-actions.tsx New unified component handling all index types
packages/compass-indexes/src/components/regular-indexes-table/index-actions.spec.tsx New comprehensive test suite for unified component
packages/compass-indexes/src/components/regular-indexes-table/in-progress-index-actions.tsx Removed (consolidated into index-actions.tsx)
packages/compass-indexes/src/components/regular-indexes-table/in-progress-index-actions.spec.tsx Removed (consolidated into index-actions.spec.tsx)
packages/compass-indexes/src/components/indexes/indexes.spec.tsx Updated test expectations for 'Creating' text

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nbbeeken nbbeeken changed the title refactor(compass-indexes): index status in-progress to creating and add building refactor(compass-indexes): index status in-progress to creating and add building COMPASS-9821 Sep 9, 2025
@gribnoysup gribnoysup self-requested a review September 16, 2025 13:09
@nbbeeken nbbeeken force-pushed the COMPASS-9495-enchance-index-organization branch from 84f1f4e to 4d4ac83 Compare September 29, 2025 09:27
Copy link
Collaborator

@gribnoysup gribnoysup left a comment

Choose a reason for hiding this comment

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

Looks good! I think we might want both creating and in prgress badges, not replacing one with the other

@nbbeeken nbbeeken force-pushed the COMPASS-9495-enchance-index-organization branch from 4d4ac83 to 0939c9d Compare September 30, 2025 10:12
@nbbeeken nbbeeken merged commit 81de486 into main Oct 1, 2025
100 of 107 checks passed
@nbbeeken nbbeeken deleted the COMPASS-9495-enchance-index-organization branch October 1, 2025 00:10
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