-
Notifications
You must be signed in to change notification settings - Fork 491
refactor: use orderBy for queue list sorting #8228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🎭 Playwright Tests:
|
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 01/22/2026, 03:42:52 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
📝 WalkthroughWalkthroughThe change refactors task sorting in Changes
Possibly related PRs
Suggested reviewers
✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this 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 refactors the queue list sorting implementation to use es-toolkit's orderBy utility function instead of a custom Array.sort comparator. The change aligns with the project's dependency on es-toolkit for utility functions and makes the sorting intent more explicit.
Changes:
- Replaced
Array.sortwith custom comparator withorderByfrom es-toolkit - Added import for
orderByfrom es-toolkit/array - Maintained existing sorting behavior (descending by most recent timestamp)
| @@ -1,3 +1,4 @@ | |||
| import { orderBy } from 'es-toolkit/array' | |||
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path for orderBy should use 'es-toolkit/compat' instead of 'es-toolkit/array' for consistency with the existing codebase. The file useRegistrySearch.ts already imports orderBy from 'es-toolkit/compat', and using the same import path ensures consistency across the project.
| import { orderBy } from 'es-toolkit/array' | |
| import { orderBy } from 'es-toolkit/compat' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why we can't use array
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 22.3 kB (baseline 22.3 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.02 MB (baseline 1.02 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 80.7 kB (baseline 80.7 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 11 added / 11 removed Panels & Settings — 430 kB (baseline 430 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 8 added / 8 removed User & Accounts — 3.94 kB (baseline 3.94 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 3 added / 3 removed Editors & Dialogs — 2.8 kB (baseline 2.8 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 32.8 kB (baseline 32.8 kB) • ⚪ 0 BReusable component library chunks
Status: 7 added / 7 removed Data & Services — 3.06 MB (baseline 3.06 MB) • 🟢 -29 BStores, services, APIs, and repositories
Status: 7 added / 7 removed Utilities & Hooks — 18.1 kB (baseline 18.1 kB) • 🔴 +1 BHelpers, composables, and utility bundles
Status: 7 added / 7 removed Vendor & Third-Party — 10.4 MB (baseline 10.4 MB) • 🔴 +100 BExternal libraries and shared vendor chunks
Status: 1 added / 1 removed Other — 6.28 MB (baseline 6.28 MB) • 🟢 -214 BBundles that do not match a named category
Status: 35 added / 35 removed |
Use es-toolkit orderBy for queue list sorting. The queue overlay list already sorts by create time, but the implementation used Array.sort with a custom comparator and mutated the array in place. Switch to es-toolkit's orderBy to make the sort intent explicit, avoid mutation, and align with the utility set we already depend on. Sorting keys and direction remain the same, so behavior is unchanged. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8228-fix-use-orderBy-for-queue-list-sorting-2f06d73d365081e791fff7d2212537f8) by [Unito](https://www.unito.io) Co-authored-by: Alexander Brown <drjkl@comfy.org>
Use es-toolkit orderBy for queue list sorting.
The queue overlay list already sorts by create time, but the implementation used Array.sort with a custom comparator and mutated the array in place. Switch to es-toolkit's orderBy to make the sort intent explicit, avoid mutation, and align with the utility set we already depend on. Sorting keys and direction remain the same, so behavior is unchanged.
┆Issue is synchronized with this Notion page by Unito