Skip to content

List what a layer input reads in one place, and name two kernel sheets it missed - #6377

Merged
max-sixty merged 2 commits into
mainfrom
page-copy-keeps-imported-sheets
Nov 18, 2026
Merged

max-sixty merged 2 commits into
mainfrom
page-copy-keeps-imported-sheets

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

layer.input_paths and layer.package_files each listed what a layer input reads, by different rules: input_paths followed the imports of every top-level .css in an input, while composition and package_files follow only the sheets the layer composes. Both now take one walk, _input_entries. input_paths resolves each path it yields, and package_files reads the files among them. This follows #6011, which made package_files the one listing for package copies.

A new test records every sheet composing the layer reads and holds input_paths to it. It found two kernel sheets composed_sheets reads by name that KERNEL_STYLES didn't list, styles/control-face.css and styles/shadow-leading.css, so a leaf-dev preview missed an edit to either. KERNEL_STYLES now names both.

Behavior changes: input_paths no longer follows the imports of a top-level sheet the layer doesn't compose, and a package copy reads instructions/ one level deep, as composition does. Two tests that used one scratch directory as the kernel and then as a package now put the importing sheet in a package.

Tests: tests/model/test_interact_layer.py passes. dev/tests/model/test_interact_preview.py has the same 8 failures on its base as with this change, in the desktop-chat, file-subscription and Codex-feedback tests.

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

…s it missed

`layer.input_paths` and `layer.package_files` each listed what a layer input
reads, by different rules: `input_paths` followed the imports of every
top-level `.css` in an input, while composition and `package_files` follow only
the sheets the layer composes. Both now take one walk, `_input_entries`.
`input_paths` resolves each path it yields, and `package_files` reads the files
among them.

A new test records every sheet composing the layer reads and holds
`input_paths` to it. It found two kernel sheets `composed_sheets` reads by name
that `KERNEL_STYLES` didn't list, `styles/control-face.css` and
`styles/shadow-leading.css`, so a `leaf-dev preview` missed an edit to either.
`KERNEL_STYLES` now names both.

Behavior changes: `input_paths` no longer follows the imports of a top-level
sheet the layer doesn't compose, and a package copy reads `instructions/` one
level deep, as composition does. Two tests that used one scratch directory as
the kernel and then as a package now put the importing sheet in a package.
@max-sixty
max-sixty merged commit 79da6e1 into main Nov 18, 2026
5 checks passed
@max-sixty
max-sixty deleted the page-copy-keeps-imported-sheets branch November 18, 2026 08:18
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