fix: sort packages panel list case-insensitively#10168
Merged
Merged
Conversation
The packages panel rendered packages in the order returned by the backend, which sorts case-sensitively (uppercase before lowercase). This pushed capitalized package names above lowercase ones. Sort the list case-insensitively in the display layer so it is strictly alphabetical regardless of capitalization or package manager.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the ordering of packages in the editor’s Packages panel by ensuring the UI list is sorted case-insensitively, so capitalization differences from backend/package-manager output don’t affect the displayed order.
Changes:
- Add a memoized, case-insensitive sort for the packages list in the display layer.
- Render the table rows from the sorted list instead of the backend-provided order.
Contributor
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="frontend/src/components/editor/chrome/panels/packages-panel.tsx">
<violation number="1" location="frontend/src/components/editor/chrome/panels/packages-panel.tsx:310">
P3: The uppercase/lowercase ordering fix is untested, so the exact regression this PR addresses can return without detection. A focused `PackagesList` test with mixed-case package names would preserve the display-order contract.
(Based on your team's feedback about regression tests for behavior fixes.) [FEEDBACK_USED].</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The packages panel rendered packages in the order returned by the backend, which sorts case-sensitively (uppercase before lowercase). This pushed capitalized package names above lowercase ones. Sort the list case-insensitively in the display layer so it is strictly alphabetical regardless of capitalization or package manager.
Closes MO-4893