feat(search): Add issue progress sort#117707
Merged
Merged
Conversation
Add a "progress" issue sort that orders issues by how far they are through the fix cycle (fix_applied > fix_proposed > diagnosed > triaged > identified), with last_seen as a secondary key so the most recently active issue ranks highest within a tier. It reuses the existing PostgresSortStrategy framework: a signal resolver derives each group's rank from the same Activity records as the issue.progress filter (via get_group_progress_states), and the score encodes rank as the integer primary key plus a sub-1 recency fraction. On candidate overflow it falls back to the chunked Snuba last_seen path. The secondary key stands in for issue.last_progressed_at, which does not exist yet; swapping it in later is a one-line change to the score_fn. Gated behind organizations:issue-stream-progress-sort. Backend only; the frontend sort dropdown is not wired up yet. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0e7d77b to
0197ef6
Compare
cvxluo
approved these changes
Jun 15, 2026
roggenkemper
added a commit
that referenced
this pull request
Jun 16, 2026
Adds a **Progress** entry to the issue stream "Sort by" dropdown, gated behind `organizations:issue-stream-progress-sort` — the same flag that gates the backend sort. It mirrors how the **Recommended** sort is wired (flag check, or shown when it's already the active sort). Selecting it sends `sort=progress` to the issues API, which orders issues by how far they are through the fix cycle (`fix_applied > fix_proposed > diagnosed > triaged > identified`), with `last_seen` as the secondary key. ## Dependencies - Backend sort: #117707 (the API only honors `sort=progress` once that lands). - Flag: getsentry/sentry-options-automator#8262 (enables the flag for internal testing). Until the backend PR deploys, the dropdown option will be inert (the API falls back to the default sort), which is fine — it's flag-gated and FE/BE deploy separately anyway. ## Testing notes No test added: this is a one-to-one mirror of the existing (untested) `hasRecommendedSort` gating, and there's no colocated test harness for this dropdown. Refs #117707
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.
Adds a new
progressissue sort that orders issues by how far they are through the fix cycle:Within a progress tier,
last_seenis the secondary key, so the most recently active issue ranks highest.Why
Surfaces issues that are furthest along toward resolution at the top of the stream, so it's easy to see what's close to done and what just moved.
How
Activityrecords as the existingissue.progressfilter (viaget_group_progress_states), so the sort and filter stay consistent.rank + last_seen / 10**13— rank is the integer primary key and the timestamp collapses into a sub-1 recency fraction that only breaks ties, keeping progress strictly primary without it bleeding across tiers.last_seenpath (degrading to a plain recency sort), so it stays bounded on large result sets.Notes for reviewers
issue.last_progressed_at, which does not exist yet, solast_seensubstitutes for now. Swapping it in later is a one-line change toscore_fn.Activityaggregation across candidate groups (same class as theissue.progressfilter) — correct but not indexed for scale; the overflow fallback keeps it bounded.organizations:issue-stream-progress-sort. The frontend sort dropdown is intentionally not wired up yet, so the sort is currently reachable only via?sort=progresswith the flag on. Frontend follow-up to come in a separate PR.