Skip to content

Ban rounding a box edged on one side, in Leaf's own sheets and pages - #3138

Merged
max-sixty merged 2 commits into
mainfrom
ban-rounded-stripes
Oct 18, 2026
Merged

max-sixty merged 2 commits into
mainfrom
ban-rounded-stripes

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

The visual grammar in skills/leaf/assets/AGENTS.md already 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 the wt-merge example, and the cascade figure and "Which rule wins" bands in how-it-works. A views list on another branch was also written with one. Shipped pages teach authors by example.

  • Pages: each page now marks its state with a full outline instead. The current merge step is outlined in the accent colour, and each cascade tier in the colour of whoever writes it.
  • Test: a model test, 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 old wt-merge rule, or adding a stripe and radius to the shared tab-face rule in tabs.css, makes the test fail. It reads one rule at a time, so a radius set by a different rule is not caught.
  • AGENTS.md: the rule is restated as "never", and it names the test.

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.

This was written by Claude Code on behalf of max-sixty

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]>
Comment thread tests/model/test_interact_layer.py Resolved
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]>
@max-sixty
max-sixty merged commit 03df7a5 into main Oct 18, 2026
4 checks passed
@max-sixty
max-sixty deleted the ban-rounded-stripes branch October 18, 2026 07:08
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants