Skip to content

fix: prevent dropdown labels from requiring groups#122

Merged
overtrue merged 3 commits into
mainfrom
fix/site-replication-dropdown-label
May 25, 2026
Merged

fix: prevent dropdown labels from requiring groups#122
overtrue merged 3 commits into
mainfrom
fix/site-replication-dropdown-label

Conversation

@overtrue
Copy link
Copy Markdown
Collaborator

@overtrue overtrue commented May 24, 2026

Pull Request

Description

Fixes the site replication peer action menu crash reported in rustfs/rustfs#3066.

The dropdown label wrapper was rendering Base UI's Menu.GroupLabel directly. In Base UI, group labels must be nested under Menu.Group; otherwise opening the dropdown throws Base UI: MenuGroupRootContext is missing, causing the page-level error fallback. The shared dropdown label now renders a plain div, matching the expected shadcn-style label behavior for non-grouped menu sections.

This also removes an accidentally duplicated YAML document from pnpm-lock.yaml, which was breaking frozen installs, and updates GitHub Actions to use pnpm install --frozen-lockfile instead of the unsupported/broken pnpm ci command for pnpm projects.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvements
  • Security fix

Testing

  • Unit tests added/updated
  • Manual testing completed
source ~/.nvm/nvm.sh && nvm use v22
pnpm install --frozen-lockfile
pnpm type-check
pnpm lint
pnpm build

No unit test script is defined in package.json; this change is covered by type-check/lint/build validation.

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • TypeScript types are properly defined
  • All commit messages are in English (Conventional Commits)
  • All existing tests pass
  • No new dependencies added, or they are justified

Related Issues

Related to rustfs/rustfs#3066

Screenshots (if applicable)

N/A

Additional Notes

N/A

Copy link
Copy Markdown
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 a runtime crash when opening certain dropdown menus by removing the dependency on Base UI’s Menu.GroupLabel context, and restores lockfile correctness so installs can run with --frozen-lockfile.

Changes:

  • Update DropdownMenuLabel to render a plain div (instead of Menu.GroupLabel) so labels don’t require being nested under Menu.Group.
  • Remove an accidentally duplicated YAML document from pnpm-lock.yaml that was breaking frozen installs.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

File Description
components/ui/dropdown-menu.tsx Changes the shared dropdown label wrapper to a plain div to prevent Base UI context errors when used outside groups.
pnpm-lock.yaml Removes a duplicated YAML document to restore valid lockfile structure for pnpm install --frozen-lockfile.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Pin pnpm/action-setup to pnpm 10.19.0 so the existing lockfile can be used with frozen installs in CI. pnpm 11 currently rewrites package-manager metadata from devEngines before install and then fails with ERR_PNPM_NO_LOCKFILE.
@overtrue overtrue merged commit 67350e8 into main May 25, 2026
11 checks passed
@overtrue overtrue deleted the fix/site-replication-dropdown-label branch May 25, 2026 00:56
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