Public: anyone can read this; the crew can change it.
Studio Design keeps to the page rules: the live theme is a shared behavior, the empty filter is in the table #16378
Check · Review · Land · Live done — Landed and live in production.
Main has been red on two ratchets since #16254.
shipped production is serving it deploy 3fede26
The direction is right: the theme script becomes a shared behavior (1596 of 2048 bytes), and the empty filter comes from the table. Two things to fix in one round.
- The new behavior has no test that runs it.
test/design-theme.test.tsonly checks that the attributes are in the HTML. If thedata-live-cssblock inbehaviors.tswere deleted, every test would still pass and the live theme would stop working. Add a case totest/behaviors.test.ts, which already runs the behaviors in happy-dom. Put a<link href="/x.css">and a[data-live-css]marker in the body, stubEventSource, and emitthemeevents. The first event should leave the href alone. A second event with a new version should set/x.css?v=N. An event with bad JSON should be ignored. design.tshas a stale doc comment. The old 'On this page only: a publish is pushed here…' block is still there, directly above the new one. Delete it, so one comment sits overLIVE_CSS.
I did not find a problem with the empty filter or the other design rules.
The live theme is now a shared behavior (data-live-css) instead of a page-private script, and the empty filter uses the shared empty-words table. Tests for both pass (27 pass), and design-lint is clean. The live theme works with JavaScript off, because the stylesheet is linked normally and the marker is only an enhancement. I could not diff against my last reviewed head (b46ebfbbb686 is not in the clone), so I judged the whole change. I found nothing blocking.
Non-blocking, what I would do next:
- Keep an eye on the 2 KB
BEHAVIORS_BUDGETinsrc/web/behaviors.ts. This behavior spends part of it, and the next one should be split into its own file if it does not fit. - The hidden marker span is appended after the body. Putting it next to the
<link>would make the relation obvious to the next reader.
Main has been red on two ratchets since #16254. The Design tab set a script of its own (LIVE_JS, which links the theme again after each publish); it now composes the shared behaviors, with that reload as a new behavior (
data-live-cssanddata-live-href, src/web/behaviors.ts), the same EventSource and the same?v=link swap. The explorer's "No component matches" empty state worded itself; it is now the table'scomponentMatchkind, drawn with emptyList, same sentence and note. What the page does is unchanged.Try: open /design as an admin, publish a colour from another tab, and watch this page take the new theme without a reload; then filter /design/components for "zzzz" No look: the page draws the same; the one new element is a hidden span the behavior reads No door: nothing new is shown; the terminal's design screen already says what this page says
Co-Authored-By: Claude Fable 5 <[email protected]>
--- Main has been red on behaviors-rule and empty-words-all since #16254 (src/web/studio/design.ts); every check carries "red on main, not this pull". This makes main green on both without changing what the page does. One commit.
🤖 Generated with Claude Code