Skip to content

Add --filter-unreviewed - #366

Merged
umputun merged 3 commits into
masterfrom
filter-unreviewed-flag
Sep 20, 2026
Merged

umputun merged 3 commits into
masterfrom
filter-unreviewed-flag

Conversation

@umputun

@umputun umputun commented Sep 20, 2026

Copy link
Copy Markdown
Owner

scripted launches can now enable the unreviewed file filter with --filter-unreviewed, REVDIFF_FILTER_UNREVIEWED, or the filter-unreviewed config key, without a manual F keypress. Files disappear from the tree as they are marked reviewed; this change does not persist reviewed marks between sessions.

the filter is cleared when a file-list load leaves one underlying file, where F is unavailable. This also fixes the filter staying active when a reload reduces a review to one file. Multiple underlying files with just one unreviewed file remain filtered, and reloads preserve a manual choice to turn the filter off.

also fixes a stderr-capture leak when a herdr review outlives its launcher. The dispatched review acquires its own hard-link alias while the capture still exists, and removes that alias before publishing the exit code.

tests cover CLI, environment and config-file parsing, initial filter state, the load and reload cases, the abandoned-review cleanup and editor forwarding through the herdr dispatch. Documentation and both launcher usage comments are updated.

Fixed #365

let scripted launches enable the unreviewed filter without a manual F keypress.
The preference is also available through REVDIFF_FILTER_UNREVIEWED and the
filter-unreviewed config key.

clear the filter when a load leaves one underlying file, since F cannot
disable it in single-file mode. This also fixes the filter getting stuck
after a reload reduces the review to one file. Reloads preserve a manual
choice to turn the filter off.

Fixed #365
a dispatched review can outlive its launcher and open stderr after the launcher
has removed the capture, recreating a file nobody will delete. Give the child its
own hard link to the capture and remove that alias before publishing the exit
code. If the launcher removes the capture before the child acquires its link, the
review continues with stderr directed to /dev/null.

the herdr command string is built from the invocation that already carries the
EDITOR/VISUAL prefix, so a dispatched review still starts with the caller's editor
environment.

a regression test forces the launcher to exit between the started marker and the
stderr open, then checks cleanup after the child finishes. A second one strips
EDITOR and VISUAL at the dispatch boundary, where the launcher's own environment
would otherwise mask what it forwards.
Copilot AI lite review requested due to automatic review settings September 20, 2026 18:40

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@umputun
umputun merged commit 2f0e60e into master Sep 20, 2026
5 checks passed
@umputun
umputun deleted the filter-unreviewed-flag branch September 20, 2026 18:43
umputun added a commit that referenced this pull request Sep 24, 2026
…marks

the reporter of #324 asked for marks to ride along in review history and restore
with no flags. Four findings against it, now in the item: both read-latest-history.sh
copies return the newest file, so a marks-only snapshot hides the annotated review;
Rebuild and ReconcileReviewed drop paths missing from the current load, so a run
under --only saves a smaller set and the next full run restores only that; there is
no sound lookup key, since the binary never reads history and most modes record no
ref or commit; and every run pays the preload fingerprint cost.

also: preload must go through loadReviewedFingerprints so ReviewFingerprintStable
still drops binary and placeholder rows, the persisted snapshot should carry the
fingerprint version as its own field, and --filter-unreviewed (#366) makes the gap
sharper. Stale finalize line numbers replaced with the symbol after the move to
app/revdiff.

Related to #324
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.

Startup flag for filter_unreviewed (F)

2 participants