Repository navigation
feat(review): viewed marks shared with the browser app (x, ctrl+n) - #171
Merged
Merged
Conversation
x marks the file under the cursor viewed, ctrl+n goes to the next file not viewed, and the header counts them. Marks are the browser app's review-progress records (<data-dir>/review-progress/<key>/<sha256(path)>.json, same key and file fingerprint), so a review continues in either app and a mark stops counting once its file changes. Pull request marks stay in this app's own folder. See docs/spec-review-progress.md.
This was referenced Nov 20, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the code review screen, you can now mark files as viewed. The marks use the browser app's own review-progress records, so a review you start in one app continues in the other.
What it does
x(toggle-viewed) marks the file under the cursor as viewed. Pressxagain to unmark it.ctrl+n(next-unviewed) goes to the next file that is not viewed, in diff order, and wraps around. This isnwith a modifier.previous-unviewedhas no default key, because most terminals send Ctrl+Shift+N as Ctrl+N. You can bind it under[keys].n/Nare unchanged.Uncommitted · 7 files +4 −1 · 2/7 viewed. The footer shows✓ viewedwhen the file under the cursor is marked.Storage (docs/spec-review-progress.md)
<data-dir>/review-progress/<key>/<sha256(path)>.jsoncontaining{"v":1,"path","fingerprint","viewed","suppressed"}. The app writes a temp file (mode 0600) and then renames it, so the last write wins and a record is never left half-written.key = sha256(JSON.stringify(["git", realpath(root), branch ref or HEAD sha, [diffType, base|null]])). The scopes map to the browser's diff types inScope::diff_type.fingerprint = sha256(JSON.stringify([oldPath, newPath, oldMode, newMode, oldOid, newOid])). The values come fromgit diff --raw, run the same way the browser runs it for each diff type: the tracked diff, then untracked files. Working-tree sides are hashed withgit hash-objectand checked against the patch'sindexline. When a file changes, its mark stops counting.--stdin-pathscannot take. You can still mark them, but the mark lasts only for the session.PLANNOTATOR_REVIEW_PROGRESSandreviewProgressinconfig.json.clients/plannotator-tui/review-progress/). The browser fingerprints PR files from GitHub's patch text, which this app never has byte for byte. Nothing is sent to GitHub.crates/plannotator-tui-review/src/progress.rsandcrates/plannotator-tui/src/review/viewed.rs, with small hooks ininput.rs,draw.rs,mod.rsandoverlays.rs.How the format match was checked
packages/shared/review-progress.ts,packages/shared/review-core.ts(parseRawDiffEntries,resolveReviewFileIdentities,runGitDiff),packages/server/review.ts(captureProgress, the base upgrade) andpackages/shared/config.ts.loadReviewProgresslogic read the tui's marks as viewed. After an edit, the edited file dropped out.Size
The release binary on macOS arm64 grows from 10,113,568 to 10,247,184 bytes (+133,616). This PR adds no new dependencies.