Skip to content

feat(code-review): filter files with comments#3590

Merged
trunk-io[bot] merged 10 commits into
mainfrom
posthog-code/filter-commented-review-files
Jul 20, 2026
Merged

feat(code-review): filter files with comments#3590
trunk-io[bot] merged 10 commits into
mainfrom
posthog-code/filter-commented-review-files

Conversation

@MattPua

@MattPua MattPua commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

  • add a review toolbar filter for files with PR comments
  • preserve section headers and renamed-file path matching while filtering
  • keep viewed counts and file navigation consistent with the visible review list
CleanShot 2026-07-20 at 13 01 30@2x CleanShot 2026-07-20 at 13 01 38@2x CleanShot 2026-07-20 at 13 01 44@2x CleanShot 2026-07-20 at 13 01 49@2x

Testing

  • pnpm --filter @posthog/ui exec vitest run src/features/code-review
  • pnpm --filter @posthog/ui typecheck
  • pnpm exec biome check packages/ui/src/features/code-review/components/CloudReviewPage.tsx packages/ui/src/features/code-review/components/ReviewPage.tsx packages/ui/src/features/code-review/components/ReviewShell.tsx packages/ui/src/features/code-review/components/ReviewToolbar.tsx packages/ui/src/features/code-review/components/reviewItemBuilders.tsx packages/ui/src/features/code-review/reviewShellParts.tsx packages/ui/src/features/code-review/reviewShellParts.test.tsx

Created with PostHog Code

@trunk-io

trunk-io Bot commented Jul 20, 2026

Copy link
Copy Markdown

😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

React Doctor found 1 issue in 1 file · 1 warning.

1 warning

src/features/code-review/components/ReviewShell.tsx

Reviewed by React Doctor for commit 0cae5d3.

@greptile-apps

greptile-apps Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
packages/ui/src/features/code-review/components/ReviewShell.tsx:148-150
**Empty Data Reactivates Saved Filter**

When a PR URL or source becomes available again while `showCommentedFilesOnly` remains true, `commentedFilePaths` is initially an empty set while comments load. The filter therefore activates immediately and briefly replaces the review with “No files with comments,” even though the comment data is still pending; the active state should distinguish loading from a loaded empty result.

Reviews (1): Last reviewed commit: "feat(code-review): filter files with com..." | Re-trigger Greptile

Comment thread packages/ui/src/features/code-review/components/ReviewShell.tsx Outdated
@posthog

posthog Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

👋 Visual changes detected for this PR.

Review and approve in PostHog Visual Review

If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix.

MattPua added 10 commits July 20, 2026 13:06
Generated-By: PostHog Code
Task-Id: 199c1147-fca6-415b-9ea1-00a45d9b7267
Generated-By: PostHog Code
Task-Id: 199c1147-fca6-415b-9ea1-00a45d9b7267
Generated-By: PostHog Code
Task-Id: 199c1147-fca6-415b-9ea1-00a45d9b7267
Generated-By: PostHog Code
Task-Id: 199c1147-fca6-415b-9ea1-00a45d9b7267
Generated-By: PostHog Code
Task-Id: 199c1147-fca6-415b-9ea1-00a45d9b7267
Generated-By: PostHog Code
Task-Id: 199c1147-fca6-415b-9ea1-00a45d9b7267
Generated-By: PostHog Code
Task-Id: 199c1147-fca6-415b-9ea1-00a45d9b7267
Generated-By: PostHog Code
Task-Id: 199c1147-fca6-415b-9ea1-00a45d9b7267
Generated-By: PostHog Code
Task-Id: 199c1147-fca6-415b-9ea1-00a45d9b7267
Generated-By: PostHog Code
Task-Id: 199c1147-fca6-415b-9ea1-00a45d9b7267
@MattPua
MattPua force-pushed the posthog-code/filter-commented-review-files branch from 60b97d9 to 0cae5d3 Compare July 20, 2026 17:06
@trunk-io
trunk-io Bot merged commit 46f300a into main Jul 20, 2026
31 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/filter-commented-review-files branch July 20, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants