Repository navigation
Let the command reference run Resolve outside a thread, and keep each command's availability in its when - #5250
Merged
Merged
Conversation
…the corner fold again Six keyboard tests in `tests/browser` fail on `main`, in CI and locally, since #4873 and #4895. Two of the causes were in the runtime, and the rest in fixtures that still used the API those changes replaced. - **The command reference.** #4873 moved some rows' availability into a `get run()` getter that returns nothing while the command can't act, and the reference read that value to decide whether a row runs at all. So Resolve, outside a thread, became a disabled option rather than one the user can pick and be told "Available in a thread". The reference now asks whether the row declares a `run` (or a `runKey` for a keyed route), as registration already does, and leaves "now" to availability. - **The panel's corner fold.** #4873 also had the corner mark call the fold directly instead of pressing the fold command's row, so the press was no longer announced or logged. It presses the row again. - **Fixtures.** Four declared a key-dependent action as `run(binding)`, which #4873 renamed `runKey`, so they received `undefined`. Two lookups, and a journey's two, still asked for reference rows as buttons, which #4895 made listbox options. `tests/AGENTS.md` now asks whether anyone is fixing a failure on `main`, rather than who owns it. Tend had filed these causes (#5073, #5076) a day earlier, with no pull request since, and the session that met them took them for local-only: main's newest runs were all cancelled by later pushes, and a search for the test names joined with `OR` found nothing. So the guidance names the latest finished run, says a cause issue no pull request links is still waiting, and has a session working for a maintainer start a local session for a failure nobody is fixing. Checked: the six tests, the floating panel's fold tests, the radio and slider fixture's test and `tests/journeys/test_render_code_reading.py` pass by node id; `pnpm run test:runtime` and `pnpm run check` pass. Five other keyboard failures on main (`test_focus`'s reference-command gesture, `test_commenting`'s submit shortcuts and `startup/test_keys`'s early key) still fail with this change and have other causes. Closes #5073 Closes #5076 > _This was written by Claude Code on behalf of max-sixty_
…t says #4873 folded four rows' when into a run getter, so the register showed them live while their run had nothing to do: the reference listed Copy message as Markdown with words selected, and pressing it said it was available in a thread.
leaf-agent
previously approved these changes
Nov 3, 2026
# Conflicts: # dist/kernel/leaf.js
leaf-agent
approved these changes
Nov 3, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 4, 2026
…#5313) #4873 let a command row declare `run` as a getter that returns nothing while the command can't act. Dispatch then fell through, but every other reader of availability (the command reference, key hints, `aria-keyshortcuts`) reads `when` and took such a row as live. #5250 put four thread rows back on `when` with a plain `run`, as `bindings.js` asks ("Do not repeat a guard inside `run` if the guard changes whether the key should be shown"). This does the same for the six rows that were left: - `navigation.back` (`register.js`), `selection.restore` (`composing/capture.js`) and the three `margin.card.*` rows (`annotation-overlay/thread-preview.js`) already had a `when` that matched their getter's guard, so their behavior is unchanged. - `code.copy` (`code-copy.js`) had no `when`. Before its Copy button upgraded, a code block advertised Enter as "copy code" and the press fell through to the page. It now waits in its `when` for the button. The detail dial's arrows (`packages/detail/widgets/lf-dial.js`) had the same fault without a getter: `dial.less` and `dial.more` had no `when`, and their `run` returned at the dial's ends. At Skim the dial advertised ← for Less detail, which does nothing. Each row now needs a depth beside the current one in its `when`, and drawing a depth calls `commandsChanged` so Leaf reads them again. A probe of `detail` reads the dial's `aria-keyshortcuts` as `ArrowRight` at Skim, both arrows at Read and `ArrowLeft` at Everything; on `main` it reads both arrows at every depth. With no getter left, a row's `run` and `runKey` are plain values again: - `declaresCommandHandler` is deleted. Registration, the register's touch check, button wiring and the command reference read `row.run` and `row.runKey` directly. - Go-to registers its direct destinations by spreading them, without copying property descriptors. - The three runtime tests that pinned the getter contract are deleted. Three browser tests still looked up command reference rows as buttons, which #4895 made listbox options. They now ask for options: - `controls/test_focus.py::test_a_reference_command_finishes_its_gesture_before_a_newer_control`, which failed on `main` with no Tend cause issue. - `test_render_code_reading.py::test_code_wrapping_keeps_source_copy_and_reader_choice`, which presses Unwrap lines and Copy code in the reference, then Enter on the block. - `test_render_heading_links.py::test_a_heading_copies_the_link_to_the_section_it_opens`. Checked by node id: those tests; `test_reading_place`'s Restore selection; `test_render_code_reading`'s copy over plain HTTP; `test_summaries`' margin paging, which Tabs into and out of a card; `test_clusters`' reference row for Escape; four of `test_key_scopes`' Escape and back-gesture tests; and `test_dial`. `pnpm run test:runtime`, `pnpm run check:browser` and pre-commit pass. Locally, three of `check:worker`'s bundle and storage tests hit their 5 s and 60 s timeouts at a load average of 50 to 85, so the pull request's run is their check. > _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.
Six keyboard tests in
tests/browserfail onmain, in CI and locally, since #4873 and #4895. Three of the causes were in the runtime, and the rest in fixtures that still used the API those changes replaced.runas a getter that returns nothing while the command can't act, and the reference read that value to decide whether a row runs at all. So Resolve, outside a thread, became a disabled option rather than one the user can pick and be told "Available in a thread". The reference now asks whether the row declares arun(or arunKeyfor a keyed route), as registration already does, and leaves "now" to availability.whenof four rows (thread.primary,thread.resolution.toggle,message.copy,message.edit.previous) into such a getter, so every reader of availability but dispatch took them as live while theirrunhad nothing to do: the reference listed "Copy message as Markdown" while words were selected, and the message editor advertised ↑ with no message above to edit. With the reference fix above, that row would also have become one to pick. Theirwhenis back, with a plainrun, asbindings.jsasks ("Do not repeat a guard insiderunif the guard changes whether the key should be shown").run(binding), which Make strict checking the default for maintained browser modules #4873 renamedrunKey, so they receivedundefined. Two lookups, and a journey's two, still asked for reference rows as buttons, which Open the leaf's menu as the On view's first tab, searched from the field #4895 made listbox options.tests/AGENTS.mdnow asks whether anyone is fixing a failure onmain, rather than who owns it. Tend had filed these causes (#5073, #5076) a day earlier, with no pull request since, and the session that met them took them for local-only: main's newest runs had all been cancelled by later pushes, and a search for the test names joined withORfound nothing. So the guidance names the latest finished run, says a cause issue with neither Tend's eyes reaction nor a linked pull request is still waiting, and has a session working for a maintainer start a local session for a failure nobody is fixing.Checked by node id: the six tests, the floating panel's fold tests, the radio and slider fixture's test,
tests/journeys/test_render_code_reading.py, and the tests that press Enter,r, the copy key and ↑ in a thread (test_key_surfaces::test_a_key_on_screen_is_a_key_that_works,test_rewrites' three walks,test_layout's Markdown copy,test_commenting's native copy,test_resolving's andtest_seated_threads' settling).pnpm run test:runtimeandpnpm run checkpass. Five other keyboard failures onmain(test_focus's reference-command gesture,test_commenting's submit shortcuts andstartup/test_keys' early key) still fail with this change and have other causes.Closes #5073
Closes #5076