Repository navigation
Conversation
Hiding kinds of issue in the panel left captions marked in the text with no card to open: the caret landed in the block and nothing happened. When the caret comes to rest in a caption whose issues are all of hidden kinds, the kind of its first issue is now shown again and that issue opens, with a note on the card and a spoken message. A caption with an issue of a shown kind opens on that and keeps its other kinds hidden. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LCjpD3ehigLiUGH1oVQQAW
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.
Validate: a marked caption always opens its card, whatever the filters say
Found testing Validate in the test environment: hide every kind of issue but one, fix that kind, close the panel. The other captions are still marked in the text, but putting the caret in one of them opens nothing. A mark with no card behind it is a dead end; the only way out was to run Validate again and tick the kinds back on.
Cause
Validate marks every caption that has any issue (
is_valid/has_error), whatever the filters in the panel say. When the caret comes to rest in a caption,ValidationPanel.follow_caret()looks for that caption's issue among the kinds being shown. A caption whose issues are all of hidden kinds is marked, but is found nowhere in that list, so nothing happens.What changes
utils/validation_panel.py: when the caret comes to rest in a caption whose issues are all of hidden kinds, the kind of its first issue is shown again and that issue opens (reveal_hidden()). Its checkbox comes back ticked, the card carries a line, "Showing "Overlaps" again — it was hidden.", and the same sentence is said to a screen reader together with "Issue N of M". A closed panel opens as it already did for a marked caption, and the sentence is spoken a moment later, like the position, because a live region that appears with its text already in it is often not read.The marks in the text are not changed. The other way to remove the dead end would be to take the marks off with the filter, but then a hidden kind could not be seen at all once the panel is closed, which is worse.
Appearance
One visible change: a caret in a marked caption with only hidden kinds now opens the card and ticks that kind's checkbox, where before nothing happened. Everything else in the panel, and the marks, look as before.
How it was checked
tests/test_validation.py: nine new tests (the kind comes back, only the first issue's kind, a shown kind wins and the rest stay hidden, what is said on the card and to a screen reader, a closed panel opens and says it later, a caption without an issue or gone, speech without a caption, and the existing "a hidden kind is not followed" test replaced by this behaviour).AGENTS.md: one addition to the Validate bullet. Full suite: 1014 passed (tests/test_recording.pyexcluded). The branch is made onmainand does not depend on any other open PR.Not checked