Repository navigation
Take an option's and a board card's title from label, and recommended from an attribute - #6289
Conversation
…ns with A section, div or question group's aria-labelledby, then aria-label, then a fieldset's legend now name it before Leaf's own opening-heading reading, in both runtimes. Registered widgets keep `label` and take no ARIA name. Python's group_name becomes aria_name, which element_name calls for plain markup and page check still requires of a question's group; a widget's prompt is its group's element_name. The browser gains ariaNaming, used by addressableNaming and accessibleNaming, and labelledBy moves from preview.js into addressable-names.js. Authoring.by_id replaces two hand-built id maps. A declared name withdraws a heading's title but never gives one, so which heading heads which part stays in reading order: letting aria-labelledby title a section by a later heading made partOver cycle between the two headings and overflowed the stack in conversationsAbout (Codex review). Max asked for the declared-name clause when he picked #d2 on the markup-meaning page; it waited for #6256 so Python keeps one ARIA reader.
…preview.js The leaf-agent review found that skipping ARIA for every registered element dropped the aria-label that bundled widgets such as lf-timeline carry from On Me rows and feed rows; only addressableNaming skips it now.
…-names # Conflicts: # src/leaf/obligations.py # src/leaf/validation/instances.py
# Conflicts: # packages/default/registry.json # skills/leaf/references/authoring-on-me.md
… its end; tests and rubric follow
leaf-agent
left a comment
There was a problem hiding this comment.
On Me's description of a card option now starts with its chips and takes in any text inside its pictures. consequence returns wrote(option). In the new markup the chips are no longer ahead of a title, so they fall inside those words. tests/browser/widgets/test_on_panel.py::test_an_option_s_choice_on_its_card_says_what_it_gives fails on this head. I ran it locally, and the description reads two days One mechanism for any number of blocks. fig, where the test expects One mechanism for any number of blocks.. The description is cut to two lines, so on cards with several chips, such as effort: low and risk: med in the registry's own example, the chips can fill both lines and push out the sentence the description is for. The PR body says the option tests that read titles pass, and this one doesn't.
…tests read the drawn title The leaf-agent review found that taking an option's whole words put its chips and an SVG's text into On Me's two-line description. HTML's phrasing content (now exported as phrasing) ends the sentence, and <small> side comments and foreign drawings stay out. CI's four failures read <strong> titles or the old snapshot.
…red (#6295) Seven browser tests on `main` broke because #6256's markup migration left test pages behind. This fixes those pages, not the runtime. Each test failed on `main` at 2aabb54 and passes on this branch. So do the rest of `test_commenting.py`, which shares one of the edited pages, and the model tests that read the fixture corpus. #6256 made every question a named group and gave its heading an id for `aria-labelledby`. Four pages didn't follow that: - **Live-keys pages** (`test_current_location.py`, three tests). `LIVE_KEYS_APPARATUS` and both rewritten pages replaced `<h2>Which one?</h2>`, which no longer matched once the heading had an id. The replacement silently did nothing, so `#lk-note` and `#lk-tick` never reached the page and each test waited out its 120 s timeout. The pages now replace the heading through one constant, `LIVE_KEYS_ASKS`. - **Tabs revision** (`test_tabs.py`). The revision added an `<lf-options>` outside any group, which `page stamp` now refuses. It now writes the question in a named group. - **Runbook fixture** (`sidebar-contents.html`, the contents-marks test). The migration made the whole "Switch the services" section the group, including the paragraph and the Ledger subsection where its threads are anchored. A comment inside a question's group hands the question to the agent, so the question left the user's On Me list and the row showed `thread`. The group now wraps only the options, named by `aria-label` so the contents gain no row. - **Where-I-stand page and the first-line aim case** (`test_key_scopes.py` aim subtest, `test_render_aim.py[first line]`). Leaf takes the nearest element with an id as a comment's target. With an id on the heading, Alt-clicking it commented on the heading rather than the question. Escape then returned focus to the heading, and the comment stood in the heading's own margin row. Both pages now name the group with `aria-label`, so the heading has no id and the tests check aiming at the question again. The last item is a choice about what the evidence leaves open. Pages written the way the reference teaches still comment on the heading. #6296 asks the maintainer whether a heading its group names should aim at the group, which would be one rule in `aimTargetAt`. This PR moves no runtime behavior. #6289 edits lines near these in the same files, so whichever lands second will need a small rebase. Closes #6292 — automated triage --------- Co-authored-by: leaf-agent <[email protected]>
…'s rules still win
`lf-group` is a named group of whatever it holds. Its `label` names it wherever Leaf names it, such as On Me, a link to it or a thread on it, and the group draws none of it: any heading the group shows is the author's own HTML inside it, so the name is data apart from the title on the page. A widget that asks inside a group takes the innermost one as its question: the label is the question's words on On Me, and the group is where `m` lands. It replaces the question group written in HTML (`role="group"` named by `aria-labelledby` or `aria-label`, or a `<fieldset>` named by its legend), so Leaf names no group from ARIA: Leaf's own elements are named by `label`, and plain markup by HTML's structure. Max chose this over #6283, which read ARIA names more widely, as #d6 on his design page for how Leaf reads markup, and asked that the group draw no title. The kernel declares the role (`reading-role: group`), so the obligation reader in both runtimes and the workspace's full-height rule read the role, not the tag. Where a thread message draws without its widgets, a group that asks nothing keeps what it holds. `group_name` and the `question-group` finding go; `page check` still refuses a widget that asks with no group round it. 465 groups moved across examples, docs, evals and tests, each keeping the heading its author wrote. What to weigh: - **A question's words are written twice**, in the group's `label` and in its heading, and nothing holds the two together. - **A group is not a section**, so CSS written for `section` no longer reaches a question. Stills of six question states against main change only the feature gallery's "lf-group" eyebrow words. It builds on #6289, which has merged. The runtime suite, `check:browser`, the model and process tiers, page checks of the 21 changed examples and site pages, and the browser tests edited by hand pass locally. > _This was written by Claude Code on behalf of max-sixty_
…label as its name alone (#6325) Option cards and board cards keep `label` as their name, the words On Me, threads and previews show, and no longer draw it: each card shows the title its author writes in it, a leading `<strong>`, as an `lf-group` shows the heading written in it. Max picked this on his markup-meaning design page: a name Leaf reads is data apart from the title the page shows. `lf-option` and `lf-card` drop `says`, so neither runtime writes the label into a card's words. The `<strong>` titles #6289 moved into `label` are back where their authors wrote them, about 570 across examples, docs, references, evals and tests. Chips written before a title stand above it again, and cards laid across align their titles over them as they did before #6289. `recommended` stays an attribute, and its chip now leads the card's words. What to weigh: - **On Me shows a card option by its name alone.** The sentence it showed under the name came from reading the author's markup. Options without one draw there as compact choices. - **Each card's name is written twice**, in `label` and in its title, and the two can drift apart. - **Board columns and tabs still draw their label.** A column is a list the board builds, and its heading is that list's name beside its card count. Tests: the runtime suite, `check:browser`, the model tests the change touches, and the option, board and On Me browser tests that read titles all pass locally. > _This was written by Claude Code on behalf of max-sixty_
…lled option tag The nested-obligation test added selected by replacing <lf-option id="out-drill">, but #6289 gave that option a label, so the replace no longer matched. It now matches the opening of the tag.
…lled option tag (#6328) #6289 gave `<lf-option id="out-drill">` in `NESTED_OBLIGATION_PAGE` a `label`, so `test_a_nested_obligations_pick_is_not_part_of_its_outers_record` stopped matching it when it replaced the exact tag `<lf-option id="out-drill">`. Nothing was marked `selected`, the outer question showed as overridden, and the test failed on main in push run [44182772749](https://github.com/max-sixty/leaf/actions/runs/44182772749). The replace now matches the tag's opening, so the test checks its original behavior again. Only the test changes. It fails on current main and passes on this branch when run by node id. The same run had two other failures with the same cause: `test_the_gate_passes_a_page_that_carries_a_comment` and `test_board_moves_preserve_live_sample_and_control_state`. #6325 fixed those when it restored the `<strong>` titles in their fixtures, and both pass on current main. Three more failures in that run come from #6289 but need a decision rather than a test edit: work goals and atlas tasks were named by their leading `<strong>`, and they take no `label`. They are filed separately. Refs #3985 Co-authored-by: leaf-agent <[email protected]>
…6331) #6289 stopped taking a widget's name from its leading `<strong>` and has widgets name themselves with `label`. But the goal widgets `lf-atlas-task` (command-hub) and the fixture's `lf-test-task` declared no `label`, so `readWork` titled every goal by its id (`addressableName(goal) || goal.id`), and the Leaf panel's activity row on command-hub named an atlas task by all its words, status chip included. Both widgets now declare `label`, and each goal in `examples/command-hub.html`, in the usability eval's `evals/usability/fixtures/hub.html` (which composes the command-hub package) and in the work tests carries it beside the `<strong>` title the widget still draws. #6329 left the choice open between this and dropping the `<strong>`. #6325, merged since, settled it for cards: `label` is the name Leaf reads, and the `<strong>` is the title the page shows. This PR applies that split to goals. As #6325 notes for cards, each name is now written twice and the two copies can drift. Verification: these three tests failed on `main` at `b8f70ba96` and pass with this change: - `tests/browser/test_render_work.py::test_public_work_roles_preserve_scope_remit_and_reports` - `tests/browser/test_render_work.py::test_a_page_owned_goal_joins_the_public_projection` - `tests/browser/test_render_projection.py::test_atlas_send_and_pause_is_one_thread_fold` The rest of `test_render_work.py`, `tests/model/interact_contract` and `tests/model/test_model_folds.py` also pass. `leaf page check` on a command-hub preview reports status 0. Closes #6329 — automated triage --------- Co-authored-by: leaf-agent <[email protected]>
…two journey tests (#6387) Two nightly journey tests broke in the [Nov 18 scheduled run](https://github.com/max-sixty/leaf/actions/runs/44289276069) because they search for markup that #6289 and #6315 changed. Neither change moved what these tests protect, so only the tests change. - `test_flag_attribute_accepts_both_html_spellings` (`assert 0 == 1`): #6289 gave the fixture's `backfill-first` option a `label` after its id. The test's `replace('id="backfill-first">', …)` stopped matching, so both checks read the unchanged page and `selected="yes"` was never put in front of `page check`. The flag now goes straight after the id, and the test again sees `selected=""` accepted and `selected="yes"` refused. - `test_every_table_the_theme_sets_honestly_passes_the_gate` (`ValueError: substring not found`): the test cuts the `opts-decision` and `figure-asked` questions out of their pages as `<section>` elements, and #6315 made both `<lf-group>`. It now cuts the `lf-group`. Both tests fail on main `90ec76548` and pass on this branch. `git bisect run` from the previous scheduled run's commit `2aabb5436` puts the first failure at #6289 for the flag test. The render-gate test passes at #6315's parent and fails at #6315. The run's other new failures have separate owners, linked from the report. Refs #4225 — automated triage Co-authored-by: leaf-agent <[email protected]>
… `recommended` (#6443) A choice Leaf's turn-end check posted typed "(recommended)" into its first option's label and title instead of setting `recommended`, so the thread card showed the word and no chip. The chip itself works in thread cards. The fork that writes those asks can't open files and reads its guidance as paragraphs cut from the references (`GUIDANCE`). The paragraph on choices said only "mark the one you advise (`authoring-on-me.md`, …)". The attribute is named where that pointer leads, and shown in the fenced example right after the paragraph, which the cut left out. `reference_paragraph` now returns a paragraph with any fenced example directly after it, as the agent reads them, so the fork sees `recommended` on the advised option without a reference stating the rule again. The comment on `GUIDANCE` says what the fork needs to write a message belongs in a paragraph or its example. The turn-end eval's judge now fails an advised option marked in words. Two of the nine paragraphs have an example, adding 69 words to each turn end's uncached prompt. Following the paragraphs' pointers instead would pull in 16 whole sections, 8,841 words against 1,228 now. Since #6289 made `recommended` an attribute, 2 of 13 fork asks that marked advice put the word in the title. No eval run or replay of the failing turn reproduced it on main: at that rate, too few runs posted an advised option to show it. On the eval's three choice cases, three runs per version, every advised option carried the attribute on main and here (3 of 3 each), none said it in words, and the judge passed 8 of 9 on each, both failures a question left inside a paragraph. Max asked why the option wasn't a chip, on a Leaf page, and how to give the fork the guidance it needs without restating it. `tests/model/test_clerk.py` passes. > _This was written by Claude Code on behalf of max-sixty_
The build moved `.tag`, `.lede`, `dl.facts` and `svg.drawing` from the reading theme to the default package behind `--lf-reading-face`. A review found that the gate keeps those rules out of markup a shadow-tree widget holds, so the facts in a worktree card lost their layout, and main has since rewritten the rules it moved (#6148, #6289). The build stays at ab039c4.
…ce (#6722) Three evals had drifted from the code they test. This brings each back in line. - **`control-legibility` couldn't start.** `views.py` exits when `actions.json` and `ACTIONS` in `browser/runtime/icon-paths.js` disagree. #6679 and #6687 added four presses to `ACTIONS` (`resume-writing`, `restore-edit`, `show-annotations`, `show-changes`) that `actions.json` didn't have. Each now has a line saying what pressing it does, taken from the notice that offers it (`drafts.js`, `thread/message-edit.js`, `annotation-layer.js`, `since-seen.js`). A Node comparison of the two key sets now comes back empty. - **Two rubrics failed pages that follow the shipped guidance.** `proposals-get-individual-decisions` (`recommendation-markers`) and `options-stay-words-for-wording` (`comparison-labels`) still asked for a "recommended small.lf-tag". Since #6289, the advice marker is the `recommended` attribute on the `lf-option`, which draws the badge; `authoring-on-me.md` and the `lf-option` registry entry both teach it. #6715's rename to `lf-tag` carried the stale requirement forward. Both rubrics now ask for `recommended`. This only corrects a fact, so there's no instruction scoring. The header of `proposals-get-individual-decisions` still calls compact recommendation markers a known failure, and that may have been this mismatch; the next run of the case will show whether it holds. - **`evals/README.md`** still described the JavaScript assertion that #6681 replaced. Complete authoring tasks now grade with the Python assertion `regrade.py:authoring`. No regression test is added. `views.py`'s own startup check is what reports `actions.json` drift, and a suite test would charge every new icon action for an experiment. `dev/tests/test_evals.py` passes and both case files parse. Co-authored-by: leaf-agent <[email protected]>
An option's and a board card's title move from a leading
<strong>to alabelattribute, which the widget draws as its heading (words.says), as a tab's and a column's are.recommendedbecomes a boolean attribute that draws the badge, in place of a<small class="tag ok">recommended</small>chip whose words Leaf read. On Me's description of an option is its sentence: its words up to the first element HTML sets apart from a line of words, less<small>side comments such as chips and any SVG drawn among them, where a walk read computed style.phrasingjoins the package API for that. A thread message's words, which name its thread and its On Me row, hold its options' labels, as the drawn message does. With titles moved, no widget takes a name from its markup, so the walk that found a widget's leading heading, summary or<strong>is deleted in both runtimes (addressable-names.js,gesture_words.py); plain markup keeps its caption rule. RootAGENTS.md's "Read what the page states" asks for this.A codemod moved about 470 options and 110 cards across examples, docs, references, tests and evals. The 2 titles that held
<code>became plain text.page checkgives advice where a widget that takeslabelleads with a<strong>, the habit 3,076 options on real pages still follow.What to weigh:
<strong>title named the option alone, and the part went on to its question.lf-optionswhere it upgrades first, because the mark's float has to come first to stand on the title's line. Labelled cards trim only their frame's end, so a figure after the title keeps its margin.Max picked
labelas #d3 on his design page for how Leaf reads markup. It targets main: #6283, which it stood on, closed when Max chose anlf-groupelement over reading ARIA names, so it reads no ARIA. The runtime suite,check:browserand the model tests pass on this head, and the option, board, On Me and obligation browser tests that read titles or descriptions passed before main was merged in. Codex reviewed it; its findings are fixed or listed above.