Skip to content

Cut version-check readings that restate Chrome or re-check Leaf's own files - #1239

Merged
max-sixty merged 2 commits into
mainfrom
cut-restating-checks
Sep 26, 2026
Merged

max-sixty merged 2 commits into
mainfrom
cut-restating-checks

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Leaf's checks should catch what breaks Leaf or visibly breaks a page, and that nothing else reports. This removes the ones that do neither, about 1,150 lines net.

Static (version check)

  • Stray end tags and duplicate attributes. Chrome recovers both, and TurboHTML keeps the first duplicate value just as Chrome does.
  • The pinned-pixel-width column lint, and the --lf-reading-column: 1 claim in the theme that existed only so the lint could find the column. The theme already caps img, svg, video at max-width: 100%, and --render measures overflow directly. The success line no longer names a column.
  • language-* class checks on a plain <pre><code>. Plain HTML claims no vocabulary, so the runtime now leaves a language outside $languages uncolored rather than throwing a console error. An lf-code language attribute is still held to the list.
  • Syntax checks of the vendored stylesheets on every check. page init checks them when it composes the layer. The page's own <style> and inline styles are still checked.

Browser (--render)

  • silentCuts and withheldRoom. Both read Leaf's own runtime and theme; readings.py's docstring already puts those checks in the suite rather than the per-page gate.
  • unnamedFormFields. Real Chrome raises that DevTools issue itself, and the gate already reads DevTools issues; the probe existed only so the suite's headless shell would see it.
  • The print pass: paperWords, paperVoids, and the print coveredWords.

The stylesheet-link rule (rel and href only) stays: delivery and export read attrs["href"] directly. The syntax-contrast reading (unreadSyntax) also stays. Axe passes the code spans it catches, and page CSS can cause the failure.

Tests

  • Deleted: tests that held only a cut reading.
  • Trimmed: the scrolling, room and edge-shade tests keep their layout assertions.
  • New: test_a_plain_block_in_a_language_the_layer_cannot_color_stays_plain fails against the old runtime, on the console error.

uv run pytest tests passes (1438), and so does npm run test:runtime.

#1234 edits silentCuts, which this deletes; whichever lands second resolves the conflict by taking the deletion.

🤖 Generated with Claude Code

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

… files

Leaf's checks should catch what breaks Leaf or visibly breaks a page and that nothing
else reports. These did neither:

- Stray end tags and duplicate attributes: Chrome recovers both, and TurboHTML keeps
  the first duplicate value exactly as Chrome does.
- The pinned-pixel-width column lint, with its `--lf-reading-column` claim in the
  theme: a static guess at overflow the theme caps (`img, svg, video` at 100%) and
  `--render` measures directly.
- `language-*` class checks on plain `<pre><code>`: plain HTML claims no vocabulary.
  The runtime now leaves a language outside `$languages` uncolored instead of
  throwing a console error; `lf-code`'s declared `language` is still held to the list.
- Vendored-stylesheet syntax on every check: `page init` checks them when it composes
  the layer.
- Browser readings about Leaf's own runtime and theme (`silentCuts`, `withheldRoom`),
  the unnamed-form-field probe (real Chrome reports that issue through the DevTools
  issues the gate already reads), and the print pass.

Tests that held only these readings are deleted; the scrolling, room and edge-shade
tests keep their layout assertions. A new render test holds that an unknown plain-block
language stays uncolored with no console error.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lint job fails on this head because Prettier rewrites the new highlightBlocks condition. The inline suggestion uses its output.

Comment thread skills/leaf/assets/runtime/syntax.js Resolved
@max-sixty
max-sixty merged commit 3730bad into main Sep 26, 2026
5 checks passed
@max-sixty
max-sixty deleted the cut-restating-checks branch September 26, 2026 20:57
max-sixty added a commit that referenced this pull request Sep 27, 2026
…me (#1255)

After #1246 the margin rail claims no room: it stands wherever the room
beside `main` holds it, and only `data-rail="right"` takes that room.
Prose across the tree still described the old model, and the decision E
test missed the chrome.

## Prose now describes the current model

These sources still described a reserved rail, an 863px floor,
`x-measure`, or workspaces inside page tabs:

- the developer glossary;
- how-it-works;
- the theme and runtime comments;
- `structure.py`;
- test docstrings;
- the feature gallery, with the corpus regenerated.

They now state what the code does. The glossary's Pin entry lists every
case that pins a marker. Its reading-posture entry no longer claims that
only a held workspace bounds a region, since a visual review's capture
is bounded in any page.

`test_check_measures_against_the_column_the_page_sets_for_itself` is
deleted. It set `--lf-reading-column`, which nothing has read since
#1239 cut the column lint, so it passed however the page was written.

## Decision E also reaches the chrome

`test_a_pages_own_element_rules_leave_the_layers_controls_alone` is
still a strict xfail, but it now reads the chrome's buttons as well as a
widget's controls. A page's bare `button {}` restyles the family, ink,
border, background and padding of every button in the banner and thread
panel, because `.lf-btn`'s face is in `shadow.css`, inside `lf-base`. On
the commit before #1246, only the family leaked into those buttons,
through `lf-reset`'s `font: inherit`.

`TODO.md` records this, along with the ownership that unblocks the
boot-time exclusion: a widget's controls take their face from the sheet
of the package that ships the widget. Its Layout intro and
`notes/dependency-survey.md` no longer describe cascade layers as
untried.

## Testing

- `uv run pytest tests`: 1431 passed, 1 xfailed, 1 failed. The failure,
`test_a_preview_holds_one_contract_until_it_closes`, passes when rerun
alone and touches nothing this change does.
- The widened xfail fails on its assertion, not in setup: with
`--runxfail`, the board's controls read `cursive` in the page's red.

> _This was written by Claude Code on behalf of max-sixty_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <[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