Skip to content

feat(web): mark diff files as viewed - #4

Merged
enisze merged 1 commit into
mainfrom
feat/mark-files-viewed
Jul 29, 2026
Merged

feat(web): mark diff files as viewed#4
enisze merged 1 commit into
mainfrom
feat/mark-files-viewed

Conversation

@enisze

@enisze enisze commented Jul 29, 2026

Copy link
Copy Markdown
Owner

What

Adds a per-file "viewed" checkbox to the diff panel file headers so reviewers can track their progress through a diff.

  • Checking the box marks the file as viewed and collapses it; unchecking expands it again — the standard code-review "viewed" behavior.
  • Viewed state is persisted to localStorage and scoped per thread + diff selection (same scope key as collapse state), so it survives reloads and resets when switching turns/scopes.

Changes

  • apps/web/src/diffViewedStore.ts (new) — persisted Zustand store (viewedByScope) mirroring the existing diffPanelStore pattern, with toggleFileViewed / setFileViewed / clearScope actions and a selectViewedFileKeys selector.
  • apps/web/src/components/DiffPanel.tsx — renders a Checkbox alongside the collapse chevron in each file header; toggling flips viewed state and collapses/expands the file.
  • apps/web/src/components/diffs/AnnotatableCodeView.tsx — accepts viewedFileKeys and folds the flag into each item's version hash so headers re-render reliably.

Verification

  • pnpm typecheck (web app) passes.

🤖 Generated with Claude Code

Add a per-file "viewed" checkbox to the diff panel file headers so
reviewers can track review progress. Toggling it marks the file viewed
and collapses it (unchecking expands), mirroring the standard code
review workflow.

Viewed state is persisted to localStorage via a new diffViewedStore,
scoped per thread + diff selection (same scope key used for collapse),
and folded into the CodeView item version hash so headers re-render
reliably when the flag changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@enisze
enisze merged commit 334279a into main Jul 29, 2026
@enisze
enisze deleted the feat/mark-files-viewed branch July 29, 2026 21:46
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.

1 participant