fix(mobile): tiebreak priority sort by newest first (port #2787) - #2854
Merged
Conversation
Priority is a coarse 5-bucket rank (P0-P4); without a secondary sort, reports in the same tier come back in arbitrary order. Append a `-created_at` (newest first) tiebreak to the signal report list ordering when sorting by priority, e.g. `status,-is_suggested_reviewer,-priority,-created_at`. Ports desktop PR #2787 to the React Native / Expo mobile app. Generated-By: PostHog Code Task-Id: af36a8a9-00c9-4b67-a23d-35898325b7d5
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "fix(mobile): tiebreak priority sort by n..." | Re-trigger Greptile |
tatoalo
approved these changes
Jun 23, 2026
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.
Summary
Ports desktop PR #2787 (
fix(inbox): tiebreak priority sort by newest first) to the React Native / Expo mobile app.Priority is a coarse 5-bucket rank (P0–P4); without a secondary sort, reports within the same priority tier came back in arbitrary order on mobile. This appends a
-created_at(newest first) tiebreak to the signal report listorderingparam when sorting by priority, so the ordering string becomes e.g.status,-is_suggested_reviewer,-priority,-created_at. The existingstatusand-is_suggested_reviewerprefixes are unchanged, and non-priority sort fields are unaffected.Changes
apps/mobile/src/features/inbox/utils.ts— add the-created_attiebreak inbuildSignalReportListOrderingfor thepriorityfield only.apps/mobile/src/features/inbox/utils.test.ts— parameterized tests across all ordering fields and both directions, asserting the tiebreak is present for priority and absent for other fields.Testing
vitest run src/features/inbox/utils.test.ts— 37 passing.Scope is limited to
apps/mobile; no changes toapps/codeorpackages/*.