Repository navigation
fix: expose the chrome's foreground layer as a generic box, not a dialog - #5336
Conversation
#5039 gave the foreground `<dialog>` `tabindex="-1"` to keep Firefox from stopping Tab on it. A focusable element's presentational role is ignored (ARIA's presentational-role conflict resolution, which Chrome applies), so `role="presentation"` stopped hiding the layer and it read as an unnamed dialog around the panel. Screen readers saw it, and the thread-card test's `get_by_role("dialog")` found two dialogs. `role="generic"` keeps the layer out of the Tab order and out of the dialog role. Closes #5126
|
@leaf-agent The proposed
|
|
Agreed that Nothing required the native dialog. The command reference, page map and popovers inside it still open in the top layer, because the browser puts them there whatever holds them. Nothing opens or closes the layer itself. |
…og (#5360) The chrome's foreground layer (it holds the floating panel, hint layers and the chrome's own dialogs) is now a plain `div` with `tabindex="-1"`. Before, it was an open nonmodal `<dialog>`. #5336 gave that dialog `role="generic"` so Chrome would stop exposing it as an unnamed dialog around the panel, but [ARIA in HTML](https://www.w3.org/TR/html-aria/#el-dialog) permits no such role on `dialog`, as max-sixty pointed out on #5336. A `div` is generic natively, so it needs no role. Nothing still needed the element to be a dialog: - Native layers opened inside it (the command reference, page map, popovers) still stand in the top layer, because the browser puts them there no matter what holds them. - Nothing calls `show`/`showModal`/`close` on the layer. Its old modal posture (#2006) is gone. - The one `closest("dialog, [popover]")` reader (`focus.js`, `leftClosedLayer`) gets the same answer, since an open dialog there already counted as "still standing". `tabindex="-1"` stays, so Tab order and focus are unchanged. The layer has no Tab stop, so the Firefox stop removed in #5039 stays gone. A press between the panel's controls still focuses the layer instead of dropping focus to the body. Paint order doesn't change: the layer keeps its place in the chrome and its `position: absolute` box at the origin. The CSS that cancelled the browser's dialog styling (border, padding, max size, background) goes with the dialog. A stale comment in `leaf.js` about the hints' "native modal ancestor" goes too. Verification, on current main: - `test_borrowed_scroll_stops_leave_code_selection_and_marks_with_their_owners`: all three cases pass. It fails when the layer is exposed as a dialog. - `tests/browser/controls/test_focus.py` passes, including the Tab-order test in Chromium and Firefox. So does `tests/browser/widgets/test_code_and_documents.py`, which includes the zero-dialog check. - `pnpm run test:runtime` and `pnpm run check` pass. Refs #5126 and #5336. Co-authored-by: leaf-agent <[email protected]>
…other bots' heads for landing (#1652) Leaf, the only consumer that sets `workflows.review.await_ci: false`, has landed reviewed heads a median 2.4 minutes after their CI settles over tend-land's first 20 days (p95 6.5 min, n=533). The shortfalls were in the sessions around tend-land. This PR fixes four of them, building on #1648's **Which heads to poll** rule. ## Every session is told the wait is off Only the review, triage and land prompts carried the sentence "The review's CI wait is off". Mention, notifications, nightly, weekly and review-runs sessions never saw it, so they kept owning a bot PR's CI as `run-tend` says. On Leaf's first 50 hours on Claude, 16 of 60 mention sessions polled, 13 of them on bot PRs. 31 of 115 repair sessions found that the pushing session, still polling, had already fixed the red. The generator now passes the fact to each agent step as an `await_ci` action input. `_prompt.render` states it once in the shared system prompt, beside the merge mode, and the appended prompt sentences go. `nightly`'s hard-coded poll now defers to `monitor-ci`. A focused eval states the fact per situation, so `evals/prepare.py` renders it empty there. ## A push to a human's PR stays with the session that made it Once told, sessions read `run-tend`'s handoff as covering any push and stopped polling on a maintainer's PR, where tend-land repairs nothing. `run-tend` now says tend-land repairs only a PR with no human author, and that a push to a human's PR stays with the session to poll, except a review's own fix, which **Without the CI wait** in `approving.md` already hands to the review queued behind it. Replays of real Leaf mention sessions on Opus 5.5, each cut just after its push and resumed with `gh` and `tend` stubbed offline, three runs per session. Runs that polled CI afterwards: | | Bot PRs (max-sixty/leaf#5374, max-sixty/leaf#5413) | Human PR (max-sixty/leaf#5370) | |---|---|---| | #1648's rule, no sentence | 5 of 6 | 3 of 3 | | The rule and the sentence | 0 of 6 | 0 of 3 | | Both, with the `run-tend` clause | 0 of 6 | 2 of 3 | The run that still stopped on the human PR took recording the push to mean tend-land owned it. A red head there still reaches its author. Three runs show a difference, not a rate. ## A head on another bot's PR can be recorded for landing `land-pr intend` required this bot's push record, which a Dependabot or Renovate head never carries. When CI outlasted the review, nothing landed the PR until the daily sweep or a maintainer: 4 of 13 Dependabot PRs on Leaf waited between 2 and 58 hours. `intend` now accepts a head on a PR GitHub marks as authored by a bot. A waiting review already merged these heads once green, so this changes when they land, not whether. A head a person pushed to this bot's own PR, and a PR from an automation account GitHub types as a user, still stay with a maintainer. `review-without-ci-wait` gains a Dependabot session. On Claude, main records nothing in 0 of 3 runs, each reasoning that the head has no push record. This branch records it in 3 of 3, passing the case's other sessions in the same runs. ## The landing session's reads `merge-pr` told a landing session to leave the PR open "if the base has changed since". The record holds a branch name, but 23 of 462 Codex land sessions took it to mean the commit and refused because `main` had advanced. Nothing wakes tend-land again for that head, so those PRs waited for something else to merge them. The skill now says the record names a branch, and that commits landing on it don't count. max-sixty/leaf#5336 merged past a maintainer's comment: the session read the thread, met GitHub 502s, and retried for 11 minutes on that read. The skill now says a 5xx is no verdict, and to re-read the PR before trying again. Neither wording change has an eval. ## Validation - `uv run pytest` (all but the two network-bound tests) and `pre-commit` pass. - The replays and eval above, on Claude only. Nothing has run live on Leaf. > _This was written by Claude Code on behalf of max-sixty_
…ssName (#5535) `test_an_acknowledgment_uses_status_until_an_active_claim_restores_a_disclosure` has failed on main with `Unknown contribution entry option: className` since #5329 (078ad7e), not #5336 as the issue's bisect concluded. #5336 changed only `browser/runtime/chrome.js`. #5329 deliberately dropped `className` from contribution entries ("Margin entries take no `className`" in its description) and moved its tests to `data-lf-margin-entry-owner` / `data-lf-margin-entry-key`, but it missed this test's pickup-carrier probe. The two commits landed a minute apart, which is probably why the bisect pointed at the wrong one. The probe now registers its entry without `className`, and the test finds the carrier by owner `workflow-primary-probe` and key `edit`. The assertions are unchanged, so the test still covers what it protected: a semantic action carries pickup, and removing it brings back the status marker. Nothing in the product changes. Verification: the test fails on current main with the reported error and passes with this change (`uv run pytest tests/browser/margin/test_status.py::test_an_acknowledgment_uses_status_until_an_active_claim_restores_a_disclosure`). Closes #5482 — automated triage Co-authored-by: leaf-agent <[email protected]>
The chrome's foreground layer is a
<dialog open role="presentation">. #5039 gave ittabindex="-1"so Firefox stops putting it in the Tab order, but ARIA ignores a presentational role on a focusable element, so Chrome's accessibility tree has exposed the layer as an unnameddialogaround the panel since then. Screen readers saw that extra dialog, andtest_borrowed_scroll_stops_leave_code_selection_and_marks_with_their_ownersfailed onget_by_role("dialog")because it matched both the thread card and the layer. This PR changes the role togeneric. The layer keepstabindex="-1"and stays out of the Tab order, as #5039 intended, and stops being exposed as a dialog. Nothing on screen changes.Verification:
[None]and[-1]cases fail with the same strict-mode violation as scheduled run 41432142330. With this change, all three cases pass.Accessibility.getFullAXTree) of<dialog open tabindex="-1">shows the roledialogfor bothrole="presentation"androle="none", andgenericforrole="generic".pnpm run test:runtimepasses. The tab-stop tests intest_command_reference.pyandtest_render_floating_panel.pypass, and so does the zero-dialog check inwidgets/test_code_and_documents.py.Closes #5126 — automated triage