Fix bundle analyzer source table delta sorting (#99369)
## Summary Follow-up to #98539 addressing [Luke’s `toSorted()` feedback](https://github.com/vercel/next.js/pull/98539#discussion_r4098899189), [signed Δ ordering feedback](https://github.com/vercel/next.js/pull/98539#discussion_r4098962512), and [locale-aware name tie-breaker feedback](https://github.com/vercel/next.js/pull/99369#discussion_r4125394575). The source table sorts individual rows and package aggregates by signed Δ in either direction; identical rows and groups remain last for every column. The separate impact-ranked route picker is unchanged, and table sorting uses `toSorted()` to preserve input arrays. Numeric ties now use the same locale-aware name ordering as the Name column. In compare mode the table defaults to **Changes**, showing added, removed, and changed sources; **All** opts into unchanged sources. The footer still reports full build totals. Single-build mode remains unfiltered because its rows are all compared to themselves. ## Verification - Focused filter checks: 6/6 passed (baseline 2/6). - Focused sorting checks: 12/12 passed (two new comparator cases failed before the fix). - `pnpm exec prettier --check apps/bundle-analyzer/components/diff-table.tsx` - `pnpm exec eslint --config eslint.config.mjs apps/bundle-analyzer/components/diff-table.tsx` - `pnpm exec tsc -p apps/bundle-analyzer/tsconfig.json --noEmit` <!-- NEXT_JS_LLM --> <!-- fleet d2af60a7-2332-4bf1-a425-0329992b44dd --> --------- Co-authored-by:vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by:
Will Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
Showing
Please
register
or
sign in
to comment