Skip to content

Conversation

@nbbeeken
Copy link
Collaborator

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

Currently we are experiencing a sluggish UI when running compass-web sync, it appears to be emotion related and we can try customizing the build process to insert a call to enable "speedy" mode.

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

  • Does this need to only happen when running in dev mode/sync?
    • NB: I believe so

Dependents

None

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 fix label Sep 10, 2025
@nbbeeken nbbeeken added the no release notes Fix or feature not for release notes label Sep 10, 2025
@nbbeeken nbbeeken marked this pull request as ready for review September 11, 2025 19:13
@nbbeeken nbbeeken requested a review from a team as a code owner September 11, 2025 19:13
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 fixes performance issues in development mode by forcing emotion to always use "speedy" mode for style insertion. The change addresses sluggish UI behavior in compass-web sync by bypassing emotion's default development mode behavior that uses slower style tag insertion.

Key changes:

  • Remove NODE_ENV override in webpack config that forced production mode
  • Add a new module to force emotion speedy mode at startup
  • Improve error handling in the sync script cleanup process

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/compass-web/webpack.config.js Removes webpack plugin that forced NODE_ENV to production
packages/compass-components/src/index.ts Adds import for emotion speedy mode configuration
packages/compass-components/src/force-emotion-speedy.ts New module that forces emotion to use speedy mode for performance
packages/compass-web/scripts/sync-dist-to-mms.js Adds error-proof cleanup utility for the sync script

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

@codeowners-service-app
Copy link

Assigned himanshusinghs for team compass-developers because mabaasit is out of office.

@nbbeeken nbbeeken merged commit 79ffc8a into main Sep 12, 2025
56 of 58 checks passed
@nbbeeken nbbeeken deleted the force-speedy-always branch September 12, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix no release notes Fix or feature not for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants