Skip to content

Conversation

@paula-stacho
Copy link
Collaborator

@paula-stacho paula-stacho commented Dec 10, 2025

Description

Steps:

  • Sampling (with a counter)
  • Analyzing (with a counter)
  • Inferring relationships (without a counter because I think that'd just be confusing.. we don't know how many relationships there are.. but the progress bar moves depending on the number of collections iterated over)
Screenshot 2025-12-10 at 21 30 34

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
  • If this change could impact the load on the MongoDB cluster, please describe the expected and worst case impact
  • 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)

@github-actions github-actions bot added the feat label Dec 10, 2025
Copy link

@dianchenghu dianchenghu left a comment

Choose a reason for hiding this comment

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

Can we change the progress lables text with ellipsis(…)instead of ..?
For example: Sampling collections…

@paula-stacho paula-stacho marked this pull request as ready for review December 10, 2025 20:31
@paula-stacho paula-stacho requested a review from a team as a code owner December 10, 2025 20:31
Copy link
Contributor

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 implements a progress tracking system for diagram creation in Compass data modeling. The key improvement is replacing a simple "Analyzing..." loader with a detailed progress indicator that shows three distinct phases: sampling collections, analyzing schemas, and inferring relationships. Each phase displays real-time progress with counters, giving users better visibility into the analysis process.

Key changes:

  • Introduced granular progress tracking with step-based state management (SAMPLING, ANALYZING_SCHEMA, INFERRING_RELATIONSHIPS)
  • Created a new AnalysisProgressStatus component with a progress bar that updates as collections are processed
  • Refactored the analysis process state to track progress per phase rather than just "idle" vs "in-progress"

Reviewed changes

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

Show a summary per file
File Description
packages/compass-data-modeling/src/store/analysis-process.ts Refactored state management to track analysis steps and phase-specific progress counters
packages/compass-data-modeling/src/components/analysis-progress-status.tsx New component implementing the progress indicator UI with cancel functionality
packages/compass-data-modeling/src/components/analysis-progress-status.spec.tsx Test coverage for the progress status component across different analysis scenarios
packages/compass-data-modeling/src/components/diagram-editor.tsx Updated to use the new progress component instead of generic cancel loader
packages/compass-data-modeling/src/components/new-diagram-form.tsx Updated to use the new selector for checking analysis progress state
packages/compass-data-modeling/src/components/diagram-editor-toolbar.tsx Minor cleanup removing redundant property assignment
packages/compass-data-modeling/test/setup-store.tsx Enhanced test setup to support sampling simulation and exported test connections
packages/compass-components/src/components/loader.tsx Added new ProgressLoaderWithCancel component combining progress bar with cancel button
packages/compass-components/src/components/leafygreen.tsx Exported ProgressBar component from leafygreen-ui
packages/compass-components/package.json Added @leafygreen-ui/progress-bar dependency
packages/compass-components/src/index.ts Exported the new ProgressLoaderWithCancel component

@paula-stacho paula-stacho force-pushed the COMPASS-9521 branch 2 times, most recently from 6eea216 to 9d57c3f Compare December 11, 2025 10:56
@paula-stacho paula-stacho merged commit 0268356 into main Dec 16, 2025
57 of 58 checks passed
@paula-stacho paula-stacho deleted the COMPASS-9521 branch December 16, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants