Repository navigation
Ban rounding a box edged on one side, in Leaf's own sheets and pages - #3138
Merged
Merged
Conversation
The visual grammar already said to avoid rounded one-sided borders, as one clause of a list in assets/AGENTS.md, and nothing held it: the wt-merge example's current step and how-it-works's cascade figure each drew a thick side stripe on a rounded card, and a views list on another branch was written with one. Those pages teach authors by example. Each now marks its state with a whole contour: the merge step's current step is outlined in the accent, and each cascade tier in its writer's colour. A model test reads every rule in Leaf's sheets and its pages' <style> and fails on one that pairs a stripe (a side's border of 2px or more, or a one-axis inset shadow) with a radius; it fails on each of the old rules when put back. It reads per rule, so a radius another rule adds is not caught. Authoring agents are left alone: a survey of 3,328 page directories under ~/.tmp, copies of Leaf's own examples excluded, found one page with the pattern in a single rule, so the shipped instructions gain no line. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Oct 18, 2026
Review on #3138: a page's companion sheet (docs/package/theme.css, a .page directory's theme.css) could draw the stripe unseen. The corpus's merged copy stays out, since it repeats the examples' own sheets. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 18, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 22, 2026
This week's duplicate sweep of `dev/`, `build/`, `tests/` and `worker/` (week 47) moves six duplicated helpers onto one home each and moves every caller. Behavior stays the same. The touched model tests, the dev js_facts tests and the Worker's routing, storage and index tests pass. A script compared the old and new outputs of the consolidated `leaf_dev` functions and the seeded-log reads across the corpus, and they match. | Question | Home | Copies removed (introducing PR) | |---|---|---| | Which stylesheets do the core and the bundled packages ship, leaving out vendored files? | new `interact_support.shipped_sheets` | `sheets()` in `test_interface_fonts.py` (#4804) and `test_theme_tokens.py` (#6025). Five inline loops in `test_interact_layer.py` (#3138, #3886) | | Run `tests/js_facts.mjs` | `interact_support.js_facts` (#2666) | its own subprocess call in `dev/tests/test_js_facts.py` (#5118) | | Lowercase hex of bytes in the Worker | `routing.hex`, which is `newSessionId` (#313) renamed, plus a `sha256Hex` in `storage.ts` | the publication-identity and chunk-digest copies in `storage.ts` (#2652) | | Is this pid alive? | `leaf.machine.pid_alive` | `_alive` in `tests/process/test_codex_tool.py` (#3331). `running()` in `test_interact_layer.py` (#1774) | | Read an example's seeded log | `read_event_lines(seed_log(source))` (#4484) | inline parsers in `test_render_pages.py`, `test_interact_product.py` (#924) and `test_render_gate.py` (#509). The last one split lines with `splitlines()`, which also breaks at U+2028 | | Paths of the bundled registries and packages; which registry keys name elements | `leaf.schema.ASSETS` / `BUNDLED_PACKAGES` / `DEFAULT_PACKAGE`, `leaf.registry.contract.is_element_name`, `docs.registries()` | `docs.py`'s own `ASSETS`/`PACKAGES` (#3593) and its `startswith("lf-")` checks (#2660). `logs usage`'s hand-written regex and registry list (#5970). `ROOT / "packages" / "default"` in `stills.py` (#3927) and `test_product_page.py` (#3593) | `is_element_name` and the two checks it replaces give the same answer for every key in the bundled registries today. A selector key such as `lf-options.selected` would have passed the `lf-` prefix test. <details><summary>Sets found and left alone</summary> - **Sets an open PR is changing.** Nothing in this diff overlaps another open PR's hunks. #6732 moves tests out of `test_render_gate.py`, `test_render_pages.py` and `test_interact_layer.py`, but none of the tests changed here. - **Changes to browser tests with nothing run to check them.** The WCAG contrast computation exists as about 11 copies across browser, journey and model tests. Other copies: about 9 `EDITOR_ROOTS` shadow-root keepers, the `/api/interaction` batch predicates, CDP `touch()` closures, one-line patch templates, reply-holding route handlers, and the `data-lf-entry` runtime-module import snippet in `dev/leaf_dev/states.py` and in tests. Each would mean editing browser tests that this sweep can't run on a shared host. They suit a sweep that can run those tests. - **Vendor bundling.** `build/browser/build.mjs` builds signals-core and Lit with esbuild calls that repeat `build/vendor.mjs`'s `bundle()`. Merging them changes build options and needs a full `check:browser` byte comparison, so it was left for a change that runs that. - **Copies that are near but not the same.** `_build.py`'s `check_links` repeats `leaf_website.released_path`, but it also needs the matched page's root and kind. The list of API-key variables an eval drops is repeated across Python and the Promptfoo configs, as subsets and supersets of one another. The Codex token-expiry check has different thresholds, 1 h and 60 s. - **Too small to be worth it.** Picking a free loopback port (`eval_user.py`, `interact_support.available_loopback_port`). The XDG state root in `leaf_dev.state_home` and `leaf.state.state_home`. The `settled` helper in two `tests/runtime` files. </details> Co-authored-by: leaf-agent <[email protected]>
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.
The visual grammar in
skills/leaf/assets/AGENTS.mdalready said to avoid rounded one-sided borders, but nothing enforced it. Two shipped pages drew a thick side stripe on a rounded card: the current step in thewt-mergeexample, and the cascade figure and "Which rule wins" bands inhow-it-works. A views list on another branch was also written with one. Shipped pages teach authors by example.test_no_rule_rounds_a_box_edged_on_one_side, reads every rule in Leaf's stylesheets, in its pages'<style>, and in the stylesheets shipped alongside pages. The corpus's merged copy is skipped because it only repeats the examples' own stylesheets. It fails on any rule that pairs a stripe with a non-zero radius. A stripe is a side border of 2px or more, or an inset shadow offset along one axis only. Putting back the oldwt-mergerule, or adding a stripe and radius to the shared tab-face rule intabs.css, makes the test fail. It reads one rule at a time, so a radius set by a different rule is not caught.The shipped instructions for authoring agents are unchanged. A survey of 3,328 page directories under
~/.tmp, excluding copies of Leaf's own examples, found one page with the pattern inside a single rule.