Repository navigation
Fix file-tree comment shortcut and bounded scroller - #3556
Merged
Merged
Conversation
Let Leaf resolve page shortcut characters before the tree treats them as search seeds, while keeping Enter and Escape with the focused control. Mark the tree viewport as an intentional bounded scroller; the host declaration cannot inherit through the registered CSS property. The focused file-tree browser test fails before the keyboard change and passes after it. Both file-tree corpus cases pass with their typed-box and held-scroller checks. Closes #3552
The listener inventory guards against key handlers outside the command register. The keyboard controller now uses capture for shortcut characters and bubble for other keys, both through that register, so count both owned listeners. Refs #3552
Apply the repository-pinned Prettier layout to the capture listener and rebuild the committed kernel so the pre-commit gate leaves no diff. Refs #3552
leaf-agent
added a commit
that referenced
this pull request
Oct 22, 2026
The browser keyboard test now observes `?` during capture and navigation keys during bubbling. #3556 moved character shortcuts to a capturing listener that stops propagation after handling them, so the test's former bubbling observer missed its `?` positive control. Keeping navigation keys in bubble lets the test detect a cancellation by focused content. The focused browser test passes (`uv run pytest tests/browser/drafts/test_keys.py::test_global_shortcuts_leave_other_browser_navigation_keys_alone -q -n 0`). This PR changes only the test; runtime keyboard behavior is unchanged. --------- Co-authored-by: leaf-agent <[email protected]>
max-sixty
pushed a commit
that referenced
this pull request
Nov 19, 2026
`test_file_tree_reads_standalone_data_without_a_diff_package` fails deterministically on `main` since #6469, which first failed in [run 44455882413](https://github.com/max-sixty/leaf/actions/runs/44455882413) (`9192a5041`). #6469 gives letters typed in a type-ahead widget to that widget, which Max chose on the key-reading review page. So `c` on a selected file-tree row now types into the tree's search. The test still pressed `c` on the row and waited for the composer, a step #3556 added when Leaf took shortcut letters ahead of the tree. The wait times out. The `c` it types also filters `README.md` out of the tree, which would break the steps after it. This PR removes that step. #6469's own check in `test_render_files.py::test_a_file_tree_opens_each_file_the_editor_holds` covers the new behavior: a letter on a row searches the tree. The test keeps its subject, which is the tree reading standalone data and keeping its selection and search across a data change. No product code changes, and nothing of #6469's intent is given up. Verification: the test passes on #6469's parent (`9e0abccb9^`) and fails on #6469 and on `main` (`c5ccb1183`) with `.lf-composer leaf-text` never focused. With this change it passes, and so does `test_a_file_tree_opens_each_file_the_editor_holds`. Refs #6418 — automated triage Co-authored-by: leaf-agent <[email protected]>
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.
The file-tree corpus sweep typed
cWinto tree search because Pierre Trees consumed Leaf’sccomment shortcut before the page command saw it. Leaf now resolves shortcut characters before a nested widget handles them, while Enter and Escape still reach the focused control first. From a tree row,copens the comment composer and keeps its draft through the scroll sweep.The same corpus cases also found the tree’s intentional viewport scroller undeclared: its height marker was on the host, but that registered CSS property does not inherit. The viewport now declares it directly.
The focused file-tree interaction test failed before the keyboard change and passes now. Both file-tree corpus cases pass, along with 522 runtime tests and the browser bundle check. A base/candidate browser probe confirmed the comment route and found the same startup request counts.
Closes #3552 — automated triage