From 4f035f4bffc5b3e87a555f667f2fa7f89d5c996b Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Sat, 30 May 2026 13:27:56 -0700 Subject: [PATCH] Remove needs response PR badge (#3921) --- .../components/right-sidebar/ChecksPanel.tsx | 72 ------------------- 1 file changed, 72 deletions(-) diff --git a/src/renderer/src/components/right-sidebar/ChecksPanel.tsx b/src/renderer/src/components/right-sidebar/ChecksPanel.tsx index e33fd7edb..14f08d98a 100644 --- a/src/renderer/src/components/right-sidebar/ChecksPanel.tsx +++ b/src/renderer/src/components/right-sidebar/ChecksPanel.tsx @@ -40,11 +40,6 @@ import type { } from '../../../../shared/hosted-review' import { getHostedReviewCacheKey, refreshHostedReviewCard } from '@/store/slices/hosted-review' import { toast } from 'sonner' -import { - classifyHostedReview, - type HostedReviewClassificationOptions -} from '../../../../shared/hosted-review-queue' -import { hostedReviewSummaryFromGitHubPRInfo } from '../../../../shared/hosted-review-github' import { checksPanelAsyncResultKey, checksPanelHostedReviewAsyncResultKey, @@ -1689,60 +1684,6 @@ export default function ChecksPanel(): React.JSX.Element { ] ) - const activeReviewClassification = React.useMemo(() => { - if (!pr || !repo) { - return null - } - let host = 'github.com' - let owner = 'unknown' - let repoName = 'unknown' - try { - const parsed = new URL(pr.url) - host = parsed.host || host - const segments = parsed.pathname.split('/').filter(Boolean) - if (segments.length >= 2) { - owner = segments[0] - repoName = segments[1] - } - } catch { - // Why: malformed URLs should not block queue-state classification. - } - - // Why: unresolved thread data is paginated and fetched separately. Until - // comments have loaded for this PR, do not let queue badges imply a clean review. - const commentsForClassification = - commentsFetchedAt !== undefined && !commentsLoading ? comments : undefined - const summary = hostedReviewSummaryFromGitHubPRInfo({ - pr, - owner, - repo: repoName, - host, - comments: commentsForClassification, - checks - }) - const options: HostedReviewClassificationOptions = { - agentAuthorLogins: [], - viewer: null - } - return classifyHostedReview(summary, options) - }, [pr, repo, comments, commentsFetchedAt, commentsLoading, checks]) - - const queueBadges = React.useMemo(() => { - if (!activeReviewClassification) { - return [] as string[] - } - const badges: string[] = [] - if (activeReviewClassification.needsResponse) { - badges.push('Needs response') - } - // Why: viewer/author/requestedReviewer signals are not wired into the - // ChecksPanel call site yet, so `state` and `requested` would mis-classify - // every PR (collapsing to 'teammate'). Suppress those badges until the - // inputs are available; needs-response works from PR metadata alone and - // remains accurate. - return badges - }, [activeReviewClassification]) - // ── Empty state ── if (!activeWorktree) { return ( @@ -1962,19 +1903,6 @@ export default function ChecksPanel(): React.JSX.Element { )} - {queueBadges.length > 0 && ( -
- {queueBadges.map((badge) => ( - - {badge} - - ))} -
- )} - {/* Merge / Delete Workspace actions */} {pr && activeWorktree && repo && (