Repository navigation
Take DISCLOSE and allButCommandReference out of the package API: Leaf answers a disclosure and a menu unasked - #6953
Merged
Merged
Conversation
Two functions a widget imported to ask for what Leaf's keyboard already does for every element. The package API exports 175 names, from 177. DISCLOSE. lf-diff's file row and a settled lf-options' row each declared a run-less command row whose keys came from DISCLOSE. The row re-worded a press the page's disclosure scope (keyboard/page.js, disclosure.toggle) already answers on every `details > summary` and every button with `aria-expanded`, a widget's and a staged one included. Both rows go. control-keys.js existed to hand DISCLOSE to portable-api.js without the dispatcher, so it folds into keyboard/disclosure.js. allButCommandReference. lf-file-editor's conflict menu gave it as its scope's `claims`. The dispatcher already keeps letters and digits from every scope around an ARIA menu that holds focus (text-entry.js, TYPES_AHEAD) and keeps Escape inside an open popover, so the menu declares no claim. The function stays the runtime's own, for Go-to, reactions, region capture and the target picker. No package declares `claims` now, so module-input.md stops describing the option and says what Leaf holds for a menu, a popover and a modal dialog with nothing declared. What a user can see change, measured with `leaf-dev probe --base` in Chromium and Firefox: - While the user was on a diff's file row, the command reference listed its press twice, as "On a disclosure: close" and "On a diff: hide this file", and a settled row's twice, the second under "In settled options". It lists each once now, in the page's words. - Those two rows no longer carry `aria-keyshortcuts`, which named Enter, Space and the arrow. No other disclosure on a page carries it. Their keys work as before. - In the conflict menu the page's keys that are neither letters nor digits act again: `/` opens page search over the open menu, where it did nothing. `c` and `t` still wait. Tests. test_the_arrows_say_which_way_the_section_under_the_user_goes and test_staged_widget_controls_name_the_presses_their_owners_make read the arrow the dispatcher offers in place of the rows' `aria-keyshortcuts`. They still hold that only the arrow that changes the disclosure is offered, for both spellings and for a staged summary, and that it turns over with each press. Their comments credited the disclosure watch with that turn; the dispatcher reads DISCLOSE as it is asked, so they say that instead. The Node test of a template scope's function rows reads the element directly rather than through DISCLOSE.
leaf-agent
approved these changes
Nov 24, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 24, 2026
A follow-up to #6953, which took out the last widget rows whose `aria-keyshortcuts` this watch kept current. It was a `MutationObserver` over the document and every shadow stage: on each `open` or `aria-expanded` change it marked the command scopes around the element and asked for the repaint frame. The dispatcher reads the page's own disclosure row as it is asked, so nothing reads what the watch repainted, and every page paid for it. Nothing a user can see changes. With the watch gone, 1,279 Chromium browser tests of disclosures and of the chrome whose controls write `aria-expanded` pass by node id. Six fail the same way with the watch standing, so `main` has them already: `test_sample_browser_boundary_contains_focus_scroll_and_parent_access`, `test_a_diff_surface_keeps_the_complete_thread_lifecycle_inline`, `test_a_data_bound_diff_aims_and_selects_one_source_line`, `test_each_sampled_focus_ring_is_shown_whole_in_its_surface`, `test_a_summary_folds_its_messages_where_they_stand` and `test_file_tree_lands_at_the_file_start_after_reading_down`. `leaf-dev probe --base` in Chromium and Firefox ends every step of five journeys with the same DOM on both arms, but for values that vary from run to run on either. A margin test's `news` reading existed for the watch and goes with it. Ran `pnpm run check`, pre-commit, and a fresh-context review, which found nothing that depends on the watch. > _This was written by Claude Code on behalf of max-sixty_
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.
One step of the package-interface redesign: two functions a widget imported to ask for what Leaf's keyboard already does for every element.
lf-diff's file row and a settledlf-options' row declare no row throughDISCLOSE: the page's disclosure scope already answers everydetails > summaryandaria-expandedbutton.lf-file-editor's conflict menu drops itsallButCommandReferenceclaim: the dispatcher keeps letters and digits for any ARIA menu and Escape inside any popover. The API exports 162 names, from 164.What a user can notice, measured with
leaf-dev probe --basein Chromium and Firefox: the command reference listed a diff's file row and a settled row twice, once in the widget's words ("hide this file"), and now lists each once; those rows losearia-keyshortcuts, which no other disclosure carries; and in the conflict menu the page's/and.act again, while letters and digits still wait. No package declaresclaimsnow, somodule-input.mdstops describing it.reachedForWords,dressCodeandreleaseOutletsstay exported.Ran
pnpm run check, pre-commit, the Node tests for the API and command rows, and four browser tests and two hold-still cases by node id. The reference passage scored no worse than the base's.