Track reviewed files across new commits
Preserve reviewed status for unchanged file blobs, invalidate changed files after new commits, and report accurate progress.Description
Requirements
Export ReviewedFileTracker from src/App.tsx.
Treat a file as reviewed only when reviewedByPath stores its current blob SHA.
Remove reviewed status when a path remains but its blob SHA changes.
Keep reviewed status for unchanged path and SHA pairs across file-list updates.
Expose reviewed and total file counts based only on the current files array.
Expose visible status and interactive controls with native semantics, accessible names, and keyboard operation appropriate to the workflow.
Do not mutate props, nested caller-owned values, or arrays supplied to the component.
New commit
src/a.ts changes SHA while src/b.ts does not
Only src/b.ts remains reviewed
Treat a file as reviewed only when reviewedByPath stores its current blob SHA.
Removed file
A reviewed path leaves the file list
It is omitted from current progress and next state
Remove reviewed status when a path remains but its blob SHA changes.
Constraints
Use React state and effects only where the observable component contract requires themUse injected adapters instead of accessing network, storage, timers, or browser globals directlyKeep one authoritative state transition for each user or adapter event
Hints
Hint 1
Start with the matches-reviewed-sha behavior and make its observable result deterministic.
Hint 2
Model invalidates-changed-files independently before combining it with the remaining states.
Hint 3
Verify the boundary described by progress-summary without changing caller-owned input.