fix(seer): Hide autofix review cards without a valid PR [will revert soon] - #120506
Merged
NicoHinderling merged 1 commit intoJul 23, 2026
Merged
Conversation
Cards in the Awaiting your review section sometimes have no pull request behind them: the run's PR creation never completed, so the Review PR button falls back to linking the issue page instead of a GitHub PR. Until the root cause is understood, filter those cards out of the section and make the header badge count only the cards that actually render. The section now eagerly fetches each issue's autofix state to decide validity; these queries share cache keys with the cards' own enrichment, so nothing is fetched twice. This is a temporary mitigation and should be rolled back once the missing-PR runs are fixed at the source.
Comment on lines
+56
to
+59
| // Cards in the review bucket sometimes have no PR behind them (the run's | ||
| // PR creation never completed). Hide those and count only what's left; the | ||
| // per-issue state queries here share cache keys with the cards' own | ||
| // enrichment, so nothing is fetched twice. |
Contributor
There was a problem hiding this comment.
Bug: The allSectionsEmpty check uses the unfiltered section.issues list, causing an incorrect empty state when all review_pr issues are filtered out on the client.
Severity: LOW
Suggested Fix
Modify the allSectionsEmpty calculation to account for the client-side filtering. When checking the review_pr section, it should use the length of the filtered validIssues list instead of the raw section.issues list. This will ensure the global empty state is shown correctly when there are no visible issues across all sections.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: static/app/views/seerWorkflows/overview/sectionList.tsx#L56-L59
Potential issue: The `allSectionsEmpty` check determines whether to show a global empty
state by checking `section.issues.length`. However, for the `review_pr` section, the
rendered issues are filtered by the `useValidPrIssues` hook. If all issues in the
`review_pr` section are filtered out because they lack a valid pull request,
`allSectionsEmpty` will incorrectly evaluate to `false` because it is based on the
original, unfiltered issue count. This prevents the global empty state from rendering.
Instead, the user sees the `review_pr` section header with an individual "No issues"
message, which is a degraded user experience.
Did we get this right? 👍 / 👎 to inform future reviews.
Contributor
📊 Type Coverage Diff
🔍 1 new type safety issue introducedNon-null assertions (
This is informational only and does not block the PR. |
jshchnz
approved these changes
Jul 23, 2026
3 tasks
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.
Warning
Temporary mitigation — intended to be rolled back. This papers over runs in the review bucket that have no PR behind them while the root cause (PR creation not completing for some runs) is investigated. Once that's fixed at the source, revert this.
Description
On
/issues/autofix/overview, some cards in the Awaiting your review section have no valid pull request behind them: the run'srepo_pr_statesnever reached a completed PR with a URL, so the "Review PR" button silently falls back to linking the issue page instead of GitHub.Until the underlying cause is fixed, this filters those cards out of the section:
useValidPrIssueshook eagerly fetches each review-bucket issue's autofix state (/issues/$id/autofix/?mode=explorer) and keeps only issues with a completed PR URL — the sameextractPrcondition the Review PR button uses (via a newhasValidPrhelper), so the filter and the button can't disagree. The queries share cache keys with the cards' own enrichment, so nothing is fetched twice.X-Hitstotal, showing…until the state queries settle. Other sections keep their server counts.Trade-offs, accepted for a stopgap: the review section fires its per-issue state requests upfront rather than lazily on scroll, and if the section ever exceeds the 100-issue fetch limit the badge reflects only the fetched page (no
100+for this section).