You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Persist per-file viewed state across review iterations using a per-file content hash #1136
Viewed-file state is keyed off a single whole-patch hash, so any change to any file wipes the viewed marks for every file. In an iterative review (send feedback, agent changes one file, diff refreshes) you lose all progress on the files that did not change. GitHub keeps them. Supersedes #559.
Current mechanism: packages/server/review.ts sets draftKey = contentHash(options.rawPatch) and re-keys it on every patch refresh and diff-type switch; viewedFiles rides that single key (packages/review-editor/dock/ReviewStateContext.tsx).
Acceptance criteria
Viewed state is stored per file with a per-file content fingerprint.
On a diff refresh, a file whose content is unchanged keeps its viewed mark; a file whose content changed resets to unviewed.
Works across diff-type switches within a session and across separate send-feedback iterations on the same branch.
Existing whole-patch draft persistence (annotations) is unaffected.
Design precedent that did not exist when this was first requested: Guided Reviews persist per-section reviewed state keyed per item, with a moved flag when the stored head sha differs from the head under review (/api/guide/:jobId/reviewed, /api/guides). Same shape, applied to files.
Related: #1116 (continuous review sessions) does not cover this. #958 mentions viewed-file behavior; cross-link so it does not get specced twice.
Activity
ashish921998 commentedon Aug 21, 2026
@backnotprop can i take this up?