Repository navigation
Step the theme's neutrals from three colours, prefix every token, and rank a page's reset below Leaf's layers - #6025
Merged
Merged
Conversation
Leaf's theme tokens were bare names on the root: --paper, --ink, --accent, --muted, --card, --border-2, --r, --sans. A page that brings its own CSS framework declares the same names for other things. Under shadcn's tokens --muted and --accent are pale surface colours and --card and --sidebar are colours too, so the panel's and thread cards' quiet words and symbols took the page's surface colour and vanished into it. Every property a sheet under browser/ or packages/ declares now starts with --lf-, as the runtime's own already did, and a dependency's properties keep its prefix. --border-2 becomes --lf-border, since no --border-1 exists. The rename is mechanical across sheets, modules, examples, docs, references, tests and evals; plain HTML fixtures and captured pages keep their own names. The syntax bundle is rebuilt for its six colour variables. A text document's token highlights keep their names (lf-token-syn-comment), now read from the variable after its prefix. Behavior changed: a page or package that sets or reads a bare token name writes the prefixed one.
The theme stated each neutral as its own pair of hex colours: card, field, chip, rule, border, muted, the second ink and inline code's ground. A page with a palette of its own set --lf-paper, --lf-ink and --lf-accent and kept the default theme's cream cards and warm rules, so recolouring a page whole took about ten colours, and a test theme states 38 declarations. Each neutral is now an OKLab mix of the paper toward the ink, so the three colours recolour the panel, thread cards, widgets and controls with the page. The kernel's paper and ink are the browser's Canvas and CanvasText, which a page with no theme keeps, and the reading theme sets its warm pair. On that pair each mix lands within 1.4 of the colour it replaces (OKLab distance x100), and no text loses contrast. --lf-r-s and --lf-r-l are half and twice --lf-r, so one length squares or rounds every corner. --lf-ground on the root is the page's paper, so a page that paints its own ground sets --lf-paper and nothing else. Behavior changed: a page with no theme draws Leaf's panel, thread cards and widgets in the browser's canvas and text colours rather than the reading theme's cream. A theme that restated only --lf-r now also changes the small and large corners.
A page's own cascade layers are named after Leaf's sheet, so they outrank every tier of Leaf's. A framework's reset in a layer, as Tailwind 4 writes its preflight, zeroed the borders, padding and faces of Leaf's widgets and controls, and reached the panel and thread cards too, since their guard rolls back to the layered cascade. The document's layer order now names `reset` and `base` ahead of Leaf's tiers. A reset in either still zeroes the page's own elements, and Leaf's faces outrank it on what Leaf draws. A page with an unlayered reset wraps it in `@layer reset`. Every other page layer still outranks Leaf's tiers. The reading face states a list's markers as the browser's, since a reset below it would otherwise clear the bullets in a thread's message. Behavior changed: a page's rules in a layer named `reset` or `base` no longer outrank Leaf's layered rules.
… them Leaf's sheets declare 508 custom properties, and nothing said which a page, theme or package may rely on: the references named 74, the examples read others (--lf-chip-r, --lf-mark-ink), and a private property an author copied could change in any update. package-themes.md, "Theme tokens", now lists them by role: the colours a theme sets, the neutrals Leaf steps from the paper and ink, and the type, spacing, corner, lift, control and page geometry tokens. page-authoring.md, page-layout.md and packages.md point to it and say how a page hands Leaf a palette of its own or a framework's tokens, and how its reset keeps off Leaf's controls. tests/model/test_theme_tokens.py holds three things: every property a sheet declares starts with --lf- or a dependency's prefix; the examples, registry examples and package instructions read only properties a reference names; and every property a reference names exists. The root paints the page's ground from --lf-paper in the kernel, so a page with no theme sets the token and writes no rule. Two example films draw their fourth colour in the chart palette's violet rather than the comment marks' ink, and the playground's --playground-NAME properties keep their names, which the first commit had prefixed in an instruction and a test. Two browser tests cover the behavior the earlier commits changed: a page's paper and ink recolour the neutrals Leaf draws, with a theme or without, and a reset in `@layer reset` leaves Leaf's controls their faces.
… warmth A plain mix of the reading theme's paper and ink came out greyer than the neutral it replaced: the border's blue channel moved 10 levels, and the chips and callout grounds lost their warmth over whole areas. Each step now also scales the mix's two OKLab colour axes, by a factor of its own and by no more than 0.014 of chroma. On the reading theme's paper and ink every neutral lands within two levels of one channel of the colour it was tuned to, a colourful palette's neutrals take a faint tint of it, and a grey palette's stay grey. The card is the paper a little lighter. The axes are scaled rather than `oklch()`'s chroma: Chromium 158 reads a near-grey colour's hue as none in a relative `oklch()`, which drew these neutrals pink there. notes/browser-support.md records the gap.
page-palette-sets-the-theme-tokens asks for a page in a user's house colours and passes when the three theme colours are set on the root. page-reset-stays-off-leaf-controls hands over a site's stylesheet with a reset and passes when the reset stands in `@layer reset` or `base` and the root hands Leaf the site's ground, text and brand colours.
…e paper, and leave the root's paint to the theme
Review and a fresh look at the captures found three faults in the branch.
A page's `base` layer ranked under Leaf's tiers with `reset`. A framework's
base layer holds its author's element rules beside its reset, so on a themed
page an `h1` sized in `@layer base` took the reading look's size, and a
framework's `html { background }` there lost to the kernel's paint of the
root, which drew the page in the browser's canvas colour instead of its own.
Only `reset` ranks low now, and the reading theme paints the root again, so
a page with no theme paints its own.
The status grounds were stated, so a callout stayed cream on a page whose
paper is cool. Each is now seven parts the paper and three a colour of the
status's hue, which gives the reading theme the tints it had, each within
one level of a channel, and follows any other paper. The grounds of added,
removed and highlighted lines are stepped the same way.
Two tests were weak. The focus ring's matcher in render_cases_layout.py
still named `--focus-ring`, so it matched no outline after the rename. The
check that every token a reference names exists counted a module's
`var(--lf-paper)` as a declaration; it now counts a sheet's declarations and
the names a module holds as strings of their own, and fails with the paper's
declaration removed. The reset test also holds that an author's own layer
outranks the theme.
leaf-agent
reviewed
Nov 15, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
After 7c16ea2, the description no longer matches the code in three places. Merging squashes the description into main's commit message, so these errors would end up in the history:
- What changes says the layer order names "
resetandbase" ahead of Leaf's tiers, and What it costs says rules in "a layer namedresetorbase" no longer outrank Leaf's. Onlyresetranks low now (PAGE_RESET_LAYERinsrc/leaf/layer.py). - Where to look names
PAGE_RESET_LAYERS. The constant is nowPAGE_RESET_LAYER. - What users see says a page with Tailwind 4's reset now has no unreadable words or faceless controls. Tailwind 4 keeps preflight in
base, so after this commit that holds only once the page moves preflight into@layer reset.page-layout.mdnow tells authors to do that. Either rerun the Tailwind case against the head or state that condition in the claim.
…me the reset layer on the site The pull request's test job failed five tests. Two fail the same way on main: a margin entry's tone, and the sampled focus rings' journey. Three were this branch's. The series palette's floors read the paper from tokens.css, where it is now the browser's canvas; the test reads it from the reading look, which states it. The drawing preview's test took a stroke's channels from the digits of its computed colour, and a stepped token computes to `oklab()`; it now paints the colour and reads the pixel, as the render checks do. The site's account of the cascade said every `@layer` block of a page outranks Leaf's layers; it now names `reset` as the one that ranks below.
…st's claim
The third token test claimed each property a reference names is declared,
and counted a module's `getPropertyValue("--lf-sans")` and names in comments
as declarations, so it passed with the declaration removed. Whether a
property a sheet reads is set is already
`test_every_token_a_sheet_reads_is_set_somewhere`'s to hold. This test now
claims what it can: each name a reference teaches is one Leaf's sheets or
modules use outside their comments, an author's input such as `--lf-bound`
included, so a renamed or removed token the prose still names fails it.
The tint under a hovered accent control, and under a reaction the user added, mixed 12% of the accent into the card in sRGB. The reading theme's navy and its cream card cancel there: the tint measured chroma 0.004, a grey, which reads as a disabled control. It is now the card with a tenth of the accent in it in OKLab, the accent going in at several times its chroma, capped at the reading accent's, so the tint lands at chroma 0.02 in the accent's hue and still follows the card a page sets. A grey accent still gives a grey tint. Default pages change: the tint goes from rgb(230 234 235) to rgb(229 241 253) in the light scheme, and from rgb(45 48 49) to rgb(31 44 57) in the dark, the same in Chromium and Firefox.
A page's theme replaced `reading`, so a theme of five declarations lost the callout's tint, the tags and the label, and had to restate each. `reading` now composes first and the theme after it, so a theme states only what it changes. A look that wants none of the reading look is a content package on a page that takes no theme. `package check` already composed a package over `reading`, so a theme is now checked on the layer its pages get. `themes.with_theme` is the one statement of the composing order: `layer.selected_layer` and `selected_vocabulary` take the ordered packages, and `theme_package` goes.
# Conflicts: # tests/browser/controls/test_focus.py # tests/browser/startup/test_activity.py # tests/browser/test_render_pages.py
max-sixty
marked this pull request as ready for review
November 15, 2026 19:02
leaf-agent
approved these changes
Nov 15, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 15, 2026
…d its test Both conflicts keep this branch's side with the renamed tokens: the palette reads var(--lf-ok), var(--lf-danger) and var(--lf-pre-bg), and widget-shadow.css's marks read the palette's --lf-code-add-mark and --lf-code-del-mark. The test's dark code tokens move to --lf-pre-bg, --lf-code-ink and --lf-syn-*. Under the old names they reached no canvas, so the dark-code check passed even with lightness stated per scheme; the test now first requires the canvas to turn dark. With the first push's palette, renamed, it fails with "a added row +0.708 in lightness from dark code", and it passes with this one.
This was referenced Nov 15, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 15, 2026
…heme's hues (#6050) Under the reading theme lf-diff filled an added row `#e0eae3` and a removed row `#f3e0de`: 16% of `--lf-ok` and of `--lf-danger` mixed into `--lf-pre-bg` in sRGB. Leaf's status colours are muted, so that mix stays near grey (Oklab chroma 0.015 and 0.021), and the two rows were 0.032 apart in Oklab where GitHub's light rows are 0.057 apart. A larger share of the token only darkens the rows. The diff package's palette (`packages/diff/styles/palette.css`) now mixes each status token into `--lf-pre-bg`, stripped of chroma and hue, in oklch (15% for a row, 30% for a word mark), and triples the mix's chroma up to a cap (0.034 for a row, 0.065 for a mark). So the row fills and word marks follow `--lf-pre-bg`'s lightness and the tokens' hue, whatever a theme or page sets for each, a dark code canvas on a light page included. The marks move from `widget-shadow.css` into the palette in the same form, because the old 34% sRGB mix was less colourful than the row it now sits on. Stripping the canvas's hue keeps the mix from turning toward a tinted canvas; mixing in oklab instead leaves the hue powerless at that chroma in Chromium, which reads it as 0. A grey token mixes to a grey row. Painted colours, sampled from `leaf-dev stills --state diff-separator` crops of the pr-walkthrough's key hunk in Chromium: | Scheme | Rows apart | Added mark to its row | Removed mark to its row | | ------ | ---------- | --------------------- | ----------------------- | | Light, before | 0.033 | 0.083 | 0.090 | | Light, after | 0.059 | 0.076 | 0.076 | | Dark, before | 0.031 | 0.101 | 0.096 | | Dark, after | 0.058 | 0.085 | 0.081 | A theme may set the code inputs apart from the scheme (`package-themes.md`, "Theme colors"). With dark code tokens on `:root` under the light scheme, the rows stand 0.047 lighter than the dark canvas and code reads 8.0–12.3:1 on them (main: 7.9–12.3:1). Marks there stand 0.056 from their rows. The line numbers and +/− signs on changed rows, and the change counts, still take `--lf-ok-ink` / `--lf-danger-ink`, which follow the page's scheme rather than the code canvas, so on that page they read 2.15–2.34:1, as on main (2.14–2.30:1); this PR leaves them. A 35% mark would stand 0.070 from its row there, but would take the default light scheme's code on a mark to 4.4:1, the finding main has; at 30% it is 4.7:1. Code on the marks reads better than on main. With every file of the pr-walkthrough open, the render gate's syntax probe (`unreadSyntax`) found a light-scheme comment token at 4.4:1 on a word mark on main and finds nothing now, in either scheme, on that page, diff-thread-gallery, worktree-diffs, live-progress or file-tree. Line numbers, syntax colour, folded context and notes anchored to lines are unchanged: the stills list only row and mark backgrounds among the computed styles that differ (states `diff-separator`, `walkthrough-calls` for lf-call-diff, `diff-author-notes`, `diff-long-lines`, `worktree-startup`; light and dark). `test_a_diff_is_colored_by_each_files_own_path` asked only that the two fills differ. It now has the browser convert each row and mark paint to Oklab, in both schemes, and requires the rows at least 0.05 apart and each mark at least 0.05 from its row. It also sets dark code tokens (`--lf-pre-bg`, `--lf-code-ink`, `--lf-syn-*`) under the light scheme, requires the canvas to turn dark, and requires each changed row within 0.1 of the canvas's lightness and the syntax probe to find nothing. On main it fails with `dark: added and removed rows 0.032 apart`; with lightness stated per scheme it fails with `a added row +0.708 in lightness from dark code`. ## Browser support The palette needs relative colour syntax: Chrome 122, Firefox 128, Safari and iOS 18. On Safari 17.4–17.6 the declarations fail at computed-value time and changed rows lose their fill. The colours resolve to the same `oklch()` values in both schemes in Playwright's Chromium, Firefox and WebKit; the review also checked Safari on an iOS 26.1 simulator. ## Calls Max may reverse - The mix shares (15% row, 30% mark) and caps (0.034, 0.065). The light fill sits at about today's lightness (0.93 against 0.92–0.93) rather than GitHub's lighter 0.955–0.977: at a lighter row, sRGB holds too little chroma for a red for two rows of one lightness and chroma to reach the separation (at 0.955, at most 0.022). - The marks moved into the palette beside the fills, as `--lf-code-add-mark` / `--lf-code-del-mark`, so the four colours have one home. - `--lf-add-tint` / `--lf-del-tint` (inserted and deleted prose, lf-shot's difference, chips) are unchanged, still 0.039 apart. ## Ran - `uv run pytest tests/browser/test_render_anchors.py tests/browser/test_render_gate.py -k "test_a_diff_is_colored_by_each_files_own_path or test_a_diff_marks_changed_words or test_the_syntax_probe_reports or test_a_diff_can_start"`: 4 passed; the first fails with main's sheets and with the first commit's. - `uv run pytest tests/model/test_interact_layer.py tests/model/test_interface_fonts.py`: 178 passed on the first commit. After merging main (#6025's `--lf-` names): `tests/model/test_theme_tokens.py` and `tests/model/test_themes.py` pass; two `test_interface_fonts.py` tests fail on main too, on `.lf-msg-ending` in `browser/styles/components/surfaces.css`, which still names `--font-small`. - `leaf-dev stills` for the five states above, light and dark, base `5cc9aef6a7`, before the merge; the merge renames the tokens and leaves their values. ## Not verified - A wide-gamut display: the bundled tokens' colours sit inside sRGB, but a theme whose canvas and token give a row above lightness 0.95 can ask for more chroma than sRGB holds there, and the browser gamut-maps it. - The lf-diff fixture in `test_page_fixture_renders` (journeys tier) was not run; its syntax-contrast part was run by hand on the five pages above. Closes #5857
max-sixty
added a commit
that referenced
this pull request
Nov 15, 2026
#6051 added `.lf-msg-ending`, the line under a question the agent ended that says how it ended, with `var(--sp-1)`, `var(--ink-2)` and `var(--font-small)`. #6025 landed beside it and renamed every theme token to `--lf-`, so on main nothing sets those three names and all three declarations are invalid at computed-value time. The line drew in the face of whatever holds it, with no gap above it. Each PR passed its checks against a base without the other. The rule now reads `--lf-sp-1`, `--lf-ink-2` and `--lf-font-small`. No other line added since #6025 names a bare token: a sweep of `git diff a6533b5..HEAD` against the rename list in #6025's message finds only these three. ## Evidence A `.lf-msg-ending` element added to `heat-loss`'s `main` (`leaf-dev probe heat-loss --base --js …`), beside a reference element that reads the three tokens directly: | | margin-top | colour | font | | --- | --- | --- | --- | | main | 0px | `rgb(28 27 24)`, the page's ink | 17px Charter serif | | this branch | 4px | the second ink | 11.5px system-ui | The branch's values are identical to the reference element's. ## Tests Main fails three model tests on this rule. All three pass here: - `test_every_rule_of_the_interface_names_a_declared_font` and `test_every_font_size_names_a_theme_token` (`tests/model/test_interface_fonts.py`) - `test_every_token_a_sheet_reads_is_set_somewhere` (`tests/model/test_interact_layer.py`), which reports all three names on main, not only the font Also run: `tests/model/test_theme_tokens.py` (passes), and `tests/browser/threads/test_agent_replies.py -k test_an_answer_says_what_it_leaves_while_that_stands` (passes; it reads the line's text and clipping, not its style, so it passed on main too). Not checked: the line inside a real margin card. The probe placed the element in the page's `main`, which shows the rule now resolves but not what the card's own face around it looks like.
This was referenced Nov 15, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 15, 2026
…wo readings (#6075) #6025 steps the theme's neutrals in oklab, so computed style now writes some of Leaf's colours outside `rgb()`. Two test readings compared those strings rather than the colours, and both have failed on `main` since #6025 (first in push run [43756616490](https://github.com/max-sixty/leaf/actions/runs/43756616490)). Locally, both pass at #6025's parent and fail at #6025 and at current `main`. With this change, both pass. - `test_the_leaf_paints_inside_its_focus_ring_after_folding` (`ValueError: unknown color specifier: 'oklab(0.497097 -0.000823501 0.0183057)'`): the test and the `leaf_dev.panel_paint` probe journey both parsed the leaf mark's colour with PIL's `ImageColor`, which can't read `oklab(...)`. `panel_paint.mark_colours` now paints each colour on a canvas and returns its sRGB channels, and the test and the probe both call it. - `test_color_cues_fade_to_the_live_surface[firefox_browser]` (`{'end': 'color(srgb 0 0 0 / 0)', 'rest': 'rgba(0, 0, 0, 0)'}`): Firefox serializes the same transparent colour in two forms. The test now compares the painted RGBA values, so it still checks that the cue ends on the live surface. No product code changes. #6025 meant to move the neutrals to oklab, and these readings were the only part that disagreed with it. Refs #3985 — automated triage Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Nov 16, 2026
main prefixed every theme token (#6025), so --muted no longer exists and the grey dot's rule read nothing; test_every_token_a_sheet_reads_is_set_somewhere caught it on the PR's merge with main.
max-sixty
added a commit
that referenced
this pull request
Nov 16, 2026
… it (#6107) Ten nightly-tier cases have failed on main since Nov 15, because two changes moved what the tests read and the push and PR selections don't run that tier. A macOS run of the nightly suite found them, and each passes locally at its cause's parent and fails at the cause: - #5964 put a command's findings and refusals in its JSON on stdout. Two `test_wait.py` cases still asserted an empty stdout, `test_codex_adapter.py`'s later-claim case read its refusal from stderr, and `test_interact_anchors.py`'s unsectioned-quote case read the advice as a line of its own. The wait cases still check that a waiter that lost its page prints only why it stopped. - #6025 writes the theme's neutrals in oklab, and `test_the_gutter_runs_beside_the_exhibit_and_no_further` (six cases) parsed the bar's colour from the integers in its computed style. It now paints the colour on a canvas, as #6075 did for two other readings. No product code changes. Max asked whether anything was working on the nightly failures; nothing was on these. Tests: the ten cases pass locally with `--run-nightly`. > _This was written by Claude Code on behalf of max-sixty_
leaf-agent
added a commit
that referenced
this pull request
Nov 16, 2026
…and a deleted theme section (#6125) Brings seven comments and docstrings in line with code that changed in the last day. No code changes. - **Draft carrying (#6060).** #6060 removed `carry` from `openComposer`, so a new target opens its own draft and earlier words stay with their passage. It also dropped the word "Draft" from Threads' row status. Four comments still described the old behavior: - `composing/surface.js`'s header said `commentOnTarget` carries an unsent draft to the new target. - `composing/aim.js` said an ⌥ press moves the draft onto another target. - `composing/selection.js` said an explicit Comment gesture can carry user text. - `floating-panel.js` said a drafted Threads row says "Draft". - **Other pages (#6068).** The served `others` list became `/api/pages`, but `server.py`'s docstring for the machine key still named the `others` menu. - **Theme tokens (#6025).** `tests/browser/test_render_anchors.py` cited `package-themes.md`'s "Theme colors" section, which #6025 replaced with "Theme tokens". - **`renderQuiet` (#6070).** Its new comment said it runs as a message's markup arrives. `paintDeclaredWords` also runs it on the page at upgrade and on a revision's roots. Found by the nightly review of the commits since the last run. Co-authored-by: leaf-agent <[email protected]>
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 was referenced Nov 23, 2026
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.
Restructures Leaf's theme so a page or theme sets three colours and everything Leaf draws follows, and so a page's own CSS framework can't break what Leaf draws. It answers run 14 of the Fable list, "The structure of the CSS and theme"; the candidates and their measurements are on the run's Leaf page, where max-sixty picked the three calls it left open: keep the prefix, build personal themes on the reading look, and keep the accent's hue in the accent tint. All three are in.
What changes
--lf-paper,--lf-inkand--lf-accentare the theme's inputs. Leaf steps eight neutrals (card, field, chip, rule, border, muted, second ink, inline code's ground) from the paper toward the ink in OKLab, and mixes the six tinted grounds (status, added, removed, highlighted) from the paper and the status's hue.--lf-r-sand--lf-r-lare half and twice--lf-r. The kernel's paper and ink are the browser'sCanvasandCanvasText; the reading theme sets its warm pair.--lf-. The 177 bare names (--paper,--muted,--accent,--card,--r,--sans) are prefixed, so none meets a name a page's framework declares.--border-2becomes--lf-border.resetlayer ranks below Leaf's. The document's layer order namesresetahead of Leaf's tiers, so a reset there leaves Leaf's controls their faces. Every other page layer still outranks Leaf's.readingcomposes first and the theme after it, so a theme of five declarations keeps the callout's tint, the tags and the label it lost when it replacedreading.themes.with_themeis the one statement of that order, andtheme_packagegoes.--lf-accent-tintmixed 12% of the accent into the card in sRGB, where the reading navy and cream cancel to a grey that reads as a disabled control. It is now the card with a tenth of the accent in OKLab at several times its chroma, capped at the reading accent's.package-themes.md, "Theme tokens", names 94; with the declarations and outputs other references name, 121 of the 508 properties Leaf's sheets declare are public, andtests/model/test_theme_tokens.pyholds Leaf's examples and instructions to them.What it removes
Fourteen hand-stated colour pairs (the theme states 29 where it stated 45, two of which moved to the reading theme), the references' second copy of the token list, and the need for a theme to restate about ten colours to recolour a page.
What users see
rgb(230 234 235)torgb(229 241 253)in the light scheme and fromrgb(45 48 49)torgb(31 44 57)in the dark. Each derived colour lands within two levels of one colour channel of the hex it replaces.leaf-dev stillsagainst main, on the 48 example and fixture pages and 25 interactive states in Chromium and Firefox, light and dark (267 pairs), run before the tint changed, found no pixel moving more than 3 levels of a channel, apart from the example film below, a trace main's own arm fails to load, and about 40 pixels of one text line's edge in Firefox. An earlier run of all 285 states in light Chromium read the same.--lf-paperand--lf-ink, rather than the reading theme's cream.@layer reset.portable.css: the same collision made five words of a chart and a timeline unreadable; now none.What it costs
main.resetno longer outrank Leaf's layered rules.reading; one that wants none of it is a content package on a page with--no-theme.Where to look
browser/styles/tokens.css(the steps, at--lf-paper, and the grounds, at--lf-ok-tint),packages/reading/defaults.css(the theme's two colours),src/leaf/layer.py(PAGE_RESET_LAYER),src/leaf/themes.py(with_theme),skills/leaf/references/package-themes.md("Theme tokens"), andnotes/browser-support.mdfor the Chromium gap that sets how the steps are written. The first commit is the rename alone. Codex reviewed the branch twice; its findings (a demotedbaselayer losing an author's rules, a stale regex, a test that claimed more than it held) are fixed in the later commits.Asked for by max-sixty through the Fable run list. Two tests in the
testjob fail the same way on main (test_margin_entry_tone_stays_distinct_from_control_and_agent_stateandtest_each_sampled_focus_ring_is_shown_whole_in_its_surface). Tests:tests/model/test_theme_tokens.py,tests/model/test_themes.py, two browser tests intests/browser/controls/test_theme_and_device.py,pnpm run test:runtime, the smoke tier and the layer, theme and font model tests. Evals: four styling cases pass 3 of 3 on main and on the branch,pin-takes-no-page-roompassed 2 of 3 and 1 of 3 on a reply no changed passage covers, and the two new cases pass 6 of 6.The rename script