Make a review pass reachable from the keyboard - #18
Merged
Conversation
Five things a reviewer hit on the way through a real compare: - A report that could not be written died with a traceback and exit 1 -- the same code a pipeline reads as "real changes found", so a run that produced no record looked like an ordinary one. It is exit 2 now, with the reason in a sentence, and the scan it could not write still prints. - A finished scan left the diff pane empty next to a tree full of results; it opens on the first change instead. - F7/F8 wrapped silently inside one file, so walking the compare meant going back to the mouse between every file. They now run off the end into the next (previous) file with something to review. - No way to find an identifier in the open file. Ctrl+F searches the rows, so a hit on either side counts once and both panes land on it; the query survives moving to another file, which is how a name gets chased across the compare. - A regenerated tree is mostly untouched files. `Hide identical` drops those rows -- a view only: verdicts, counts and the exported report do not notice it. The find box needed the rows of a one-sided file, which also gave whole added/deleted files a working _reveal: scrolling is now driven by the pane that actually holds the text.
The search marks and the current-change overlay were sharing one
extraSelections list per editor, and only the "found something" path ever
rewrote it. Typing on past the last hit ("begin" -> "beginal") left the old
word lit while the bar said "no match" -- the pane contradicting its own
answer, on a tool whose whole claim is that what you see is what it found.
The two overlays are separate layers now, composited on every repaint, so
either can be rebuilt without wiping the other. Every path out of the find
box repaints: no query, no hits, bar closed, file changed.
While the layer existed, marking only the current hit was leaving "3 of 8"
unverifiable. All occurrences are marked now, the current one brighter.
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.
Five things that got in the way of an actual review pass over a real compare.
A report that could not be written looked like a normal run
Writing to a missing folder, or to a report still open in a browser, died with
a Python traceback and exit
1— the same code a pipeline reads as "realchanges found". A run that produced no record was indistinguishable from an
ordinary one.
It is exit
2(compare incomplete) now, with the reason in a sentence, and thescan it could not write is still printed.
--exit-zerocannot mask it.The viewer
empty next to a tree full of results.
F7/F8walk the whole compare. They wrapped silently inside one file,so getting to the next file meant going back to the mouse. They now run off
the end into the next (previous) file with something to review, and wrap at
the end of the set.
Ctrl+Home/Ctrl+Endstill mean "this file".Ctrl+Ffinds text in the open file. Searches the rows, so a hit oneither side counts once and both panes land on it. Every occurrence is marked
amber, the current one brighter.
F3/Shift+F3step,Esccloses. Thequery survives moving to another file — that is how an identifier gets chased
across a compare.
Hide identicalleaves only the files with a difference in the tree. Aview, not a rule: verdicts, counts and the exported report do not notice it.
The find box needed the rows of a one-sided file, which also gave whole
added/deleted files a working reveal — scrolling is driven by the pane that
actually holds the text.
Notes
current-change overlay shared one selection list, so a query that stopped
matching said "no match" while the old word stayed lit. They are separate
layers now.
User guide(F1),CHANGELOG.md, and the exit-code table.python -m unittest discover -s tests), 30 of them new.Every UI change was rendered and looked at, not only asserted on.