Skip to content

feat: filter viewed code review files - #3794

Merged
trunk-io[bot] merged 3 commits into
mainfrom
posthog-code/hide-viewed-review-files
Jul 28, 2026
Merged

feat: filter viewed code review files#3794
trunk-io[bot] merged 3 commits into
mainfrom
posthog-code/hide-viewed-review-files

Conversation

@MattPua

@MattPua MattPua commented Jul 24, 2026

Copy link
Copy Markdown
Member

Problem

Code reviews with many files make it hard to focus on changes that still need review.

Changes

CleanShot 2026-07-24 at 14 32 48@2x CleanShot 2026-07-24 at 14 33 12@2x
  • Add a Hide viewed files option to diff settings
  • Combine viewed-state filtering with comment filters
  • Preserve section headers and clear filters for direct file navigation

How did you test this?

  • Ran the @posthog/ui test suite: 2,115 tests passed
  • Ran Biome checks on all changed files

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@trunk-io

trunk-io Bot commented Jul 24, 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 24, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 098c8a7.

@MattPua
MattPua marked this pull request as ready for review July 24, 2026 18:33
@greptile-apps

greptile-apps Bot commented Jul 24, 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:180-187
**Active file remains hidden**

When “Hide viewed files” is enabled and the active file is marked viewed, this filtering removes its diff and navigation-index entry without updating the active path, causing the Changes panel to keep highlighting a file that is no longer displayed until the user scrolls or navigates elsewhere.

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

Comment thread packages/ui/src/features/code-review/components/ReviewShell.tsx
MattPua added 2 commits July 28, 2026 16:12
Generated-By: PostHog Code
Task-Id: f774fb55-18e5-4248-acb9-3f9bf3e7d3ee
Generated-By: PostHog Code
Task-Id: f774fb55-18e5-4248-acb9-3f9bf3e7d3ee
@MattPua
MattPua force-pushed the posthog-code/hide-viewed-review-files branch from 88b3458 to 7dc619d Compare July 28, 2026 20:12
@MattPua MattPua added the Stamphog This will request an autostamp by stamphog on small changes label Jul 28, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contained UI feature adding a "hide viewed files" filter to the code review panel, with new tests covering the filter and active-path-resolution logic; the added useEffect in ReviewShell.tsx directly resolves the sole reviewer (Greptile) concern about the active file staying hidden after filtering. No risky territory touched.

  • Author wrote 100% of the modified lines and has 10 merged PRs in these paths (familiarity STRONG).
  • 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 154L, 5F substantive, 217L/7F incl. docs/generated/snapshots — within ceiling
tier T1-agent / T1c-medium (217L, 7F, single-area, feat)
stamphog 2.0.0b3 .stamphog/policy.yml @ af8d1ce · reviewed head 7dc619d

@trunk-io
trunk-io Bot merged commit e50786a into main Jul 28, 2026
32 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/hide-viewed-review-files branch July 28, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant