Skip to content

feat(sidebar): group connections into colored groups#8210

Open
dshved wants to merge 10 commits into
mongodb-js:mainfrom
dshved:connection-groups
Open

feat(sidebar): group connections into colored groups#8210
dshved wants to merge 10 commits into
mongodb-js:mainfrom
dshved:connection-groups

Conversation

@dshved

@dshved dshved commented Jul 5, 2026

Copy link
Copy Markdown

Description

Adds support for organizing saved connections into named, colored groups in the sidebar. The feature is gated behind the enableConnectionGroups feature flag (development stage), so default behavior is unchanged.

  • A group is an entity { id, name, color? } persisted in a dedicated ConnectionGroups FileUserData collection in connection-storage (with IPC exposure), with a groups Redux slice in compass-connections (load + CRUD).
  • A connection references its group via favorite.groupId.
  • Connection form: a combobox to select an existing group or create a new one inline, plus a "Group color" select. The select mirrors the selected group's color; it recolors a group created from the form and is disabled for pre-existing groups (their color is edited from the sidebar).
  • Sidebar: connections are rendered under collapsible group headers tinted with the group color; a group header context menu offers "Edit group…" (rename + color) and "Delete group" (deletes the entity and ungroups its member connections).
image image image

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 — no impact, sidebar/storage-only change
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

Grouping helps users with many saved connections keep the sidebar organized (e.g. per project or environment) and visually distinguish groups by color. Solves the long-standing pain of a flat, unstructured connection list.

Note: as a community contributor I can't open a New Feature issue in the public COMPASS Jira project (it only accepts Bug), so this PR has no COMPASS-XXXX ticket in its title; happy to add one if a maintainer files/links an internal ticket.

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

  • The shared Combobox component has a pre-existing quirk where its "Clear selection" button lacks type="button" and submits an enclosing form. It affects the group combobox too, but the fix belongs in compass-components and touches every consumer, so it's left as a follow-up rather than bundled here.

Dependents

N/A

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)

dshved added 10 commits July 5, 2026 22:19
…form

- drop the description under the group color select so the personalization
  grid rows stay aligned
- default the new group color to No Color instead of the first palette color
- recolor the just-created group when the color select changes (creation
  happens as soon as the name is confirmed, so a color picked after that was
  silently ignored); expose an onUpdateGroup form setting for it
- resolve the blur re-fire of the group combobox (which sends the displayed
  name, not the id) against persisted groups too, so selecting an existing
  group no longer creates a colorless duplicate
- turn the select into a controlled "Group color" field: it mirrors the
  selected group's color and is disabled for pre-existing groups (their color
  is edited from the sidebar)
Expose the updateGroup action as the form's onUpdateGroup setting so the
form can recolor a group it just created. Also type the track stub in the
groups slice spec with createNoopTrack to fix the package typecheck.
Wrap the name and color fields in FormFieldContainer, matching how other
Compass modals space their form fields.
@dshved dshved requested a review from a team as a code owner July 5, 2026 21:01
@dshved dshved requested a review from ivandevp July 5, 2026 21:01
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.

1 participant