Skip to content

Repaint the keys when a Go-to filter's map empties or refills on a re-read - #5867

Merged
leaf-agent merged 1 commit into
mainfrom
nightly/go-to-filtered-repaint
Nov 12, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
nightly/go-to-filtered-repaint

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Since #5845, Go-to reads every visible target and its filter narrows that reading through kept. The rows that depend on the map (Tab, Shift+Tab, Enter, and the filter's "No visible …" status) read the narrowed members, but paint() still decided whether those rows needed repainting by whether the whole reading was empty. So with a filter active, a scroll that moved every matching target out of view while other targets stayed left Tab and Enter offered and the "No visible …" status unshown until some unrelated repaint, and scrolling matches back in left the rows missing the same way. paint() now compares the filtered members on both sides (hints.js).

The new case in tests/runtime/hint-session.test.mjs arms a filtered map, re-reads it empty and then refilled, and checks that each re-read asks for a repaint. It fails on main (no repaint after the map read one) and passes here. hint-session, hint-seating and go-to-keys pass, as does the browser type check.

The commit also fixes two comments: passages.js pointed at readPage, which #5570 split into collect and indexed, and createHintSession's header gave a reason for members carrying their codes that no caller has any more.

…-read

paint() decided whether the walk's rows needed the keys again by whether the
whole map read empty, but since #5845 go-to reads every target and `kept`
narrows it, so the rows read the filtered members. A scroll that took every
hyperlink out of view under the hyperlink filter left Tab and Enter offered and
"No visible hyperlinks." unshown until some later repaint. The test now reads
the filtered members on both sides.

Also points two comments at the code they describe: passages.js names
`indexed`, which replaced `readPage`, and createHintSession's header says why
members carry their codes now that no caller's read is a subset.
@leaf-agent
leaf-agent merged commit b3387f1 into main Nov 12, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the nightly/go-to-filtered-repaint branch November 12, 2026 07:03
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.

1 participant