Skip to content

Conversation

@Anemy
Copy link
Member

@Anemy Anemy commented Dec 3, 2025

COMPASS-9690

Description

Adds a new preference to Compass legacyUUIDDisplayEncoding. When this is set it'll change how we render Binary subtype 3 values.

There are a good amount of folks using Legacy UUIDs (created via Java, CSharp, and Python) in Compass. We want to give them the ability to view (this pr) and modify (not this pr) their legacy UUIDs in Compass in a format they're comfortable with.

  • New feature

Part of this ticket involves making these values editable. This PR focuses only on the display side of things, the Binary values are still not-editable. There will be another pr updating them to be editable.

Screenshot 2025-12-03 at 10 09 52

No encoding (raw)
Screenshot 2025-12-03 at 09 34 44

LegacyJavaUUID
Screenshot 2025-12-03 at 09 34 15

LegacyPythonUUID
Screenshot 2025-12-03 at 09 34 30

LegacyCSharpUUID
Screenshot 2025-12-03 at 09 34 02

@Anemy Anemy requested a review from a team as a code owner December 3, 2025 18:25
@Anemy Anemy requested review from Copilot and mabaasit December 3, 2025 18:25
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 adds a new user preference legacyUUIDDisplayEncoding that allows users to choose how Binary subtype 3 (Legacy UUID) values are displayed in Compass. The feature supports viewing legacy UUIDs in Java, C#, Python, or raw formats, addressing the needs of users who work with legacy UUID implementations from different programming languages.

Key changes:

  • Added a new legacyUUIDDisplayEncoding preference with four encoding options (raw, Java, C#, Python)
  • Implemented UUID conversion logic to transform legacy UUIDs between different language-specific formats
  • Extended the settings UI to include the new preference in the General settings section

Reviewed changes

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

Show a summary per file
File Description
packages/compass-preferences-model/src/preferences-schema.tsx Defines the new legacyUUIDDisplayEncoding preference with validation schema and UI options
packages/compass-preferences-model/src/provider.ts Exports the LEGACY_UUID_ENCODINGS constant for use across packages
packages/compass-components/src/components/document-list/legacy-uuid-format-context.tsx Creates React context for providing legacy UUID display encoding preference throughout the component tree
packages/compass-components/src/components/compass-components-provider.tsx Integrates the legacy UUID display context into the main component provider
packages/compass-components/src/components/bson-value.tsx Implements the LegacyUUIDValue component with conversion functions for Java, C#, and Python UUID formats
packages/compass-components/src/components/bson-value.spec.tsx Adds comprehensive test coverage for legacy UUID display formats including error handling
packages/compass-settings/src/components/settings/settings-list.tsx Refactors the enum setting component to handle multiple string enum preferences instead of just defaultSortOrder
packages/compass-settings/src/components/settings/general.tsx Adds the new preference to the General settings section
packages/compass-settings/src/components/settings/general.spec.tsx Tests the rendering and interaction of the new preference in the settings UI
packages/compass/src/app/components/home.tsx Passes the preference value to the CompassComponentsProvider
packages/compass-web/src/entrypoint.tsx Passes the preference value to the CompassComponentsProvider in the web version

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot added the feat label Dec 3, 2025
@Anemy Anemy added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label Dec 3, 2025
@codeowners-service-app
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants