Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: fe0a057 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🟡 Tier 3 — StandardIntroduces new logic, modifies core functionality, or touches areas with non-trivial risk. Why this tier:
Review process: Full human review — logic, architecture, edge cases. Stats
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
PR Review
2 finding(s): 🔴 0 P0/P1 · 🟡 0 P2 · 🔵 2 P3 No inline comments. 2 P3 folded at the bottom. 🔵 2 P3 — no action needed before merge
Priority comes from a separate grading pass over the finished review. P3 is folded here instead of posted inline. No finding blocks merge automatically; a maintainer decides. |
Deep ReviewScope: 10 files vs base ✅ No critical issues found. The fix is correct, the 🟡 P2 — recommended
🔵 P3 nitpicks (3)
Reviewers (10): correctness, adversarial, testing, maintainability, api-contract, kieran-typescript, project-standards, previous-comments, agent-native, learnings-researcher. Testing gaps:
No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
E2E Test Results✅ All tests passed • 512 passed • 1 skipped • 1096s
Tests ran across 4 shards in parallel. |
4f1a3dd to
3f4c9c7
Compare
3f4c9c7 to
fe0a057
Compare
Summary
Fixes #3905
Fixes an issue where search results were incorrectly time-windowed despite the leading ordering key not matching the timestamp expression.
Cause:
The search page bucketed a two-key sort by time because the multi-key sort string was parsed into a single entry. The windowing check then matched on the timestamp column hidden inside it.
Screenshots or video
Before - note that the duration increases midway down the results instead of being globally ordered descending:
How to reproduce
Play Link
Duration DESC, Timestamp DESCHow to test on Vercel preview
Use the reproduction steps on the preview environment and note that Duration is globally ordered.
Preview Link
References
Fixes #3905
Note
Medium Risk
Changes when search pagination time-buckets queries; wrong leading-key parsing could disable windowing for timestamp-led sorts or re-enable it for multi-key sorts, but behavior is narrowly scoped and heavily tested.
Overview
Fixes incorrect global sort on multi-key Order By (e.g.
Duration DESC, Timestamp DESC) where results looked ordered only within each time slice.isTimestampExpressionInFirstOrderByno longer treats the whole firstORDER BYfragment as one string. It derives the leading key viagetLeadingSortKey(comma splits withsplitAndTrimWithBracket, tuple unwrap with quote-awarefindBalancedParens), then only substring-matches the timestamp against that key. Windowing in offset pagination stays enabled when timestamp leads (e.g.Timestamp DESC, Duration DESC).parseAsSortingStateStringreturnsnullwhen the expression before trailing ASC/DESC contains multiple keys, so URL/table state does not collapse multi-key sorts into a single column id that re-triggers windowing.findBalancedParensmoves fromvariables.tstocore/utilsfor shared use. Unit, hook, parser, and full-stack e2e coverage assert full-range queries when the leading key is not the timestamp.Reviewed by Cursor Bugbot for commit fe0a057. Bugbot is set up for automated code reviews on this repo. Configure here.