Repository navigation
Look for duplicate implementations in Tend's review and in a weekly sweep - #5291
Merged
Merged
Conversation
…econd home by its question Tend's review overlay told the reviewer to apply `/developing-leaf`'s "Weigh what a change adds", but no review loaded the skill: 0 of 11 production `tend-review` sessions on 2026-11-03, and 0 of 9 replayed reviews, opened it. The overlay now says to load it. "Weigh what a change adds" gains "What it repeats", which replaces "a second statement of a rule with an owner" in "What it adds". Copies in this tree seldom share a name or directory with their owner, and many are a constant, a selector, a CSS rule or an inline check rather than a new function, which is all the bundled review skill's duplication check covers. So the bullet asks for a search by the question the new code answers, counts a copy that cites its source as a second home, and says to make an unreachable owner reachable. "Regular maintenance" points the nightly survey's per-file pass at the same search, since the survey's hash buckets almost never put two copies on one night. In a replay of four pull requests that each added a duplicate (#3832, #5196, #2345, #3137), reviewers told to load the skill flagged it in 5 of 8 runs with this bullet and 3 of 8 without; the gap is within noise at that size. The load matters more: without it, 2 of 9 runs flagged one.
Review misses copies that answer an existing question under a new name, and the nightly survey reads files one at a time from a crc32 bucket, so two copies in different files share a night about once in 28. A weekly pass over one area, searching the whole tree by the question each piece of code answers, finds them; the 2026-11-03 sweep found 39 that way. Naming each copy's introducing pull request shows what review let through since the area's last sweep.
leaf-agent
approved these changes
Nov 4, 2026
This was referenced Nov 4, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 4, 2026
…d titles (#5293) Part of the 2026-11-03 sweep for duplicate implementations (#5291 changes how review and Tend look for them). Each question below was answered in more than one place in `src/leaf/`, `hooks/` or the dev commands, and the copies had drifted; each now has one home that every caller uses. - **Thread title limit.** `registry.kernel.title_limit()` reads the kernel registry's `maxLength` on the `thread_title` event's `title`, and `thread.fit_title` is the one fit: it collapses whitespace and cuts at a word, ending in an ellipsis. The clerk and the page server's generated titles (`thread_titles.write_title`) both use it, and the CLI's `--title` help and `events.md` take the number from it. The six registry copies of the title schema stay inline: no kind's record refers to another's by `$ref`, and the protocol baseline compares a reference by its text. - **Path locks.** `locations.path_lock(*paths)` holds one lock per `path_lock_key` under `/tmp/leaf-path-locks-<uid>`, taken in sorted order. `package_write_lock` and file-binding saves both use it. - **Initialized pages.** `event_log.initialized(page_dir)` says whether a page's log is a file. The CLI's page argument, `page init`, reconnect advice, `owned_pages`, the package gate, command timing and the dev commands call it. - **Log parse.** `event_log._stored_events` is the one parse of the log (torn lines, seq by line number). `interaction_log.read_interactions` reads through `read_stored_events` instead of splitting the log itself, and each semantic row's `event` carries its `seq` in place of a separate `event_seq`. - **Claims directory.** `state.claims_home()` is the resolved `claims/` that `service.claim_path`, `session_claims`, `standing_claims` and the watch read. - **Lock loop.** `state.flocked_descriptor(path, flags)` is the one loop that locks, checks the path still names the file, retries, and unlocks before closing; `flocked` and `leases.page_locked` use it. - **Timestamps.** `interaction_log.interaction_time` and the Codex transcript check parse Leaf's date-time format with `registry.schema.aware_instant` instead of their own parsers; since #5272, importing `registry.schema` no longer loads jsonschema. - **Hook words.** `hooks/claude-code.ts` can import neither a Python constant nor the page's modules, so its copies stay, and its tests now hold them to their homes: the module test and the claude-code journey read `harness.NUDGE_WORDS` and `reply_phases.LEAF_WAKE`. The band words' comment no longer claims they are an All pages row's. Behavior changes: - A generated thread title over 80 characters, or broken over lines, was refused at admission and left its thread untitled. It is now fitted and written. - A save to a bound file used to lock under `state_home()/files`, keyed by the path as stored. It now locks in the machine-local directory, keyed by the resolved path, case-folded on a case-insensitive volume, so two Leafs with different state homes serialize their saves of one file. The eval sandbox allows the new lock directory's name. - A directory holding `events.jsonl` but no `layer.json` now counts as a page for the package gate, so its page-owned paths are protected. - A watch with no session used the unresolved claims directory, so on a state home under a symlink, such as one in `/tmp` on macOS, it never matched change notifications, which name resolved paths. It now does. - `flocked` flushes what a block wrote before releasing the lock, and a descriptor that lost its path is unlocked before it is closed. - `page interactions --since` and `--until` refuse a time without the `T` separator, as the format does. Tests: `test_thread_titles` adds a generated title that is fitted rather than refused, which failed before this change. `test_clerk`'s title test drives a long title through the clerk's answer instead of the private helper. `test_file_bindings` finds the save's lock under `PATH_LOCKS`, and the package-lock journey observes `locations.flocked`. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 4, 2026
… declarations (#5294) Part of the 2026-11-03 sweep for duplicate implementations (#5291 changes how review and Tend look for them). The element-id grammar was written out 87 times across the bundled, example, fixture and eval registries, the starter declaration `package init --widget` writes, test declarations and the docs. Composition now writes it, and the copies are gone. - **Grammars written at composition.** `registry.contract.stamp_grammars` writes the grammar of each name Leaf looks up into the attribute that holds it, beside the `enum` that `stamp_words` already writes. Each grammar keeps one home in `leaf/schema.py`: `ELEMENT_ID` for an element's `id`, `DATA_SOURCE_NAME` for an `x-data` input's source attribute, and `DATA_CONTRACT_NAME` for a verb's `contract` attribute. A verb that creates a child names it by its fold unit, and `contract.detail_schema` holds that field to the element-id grammar. Package authors declare each of these attributes as `{"type": "string"}`, and composition replaces any pattern a declaration gives; `packages.md`, "A widget", says so. The validators that compared each copy with the literal (`creates-id`, `creates-detail`, `data-source`, `verb-contract`) now check only that the attribute is declared a string. - **References name any element.** An `x-refers` attribute no longer takes the element-id grammar. `page check` resolves its value to the element it names, so the grammar only refused a reference to an authored element whose id no widget could carry, such as `<section id="Plan_Notes">`, which `$keys.x-refers` says an empty contract accepts. A keyed reference, such as a playground setting's `for`, names a member by the member's key attribute and keeps the grammar it declares. - **Validation skipped by its inputs.** A candidate vocabulary used to skip validation when it equalled the active revision's, which stamping would have defeated for every page declaring its own widget. `compose_page_registry` now skips validation for a composition of the same layer and page declarations a validated one was made from, which `RevisionReading.inputs` gives. The revision's memo holds its vocabulary together with the layer and declarations composition read, so a `package install` landing mid-read can't pair a new layer with declarations validated over the old one. In a scratch measurement, a candidate read of a page declaring one widget went from validated 5 times of 5 at 17.5 ms to none at 3.7 ms. The page protocol doesn't move: `build/browser/protocol.mjs`'s baseline still matches, an `add` still records the same detail schema in `meaning.state`, and the kernel registry and `dist/kernel/` are untouched. The composed vocabulary of every bundled package is unchanged apart from the `lf-options` `add` detail, which no longer spells the pattern. In examples and fixtures, six widgets declared `id` and two a reference attribute as a plain string; these now take the grammar, and every value their pages use matches it. The grammars stay in Python rather than the kernel registry's `$names`, since the browser checks none of these names; the playground's `NAME`, the grammar of its configuration keys, stays where it is. Tests: `test_composition_writes_the_grammar_of_each_name_leaf_looks_up`, `test_the_id_of_a_created_child_reads_as_an_element_id` and `test_a_reference_names_any_element_the_page_holds` are new, and `test_a_fresh_server_does_not_revalidate_the_active_revisions_inputs` now covers a page declaring its own widget; each fails against the behavior it replaces. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 4, 2026
…one owner each (#5295) Part of the 2026-11-03 sweep for duplicate implementations (#5291 changes how review and Tend look for them). The browser runtime answered several questions in more than one place, and the copies had drifted. Each question now has one owner that every caller asks, and `browser/AGENTS.md`'s "One answer for each question" names it. - **Whether the page can copy.** copy-control.js exports `canCopy`: the Clipboard API, or, on a top-level page, the selection command the control already fell back to. The control's click guard and the leaf's menu both ask it. The fallback's helper field is now read-only at 16px and selected with `setSelectionRange`, as clipboard.js and copy-text-to-clipboard do, since iOS Safari raises the keyboard for an editable field, zooms into one under 16px, and can select nothing on `select()`. - **Thread names.** `threadNames` in thread/model.js also indexes each thread's key (its root's attempt, else its id), and the linear scans in thread/destination.js, held-news.js, focus.js, actions.js, surfaces.js, queue-title.js and the floating panel's `threadByKey` ask `threadNamed`. A key can't name another thread: an attempt is 32 hex digits or one of the server's prefixed names, and a logged id is 8. `allThreads` selects `effective.thread.all`, so a renderer asking `threadNamed` doesn't repaint when only the tab's gestured threads change. - **A drawn thread's id.** Seven readers spelled `data-lf-thread` beside `drawnThreadId`; those reading one element's id call it, and those finding the page threads drawn with an id call the new `drawnThreadsWithId` beside it in thread/selectors.js. - **Tree order and hosts.** obligations/view.js and margin-projection.js ask `renderedOrder` instead of climbing to a host and calling `compareDocumentPosition`. The margin cluster's arrival counts a node that has left the page as coming from before, since `renderedOrder` between a connected and a detached node means nothing. `hostIn` moves to shadow-tree.js, and `focused(tree)` calls it. - **Words.** words.js gains `counted` and `capitalized`, and `labelWords` replaces the whitespace collapses in visual-parts.js, obligations/answer.js, anchor-resolution.js, keyboard/command-reference.js and composing/dictation.js. Every caller says the same words as before, at zero too. dom-children.js keeps its own collapse, since it is a runtime primitive and may import no owner. - **Layout parts.** passages.js exports `layoutParts` beside `layoutBox`, both reading one selector, and content-layout.js's title marking calls it instead of re-deriving `body > main`, the `--lf-layout-box` test and the parts selector. - **Small owners.** The floating panel reads `coarsePointer` from pointer.js, history.js races `aborted` from abort.js, composing/page-image.js uses `overlaps` from rect.js, passages.js exports `HEADING`, which heading-links.js, reading-place.js, addressable-names.js and thread/placement.js each wrote, and `GENERATED` for annotation-inventory.js, and box-motion.js and scroll-containers.js ask geometry.js's `userScrollport`. - **Style writes.** Setting an inline style property to the value and priority it holds, or removing one that is absent, produces no mutation record and leaves the style attribute as it was in Chromium 156, Firefox 157 and WebKit 27.2, measured with a Playwright page observing `setProperty`, `removeProperty` and assignment. The guards that read a property before setting it are gone from heading-links.js, block-controls.js, thread/reply-continuity.js, prepaint.js, keyboard/key-badge-placement.js, keyboard/chip-seats.js, annotation-overlay/surface-grip.js and the lf-tabs, lf-text-document, lf-trace and timeline widgets, and the keeps.js header states the measured rule. What changes for the user: - The leaf's menu asked only for the Clipboard API, so a page read over plain HTTP from another machine, as an iPhone reaches `leaf --host` on a tailnet name, hid Copy link although the control could copy there. The menu now offers it, and the press copies the link. The iOS simulator couldn't confirm a tap there: it serves a secure page, and its WebDriver taps deliver no click. - A secure page without a Clipboard API copies through the selection, where the control used to let Web Awesome fail. - A check that matched one spelling of a thread's name, such as the reply carry's check that its thread still stands, now finds the thread under any of its names, including across the log's answer to a thread this tab started. Tests: `test_copy_link_is_one_press_over_plain_http` replaces the test that asserted the menu hides Copy link without a Clipboard API, and fails on the previous runtime. `over_plain_http` in render_harness.py replaces the loopback route that the About and code-block plain-HTTP copy tests each set up. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 4, 2026
…nd panel selectors one home each (#5297) Part of the 2026-11-03 sweep for duplicate implementations (#5291 changes how review and Tend look for them). Developer tooling and test helpers had more than one copy each of the readiness wait, the served-state answer, a lint-rule run, the junit reader, an App Server turn, in-process `leaf` and the floating panel's selectors. Each now has one home in `leaf_dev` or `tests/`, and every caller uses it. - **Readiness.** `verify_site.await_presentation`, which the release pass, the local Worker pass and the website journey call after every page load, waits through `render_checks.wait_until_ready(through="presented")`, the readiness wait every other reader outside a page uses, keeping its own error with the browser errors it collected. `bench-latency`'s `revision` fact asks `lfReadiness(null, "presented")`, as `verify_site_browser.js` already did. `window.__leafStartup.milestones` had no other reader and is gone. - **Served state in runtime tests.** `tests/served.mjs` gains `servedState(changes)`, a whole `/api/state` answer for a page with an empty log, made by `model_folds.served_answer`, which runs the route's own `PageStateService.page_state` over a page source yielding the inputs `served_reading` folds. A test names only the fields its case changes, and naming a field the answer lacks throws. `queue-walk`, `state-feed`, `undo-waits` and `framework-application` built their own answers by hand, and those had drifted from the server's (a stale obligations object, `items`, an activity with `phase`, no `others`); all four now start from `servedState`. - **Lint-rule runs.** `tests/runtime/lint-rule.mjs` runs one of `eslint.config.mjs`'s own rules over acorn's tree, giving every node its `parent` and supplying `sourceCode.getText`, which only some of the five hand-rolled walkers did. The four `*-rule.test.mjs` files and the semantic store ownership test, which moves beside them from `build/browser/architecture.test.mjs`, use it. - **Junit reports.** `leaf_dev.suite.junit_cases` reads a report into each test's node id and its cases, merging a failed call's teardown case; `suite.read_junit` (flake, bugback) and `suite_profile.read_cases` read through it. - **App Server turns.** `widget_format_eval.infer` drives its turn through `codex_task.Task` instead of its own connect, handshake and request ids, and still fails after 300 s without a message. - **In-process `leaf`.** `page_fixtures.leaf_in_process` is the in-process `LeafRunner` for `prepare_page`, replacing the copies in `commands/corpus.py`, `tests/render_harness.py`, `tests/model/test_interact_product.py` and two in `dev/tests/model/test_interact_preview.py`. - **The floating panel's open view.** `panel_view(name)`, the selector of the panel's view that stands open and isn't on its way out, moves from `tests/render_harness.py` to `leaf_dev.browser` with `PANEL` and `PANEL_THREAD`. The 26 literal view selectors in `leaf_dev` (browser.py's Threads helpers, states.py, record_demo.py, verify_site.py, bench_latency.py, and thread_journey.py's `THREAD_VIEW` copy) and the panel's host literals now go through them. - **Eval models.** `evals/ui-review-detection/provider.mjs` no longer restates `eval_ui_review.MODELS` as an allowlist, since only that command writes the provider's configuration. Behavior changes: - The site verifier and the website journey waited for the `data-lf-presented` stamp, which is set once, stays set while presentation reopens, and is also set when a page presents its offline fallback without applying a server answer. They now also wait for an applied answer and a settled presentation, so a reload whose state read never answers fails at the presentation wait, naming the `log` stage, instead of later with "stands on revision 1". A page that never presents is described by its readiness stage ("the runtime never started"). In the journey's post-turn reload, `followedRevisionMs` counts from the first applied answer. - `bench-latency`'s `revision` check read the stamp a page set at its first load, so after that load it passed on every frame; it now waits for the revision. - About 20 of the `leaf_dev` panel selectors lacked `:not([data-lf-leaving])`, so a driver waiting for a thread or the queue could match a view on its way out. They now wait for the view that stands, as the tests' `panel_view` always did. - In `suite-profile`, a collection error's file is its module's path instead of `.py`. Tests: in `dev/tests/process/test_website_server.py` the fake deployed page answers the readiness wait and can stall a reload at a stage; the offline-reload case expects the failure at presentation, naming the `log` stage. `dev/tests/browser/test_website_server.py`'s broken-page case expects the stage words. `framework-application`'s "non-event activity" case changes the served activity's `kind` instead of replacing it with an invented shape. No other test changes what it asserts. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 4, 2026
…nt each surface in the ground it names (#5296) Part of the 2026-11-03 sweep for duplicate implementations (#5291 changes how review and Tend look for them). The popover face, opening a popover from its control, each surface's ground, a mark's motion time and two restated facts each get one home. - **Popover face.** Seven popovers each wrote the same raised face (a 1px `--border-2` edge, the theme's radius, ink, the `--raise-2` shadow and a ground), three on `--paper` and four on `--card`. It now lives once in controls.css as `.lf-popover`, at no specificity, and reaches declared shadow trees through shadow.css; `:where(.lf-popover:popover-open)` names `--card` as the popover's `--lf-ground`. Each popover keeps only its place, size and padding. The `@supports (position-area: bottom)` guards and their centred fallbacks, and four `::backdrop { background: transparent }` rules that restated the platform, are gone. - **Opening a popover from its control.** The six triggers (shot options, trace image scale, visual review's capture details and threads, the file editor's conflict choices, the playground's instruction) open with `popovertarget`, where three went through a toggle helper and three skipped its focus step. The layer stack, which hears every declarative opening through `beforetoggle`, puts the user on a declarative source (one carrying `popovertarget` or `commandfor`) before the platform records where to return, so Escape hands them back to the control; a scripted `showPopover({source})` leaves focus to its caller. A control that opens a popover declares `aria-expanded="false"`, and the layer stack is that attribute's one writer, for declarative and scripted openings alike; reactions.js and composing/selection.js no longer write it. module-input.md and the layer stack's header state the rule. - **Grounds.** lf-trace, lf-dial's depth row, visual review's evidence pane, lf-diff's thread outlet and lf-file-editor's frame and comparison now name the ground they stand on and paint `var(--lf-ground)`, as package-themes.md asks of a solid surface, instead of painting `--paper` or `--card` directly. - **Mark motion.** tokens.css registers `--lf-motion-mark` at 160ms, which the tab strip's selection line and the timeline's playhead read in place of two literals. - **Restated facts.** `viewDocument(node)` in storage.js says which document a widget acts on, replacing the selectors in toc-view.js and lf-dial.js. text-alignment.js exports `MAX_EDIT_LENGTH`, which lf-text-document.js had copied as `1_000`. What changes for the user: - In the dark scheme, the shot options, trace image scale and visual review capture details painted the page's own ground, rgb(25, 24, 21), and now paint `--card`, rgb(32, 30, 26), so they stand apart from the page. In the light scheme the two grounds differ by a shade (#faf9f5 against #fffefb). - In Safari and Firefox on macOS, a pressed button takes no focus, so Escape from the playground's instruction left focus on the body. It now returns to the control. - In a framed tab, lf-dial's depth row stood as a paper pill on the card; it now paints the tab's ground. `leaf-dev stills` shows nothing else changing on screen (gloss-open, playground-instruction, reaction-palette, reaction-pressed, detail, file-editor, playwright-trace-gallery, diff-file-reply match their base). `stills` gains a `trace-image-scale` state, since no state reached that popover. Tests: `test_a_popover_its_control_opens_hands_the_user_back_to_the_control` presses a `popovertarget` control as those browsers do and checks focus and `aria-expanded` through Escape, and opens one from a script while the user is elsewhere and checks focus stays put; it fails without the layer stack's focus step. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 4, 2026
…sting and suite checkout one home each (#5328) The last four developer-tool rows from the 2026-11-03 sweep for duplicate implementations (#5291, #5297). Each capability below was written more than once in `dev/leaf_dev/`; each now has one home that every caller uses. - **An interactive Claude Code session.** `leaf-dev claude-code-session` repeated the `claude-code` journey's setup: the throwaway home whose `.claude.json` says onboarding is done and trusts the cwd, the environment over it, the `claude` command line and the isolation's layout. `journey_claude_code.claude_code_environment` writes the home and returns the environment, `ClaudeCode` builds the command line from the isolation, a model and optional settings, and `Isolation.under` lays out the state home, cwd and page. Neither command behaves differently. - **A live copy of a saved page.** The arrangement eval's judge and captures and the authoring eval's interaction probe each copied a saved page into a temporary directory and served it plain or through the arm's Leaf, deciding which in their own words. `arms.live_copies` does it once and yields a `ServedPage` carrying its arm and state home, so `restored_page` reads state through `arms.read_page_state`; `arrangement_eval.is_leaf` is the one test for whether a page is Leaf or plain HTML. - **Posting a user move.** Every caller of `arms.PageClient.post` read the served state for the active revision, posted, then searched the answer for its event by retry key, and `post` read the state again for the layer. `post` now does it from one read: it sends a revision only on the kinds whose record has one in the kernel registry's `$events.kinds` (comment, reply, seen, action, error), takes the revision a move names or else the active one, and returns the event the server's answer names, which is exact for retries and for the page's own `error`. The usability eval makes each round on one reading, withdraws a previous move by the event `post` returned, and loses `arms.inputs_received` and its retry-key bookkeeping. - **A checkout the suite can run in.** `flake` took a snapshot of the working tree inline, and `bugback` ran a detached `git worktree` at HEAD instead. `suite.snapshot` and `suite.checkout` (a clone with each `node_modules` linked in) are now shared by both. bugback still builds its reverted tree itself rather than taking `arms.choose_arms`' base, since that base is the whole tree at the merge base, tests included, while the reverted run needs the working tree's tests over the merge base's code; its header says so. Behavior changes: - `leaf-dev bugback` runs the working tree as it stands, uncommitted and untracked files included, where it asked for a commit first, and it can now run tests that read `node_modules`, such as the Codex App Server tests. It refuses an empty change in seconds, before snapshotting, and prints its verdicts before removing its checkout. - Snapshot clones are made with `maintenance.auto=false` and `core.fsmonitor=false`. Under git 2.56 the snapshot's commit started background maintenance that wrote a commit graph into the clone during its removal, which failed with "Directory not empty" in four of four tries, and in none of four with these settings. - Each posted move makes one state read rather than two. Every move of a usability round, an error's text included, describes and names one reading's revision. `undoes: previous` works when the previous move has its own retry key or is an error, where the log search raised `StopIteration`. Posting an undeclared kind gets the server's `unknown-kind` refusal. - The authoring eval's interaction probe serves its plain-HTML conditions plain, where only `adaptive` was; no case probes an `html` page today. A served copy keeps its saved directory's name rather than always `page`. Tests: `dev/tests/process/test_flake.py`; the Codex App Server test `test_app_server_delivery_id_reads_only_canonical_delivery_inputs` inside a bugback checkout; bugback end to end, catching an uncommitted `src/leaf` edit with an untracked test; `post` against a served page for every kind, retries and an undeclared kind; and the journey and website `post` tests. The `claude-code` journey wasn't run, since it spends a login. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 4, 2026
Two browser-UI rows from the 2026-11-03 sweep for duplicate implementations (#5291, #5296). Each capability below was written more than once across the runtime and packages; each now has one home that every widget uses. - **The time axis.** lf-timeline and lf-trace each had their own tick, major-tick, flipped-last-label and gridline CSS, restated constants (edge, label chrome, a label gap of 8 in one and 6 in the other, tick spacing), a last-label flip at 36px in one and 44px in the other, three seconds formatters, and four names for an item's place on the axis. `time-axis.js` now exports the geometry and gives each tick its `flip`; one rule in `controls.css` places ticks, gridlines, marks, labels and playheads by `--lf-axis-at`, a widget's own marks joining with `.lf-on-axis`; and one `seconds()` formats times. Gridlines run from the ruler's foot to the drawing's foot, as the playheads already did, instead of a fixed 2000px line the chart clipped. `module-reading.md`, "Time axes", says how a package draws one. lf-trace's zoom now scrolls to its new window before drawing the ruler, once, where a zoom or width change drew it at the old position and again at the new one in the same task. - **The inset focus ring.** A box whose content covers its own outline drew its ring on an `::after` in about six places (the pane body, tab sets, text listings, the diff, the trace image, page threads), each writing the same block. `surfaces.css` now has two rules: `.lf-ring-frame` rings its focused child, and `.lf-ring-overlay` rings its own focus; each frame sets only its own z-index and position. lf-diff no longer creates a `.lf-diff-frame` element. lf-file-editor keeps its own ring, because CodeMirror's editable content sits two levels below the nearest box that doesn't scroll; the floating panel keeps its own, because it rings only views a key opened and never a thread's view. `package-themes.md` says either box must be positioned. What changes for the user: - Trace and timeline gridlines are one dotted `--border-2` line: contrast 1.47:1 in light and 1.71:1 in dark, where the trace's dashed line was 1.31 and 1.41 and the timeline's dotted line 1.22 and 1.37. - Trace labels get the timeline's 8px gap and both flip their last tick label within 44px of the end. - In Firefox, a keyboard landing on a diff's source sits 1px lower. Every other ring is pixel-identical in `leaf-dev stills`, light and dark. Tests: a 60-lane timeline's gridlines reach its foot; the ring cases in `test_rings.py` and the thread, card, pane, obligation and text-document rings; the timeline and trace tests; and `pnpm run test:runtime` and `pnpm run check:browser`. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 4, 2026
… the screenshot (#5393) The last consolidatable row from the 2026-11-03 sweep for duplicate implementations (#5291): choosing one of a few views had two mechanisms. lf-shot's views (Slider, Pair, Pixels) and lf-dial's depths (Skim, Read, Everything) were word toggles with `aria-pressed`. lf-shot's took no arrow keys, and lf-dial stepped through its depths with arrow commands of its own (`dial.less`, `dial.more`). lf-trace's recording scope and lf-trace-compare's recordings were Web Awesome's `wa-radio-group`. All four are now a `wa-radio-group` of `appearance="button"` radios, and lf-dial's arrow commands and pressed state are deleted. Each widget offers its radios in the word role (`actionClass`), so every group looks as the toggles did: plain words, with only the chosen one framed. `webawesome.css` holds the group's row and the radio's type for all of them. This follows the 3 Nov choice against framed or joined buttons for choices. A radio group needs Web Awesome before it can take a press, so lf-shot, lf-dial and lf-trace import a new entry, `webawesome-views`, with their own modules. It holds comparison, radio group and radio, and shares its chunks with the other entries, so a page defines each control once. lf-diff imports `webawesome-chrome`, which holds the search field it draws and costs nothing extra on a Leaf page, where the chrome has already loaded it. No bundled widget reads `webawesome.esm.js` now; it stays for a package's own module. lf-shot's late load, its refit, the wait for `wa-comparison`, and the clipped frame that stood in for the divider are deleted. Pixels no longer waits for the difference reading, which arrives after the page shows, because it needs only the two images. A press goes to the front of the comparison queue, so its mask waits only for a comparison already running. A capture replaced while Pixels waits restarts its mask. What changes for the user: - lf-trace's chooser is quiet words with the chosen one framed, where both options were framed buttons. The screenshot's view row and the dial are pixel-identical to `main` in `leaf-dev stills`, light and dark. - A press on Pair or Pixels the moment the page shows changes the view. On `main`, Pixels was disabled until the difference reading arrived. The view is a grey image until its mask lands, as on a settled press: 56–88 ms on an ordinary pair and 259–405 ms on a 4K one. - Tab reaches each group once, at its chosen view, and the arrow keys choose the next. The screenshot's views gain arrow keys. - Go-to's hints reach the screenshot's views, the dial's depths and lf-trace's choosers. - Assistive technology hears a radio group with a checked radio in place of pressed buttons. Startup against `main` at the time of each reading, before the page first shows the server's state (`leaf-dev probe --base`): | Page | JS requests | JS bytes | | --- | --- | --- | | `release-notes`, a shot | 292 against 289 | +24,452 | | `detail`, a dial | 288 against 285 | +21,889 | | `review-a-fix`, traces | 292 against 290 | −84,325 | | `pr-walkthrough`, a diff | 305 against 305 | −107,087 | | no widgets | 270 against 269 | +112 | A shot pays because a press must work once the page shows: loading Web Awesome afterwards left the views inert for 0.2–0.7 s, and the maintainer chose the first press over the bytes. A dial pays only because its depths are now a radio group, the price of one mechanism, since `main`'s toggles already took the first press. Every page's extra request comes from esbuild splitting the chrome's code into two chunks, because a third entry shares only part of it. As with any required module, a `webawesome-views` that fails to load stops the page from starting (`widget-loader.js`), where `main`'s late load only lost the divider. Tests: `test_a_shot_takes_a_view_pressed_as_the_page_shows_and_keeps_its_divider` presses Pixels the moment the page shows, reads the view the next frame draws, and holds that the mask arrives. It fails against the late load and against Pixels waiting for the reading. A new test presses Pixels on the last of four shots and counts the other shots' readings when its mask arrives, and another replaces a capture while Pixels waits. `test_shot_controls_have_disjoint_targets_and_labels_stay_passive` also holds the row at 360px, where the shared group's wrap would put Pixels' touch target over the views above it. `leaf-dev stills` gains `screenshot-views-keyboard` and `dial-keyboard`. The `test` job's two failures, `test_each_sampled_focus_ring_is_shown_whole_in_its_surface` and `test_an_authenticated_navigation_journey_becomes_credential_free_review_evidence`, fail at the same lines on `main`. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 15, 2026
….md (#6003) Tend's reviews are told to apply `/developing-leaf`'s "Weigh what a change adds", its nightly survey "Regular maintenance", and its weekly sweep "What it repeats", but Tend's sessions almost never load that skill: 3 of 43 reviews between 11-04 and 11-14, though running-tend has said "Load `/developing-leaf`" since #5291. All 43 had the root `AGENTS.md` in context. This moves both sections verbatim into `AGENTS.md`, apart from the two pointers that named that file, and points running-tend, `dev/AGENTS.md` and fan-out-backlog at the new home. Why a load step can't do it: replays of four of those reviews, resumed just before their first skill load, show the agent usually loads running-tend in the same turn as the review's preflight call (32 of 43 in production), so it reads the overlay after it has already moved on to the review skill's steps. A "load first" section at the top of running-tend got the skill loaded in 8 of 8 runs where running-tend loaded alone, and 0 of 8 where it was batched with that call. #5291's 16-of-16 replays had a prompt that itself told the reviewer to load what the overlay points to. What to weigh: `AGENTS.md` grows by 3,700 characters for every session in the repository; maintainer sessions read the same text as before, since they load `/developing-leaf` anyway. running-tend's pointer to "Prove and hand off a visible change" still relies on a load. Asked for by Max. Reviewed by Codex; its one finding, a stale citation in fan-out-backlog, is fixed here. Pre-commit passes; nothing here is code. > _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.
A sweep on 2026-11-03 found 39 capabilities implemented more than once in Leaf. Tend's review had approved all 10 of the introducing pull requests checked, and 15 nightly surveys that carried the instruction to look for "several implementations of one capability" reported none. This changes the instructions behind both, and adds a weekly sweep for what review still misses.
/developing-leaf. running-tend's Review threshold named that skill's "Weigh what a change adds" without saying to load it, and none of 11 production reviews on 2026-11-03 did. The section now opens "Load/developing-leaf"; 16 of 16 replayed reviews then loaded it.Replaying four pull requests that each introduced a copy (#3832, #5196, #2345, #3137), reviewers caught the copy 2 of 9 times with the old text, 3 of 8 when told to load the skill, and 5 of 8 with "What it repeats", whose wording was revised after the replay. That difference is within noise at this size, and no arm caught a one-line copy inside a new helper; the weekly sweep is there for those.
This changes agent instructions, so it lands with the control-plane owner's approval (running-tend, "Landing").