diff --git a/src/renderer/src/components/right-sidebar/checks-panel/empty-content-props.ts b/src/renderer/src/components/right-sidebar/checks-panel/empty-content-props.ts
index 0c8326aaf2a..dfdc3b86d74 100644
--- a/src/renderer/src/components/right-sidebar/checks-panel/empty-content-props.ts
+++ b/src/renderer/src/components/right-sidebar/checks-panel/empty-content-props.ts
@@ -12,7 +12,9 @@ export type ChecksPanelEmptyContentModel = Pick<
| 'activeReview'
| 'isFolder'
| 'linkedGitLabMR'
+ | 'linkedPR'
| 'linkedReviewNumber'
+ | 'prNumber'
| 'prRefreshState'
| 'suppressedGitHubPR'
> &
diff --git a/src/renderer/src/components/right-sidebar/checks-panel/empty-content.tsx b/src/renderer/src/components/right-sidebar/checks-panel/empty-content.tsx
index c67002286e2..094c5e1950e 100644
--- a/src/renderer/src/components/right-sidebar/checks-panel/empty-content.tsx
+++ b/src/renderer/src/components/right-sidebar/checks-panel/empty-content.tsx
@@ -9,6 +9,7 @@ import {
import { openChecksPanelHostedReviewUrl } from '../checks-panel-hosted-review-click-routing'
import { isMacPlatform } from '../../terminal-pane/terminal-link-open-hints'
import { translate } from '@/i18n/i18n'
+import { isGitHubPRSuppressed } from '../../../../../shared/worktree/github-pr-suppression'
import type { ChecksPanelEmptyContentModel } from './empty-content-props'
export function ChecksPanelEmptyContent({
@@ -53,6 +54,7 @@ export function ChecksPanelEmptyContent({
isRemoteOperationActive,
isSyncingBranch,
linkedGitLabMR,
+ linkedPR,
linkedReviewNumber,
panelContextKey,
prAiGenerationEnabled,
@@ -67,6 +69,7 @@ export function ChecksPanelEmptyContent({
prGenerateDisabledReason,
prGenerateError,
prGenerating,
+ prNumber,
prRepoDefaultBaseRef,
prStackedCreationSupported,
prTitle,
@@ -117,7 +120,9 @@ export function ChecksPanelEmptyContent({
)
}
- if (!activeReview && linkedReviewNumber === null && suppressedGitHubPR !== null) {
+ const currentGitHubPRIsSuppressed =
+ prNumber !== null && isGitHubPRSuppressed({ linkedPR, suppressedGitHubPR }, prNumber)
+ if (!activeReview && linkedReviewNumber === null && currentGitHubPRIsSuppressed) {
return (
diff --git a/src/renderer/src/components/right-sidebar/checks-panel/panel-content-rendering.test.tsx b/src/renderer/src/components/right-sidebar/checks-panel/panel-content-rendering.test.tsx
index 04d2a642d95..e9c8c6d82db 100644
--- a/src/renderer/src/components/right-sidebar/checks-panel/panel-content-rendering.test.tsx
+++ b/src/renderer/src/components/right-sidebar/checks-panel/panel-content-rendering.test.tsx
@@ -43,7 +43,9 @@ describe('checks panel concrete content', () => {
activeReview: null,
activeWorktree: { id: 'worktree-1' },
isFolder: false,
+ linkedPR: null,
linkedReviewNumber: null,
+ prNumber: 42,
suppressedGitHubPR: 42 as number | null,
handleLinkSuppressedPullRequest: handleLinkSuppressedPullRequest as () => void
} as ChecksPanelEmptyContentModel
@@ -57,6 +59,43 @@ describe('checks panel concrete content', () => {
expect(screen.queryByText(/Create PR/)).toBeNull()
})
+ it('does not apply stale suppression to a branch with no matching pull request', () => {
+ const model = {
+ activeReview: null,
+ activeWorktree: { id: 'worktree-1' },
+ branch: 'without-pr',
+ checksPanelHasHardRefreshError: false,
+ checksPanelReviewLookup: 'not_found',
+ checksPanelReviewLookupResult: { openReviewUrl: null },
+ confirmedReadiness: { confirmed: false, needsPush: false },
+ conflictOperation: 'unknown',
+ createComposerOpen: false,
+ detachedHeadDisplay: null,
+ gitStatusInputs: { hasUncommittedChanges: false },
+ gitStatusProbeErrorContextKey: null,
+ hardRefreshError: null,
+ hostedReviewCreateCopy: { providerName: 'GitHub' },
+ hostedReviewCreateProvider: 'github',
+ hostedReviewCreation: null,
+ isFolder: false,
+ isGitHubReviewContext: true,
+ isPublishingBranch: false,
+ linkedGitLabMR: null,
+ linkedPR: null,
+ linkedReviewNumber: null,
+ panelContextKey: 'worktree-1::without-pr',
+ prNumber: null,
+ publishActionHasUncommittedChanges: false,
+ sourceControlAiActionsVisible: false,
+ suppressedGitHubPR: 42
+ } as ChecksPanelEmptyContentModel
+
+ render()
+
+ expect(screen.getByText('No pull request found')).toBeTruthy()
+ expect(screen.queryByText('Pull request unlinked')).toBeNull()
+ })
+
it('renders the active review header and empty check/comment sections with accessible actions', () => {
const model = {
activeConnectionId: null,