Skip to content

Add changeset for the vyre→octane rename release - #1

Merged
trueadm merged 1 commit into
mainfrom
add-release-changeset
Jun 24, 2026
Merged

trueadm merged 1 commit into
mainfrom
add-release-changeset

Conversation

@trueadm

@trueadm trueadm commented Jun 24, 2026 •

Copy link
Copy Markdown
Collaborator

Patch bump for octane-ts and @octane-ts/vite-plugin so the Changesets action opens a Version Packages PR (0.1.0 → 0.1.1).


Note

Low Risk
Release-metadata only; no application or library code changes in this diff.

Overview
Adds a Changesets entry (.changeset/rename-vyre-to-octane.md) that requests patch bumps for octane-ts and @octane-ts/vite-plugin, so the Changesets workflow can open a Version Packages PR (e.g. 0.1.0 → 0.1.1).

The changeset note documents the rename from vyre to octane (package names, octane() plugin, octane.config.ts, and Octane-specific identifiers), while leaving upstream Ripple / @ripple-ts / @tsrx references as-is.

Reviewed by Cursor Bugbot for commit cb9ad82. Bugbot is set up for automated code reviews on this repo. Configure here.

Patch bump for octane-ts and @octane-ts/vite-plugin so the Changesets
action opens a Version Packages PR (0.1.0 → 0.1.1).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@trueadm
trueadm merged commit dcdf237 into main Jun 24, 2026
5 checks passed
@trueadm
trueadm deleted the add-release-changeset branch June 24, 2026 10:52
This was referenced Jun 24, 2026
trueadm added a commit that referenced this pull request Jul 25, 2026
…cover the boundary

Addresses both Cursor Bugbot findings on #262 and adds the behavioral coverage
the first commit was missing.

**Bugbot #1 (high) — local callees bypassed the member veto.**
`plainCalleeIsMemoizable` admitted any non-hook `Identifier` callee, but the
contract it documented only covers module-scope immutable bindings. A local
`const read = () => item.read()` — or a module helper `function sortIcon(h) {
return h.getIsSorted(); }` — wraps the exact receiver hazard the change kept
failing closed, and the inline hook-memo tier can hand a local a stable
identity. A call is now admitted only when the callee is:

  - an imported binding (opaque module boundary, the one place this analysis
    trusts rather than proves — React Compiler assumes the same), or
  - a same-module `function` declaration that is never reassigned AND whose own
    body is a value projection, checked transitively with cycles failing closed.

Component-local callees, unbound globals, and namespace members now fail closed.

**Bugbot #2 (medium) — call sites ignored module helpers.**
`autoMemoCallsitesSafe` still treated free same-module `function` helpers as
opaque while every other classifier accepted them, so a parent that formatted
through a helper blocked child call-site memoization.

**Coverage.** Two new behavioral suites, 30 tests:

`automemo-render-calls.test.ts` renders lists whose array identity and item
objects never change while state moves behind an accessor — a wrongly memoized
region freezes the output. It covers the member callee, a module helper wrapping
one, the same two frames away, component-local arrow / stable-local / function
declaration callees, a reassigned module function, and a live accessor in an
ARGUMENT to an otherwise-admitted projection; the converse (module, transitive
and imported projections stay reactive); hook callees; a context consumer under
a memoizable region; and the newly unblocked call-site path.

`deopt-child-key-aliasing.test.ts` covers the key encoding through a template
HOLE — raw `createElement` host children reconcile through a different keying
function, so the first attempt at these tests exercised the wrong path and could
not fail. Asserts explicit keys never alias positional indices (both in one
list), adversarial keys that resemble serialized wrapper paths, equal keys under
different wrappers, keyed-fragment reorder, unkeyed wrappers staying positional,
and mixed keyed/unkeyed lists.

Both suites were validated against deliberately broken implementations: the
pre-fix callee rule fails 5 of the 7 staleness cases, and dropping the key/index
prefix, sharing a prefix, ignoring explicit keys, or dropping the wrapper path
each fail 1-3 of the key cases. The restored implementation passes.

chat-stream codegen is byte-identical to the build the benchmark numbers were
measured on, so the reported figures still stand. Full suite: 1332 files /
12958 tests.

Co-Authored-By: Claude Opus 5 <[email protected]>
domgan-oai pushed a commit that referenced this pull request Jul 25, 2026
…pt key serializer (#262)

* perf(octane): memoize through plain-callee projections; skip deopt key serializer

Two independent findings from a benchmark audit of the suites where Octane
trailed the fine-grained frameworks.

**autoMemo gave up on any call in a template.** `containsRenderCall` vetoed
every CallExpression in render-value position, gating the component's
`autoMemoSafe` flag (which propagates transitively to every ancestor), the
per-item survivor short-circuit, and the whole-list region cache. One
`{formatDate(d)}` therefore removed region memoization from a component and
everything that rendered it. The veto exists for `header.column.getIsSorted()`
— mutable state read through an object whose identity no dep witnesses — and
that hazard is carried by the RECEIVER, so only the member-callee shape needs
to fail closed. Hook-shaped callees (`use`, `use*`) stay disqualified: they own
suspension, hook cells, context subscriptions, and effect lifecycles, which the
blanket veto was incidentally covering.

Same-module `function` helpers that are never reassigned are now accepted as
memo-region witnesses, on the immutable-identity grounds already given to
same-module components and `const X = memo(C)` walls.

**De-opt child keys serialized on every render.** `scopedDeoptKey` built every
child's reconciliation key with `JSON.stringify`, including at the unwrapped top
level that every `{items.map(...)}` and every binding's output produces — 1,000
serialized strings per parent update on a 1,000-row list, even when all rows
bailed. Nested wrapper paths keep the serialized encoding; both aliasing
properties it provides are preserved by the 'k'/'i' prefixes.

Paired benchmark runs, same machine, baseline = this branch's base:

  chat-stream  type160        2.22ms -> 0.78ms  (-65%)
  chat-stream  appendHistory  1.56ms -> 0.72ms  (-54%)
  chat-stream  streamCoarse   0.78ms -> 0.46ms  (-41%)
  chat-stream  streamFine     1.58ms -> 0.96ms  (-39%)
  chat-stream  switchConv     4.08ms -> 3.56ms  (-13%)

type160 moves Octane from the slowest of the fast frameworks to ahead of Solid,
Ripple, and Vue Vapor. js-framework, effectful-list, and memo-wall show no
regression; memo-wall's value-position wall improves from 1.48x to 1.39x React
(a Chromium profile of that op drops the flatten step 13.4% -> 6.0% of samples,
total samples -13.8%).

Full suite: 1310 files / 12835 tests. Three prod-only failures found during
development were real and are fixed in this diff: an ineligible same-module
component must not be rescued as a plain helper, and hook calls must not be
treated as value projections.

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(octane): restrict memoizable callees to module-scope identities; cover the boundary

Addresses both Cursor Bugbot findings on #262 and adds the behavioral coverage
the first commit was missing.

**Bugbot #1 (high) — local callees bypassed the member veto.**
`plainCalleeIsMemoizable` admitted any non-hook `Identifier` callee, but the
contract it documented only covers module-scope immutable bindings. A local
`const read = () => item.read()` — or a module helper `function sortIcon(h) {
return h.getIsSorted(); }` — wraps the exact receiver hazard the change kept
failing closed, and the inline hook-memo tier can hand a local a stable
identity. A call is now admitted only when the callee is:

  - an imported binding (opaque module boundary, the one place this analysis
    trusts rather than proves — React Compiler assumes the same), or
  - a same-module `function` declaration that is never reassigned AND whose own
    body is a value projection, checked transitively with cycles failing closed.

Component-local callees, unbound globals, and namespace members now fail closed.

**Bugbot #2 (medium) — call sites ignored module helpers.**
`autoMemoCallsitesSafe` still treated free same-module `function` helpers as
opaque while every other classifier accepted them, so a parent that formatted
through a helper blocked child call-site memoization.

**Coverage.** Two new behavioral suites, 30 tests:

`automemo-render-calls.test.ts` renders lists whose array identity and item
objects never change while state moves behind an accessor — a wrongly memoized
region freezes the output. It covers the member callee, a module helper wrapping
one, the same two frames away, component-local arrow / stable-local / function
declaration callees, a reassigned module function, and a live accessor in an
ARGUMENT to an otherwise-admitted projection; the converse (module, transitive
and imported projections stay reactive); hook callees; a context consumer under
a memoizable region; and the newly unblocked call-site path.

`deopt-child-key-aliasing.test.ts` covers the key encoding through a template
HOLE — raw `createElement` host children reconcile through a different keying
function, so the first attempt at these tests exercised the wrong path and could
not fail. Asserts explicit keys never alias positional indices (both in one
list), adversarial keys that resemble serialized wrapper paths, equal keys under
different wrappers, keyed-fragment reorder, unkeyed wrappers staying positional,
and mixed keyed/unkeyed lists.

Both suites were validated against deliberately broken implementations: the
pre-fix callee rule fails 5 of the 7 staleness cases, and dropping the key/index
prefix, sharing a prefix, ignoring explicit keys, or dropping the wrapper path
each fail 1-3 of the key cases. The restored implementation passes.

chat-stream codegen is byte-identical to the build the benchmark numbers were
measured on, so the reported figures still stand. Full suite: 1332 files /
12958 tests.

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude Opus 5 <[email protected]>
leonidaz added a commit that referenced this pull request Sep 5, 2026
…RFC #1) (#939)

* feat(compiler): lexically scoped style blocks, $class, and apply

Implement RFC tsrx-org/RFCs#1 on the Octane compiler with one copy-on-write
pre-pass per top-level statement (src/compiler/style-scopes.js):

- scopes: component render, nested @{ }, every control-flow branch body
  (including @else if chains), assigned element/fragment templates; several
  blocks per scope share the first block's hash and ONE injectStyle call;
  nested scopes get their own; injections are pushed in lexical pre-order
  with an order key that sorts among module-level entries on the server
- stamping: every host element carries its enclosing scope hashes outer→
  inner, then applied theme classes (same-module themes inline as literals
  so static templates stay hoisted; imports read theme.$class at runtime
  through the dynamic class path); {style(expr)} resolves to the chain in
  the pre-pass, so resolveStyleExpr no longer sees style calls
- assigned blocks lower anywhere a declaration is legal (component bodies,
  nested blocks, plain functions, object properties), expose $class, and
  render in theme or class-map mode from the core analyzer's classification
- Float <style href precedence> resources stay outside the model
- applyStyleMap/applyCssScoping/componentStyleRoots/annotateRootWithHash/
  addHashClassToElement/wrapScopedClassExprs are removed
- OCTANE_HYDRATE_SPLIT_STYLE names the style scope, not the component
- scripts/sync-style-conformance-fixtures.mjs vendors the tsrx conformance
  fixtures and parser spec table (pnpm sync:style-fixtures[:check])

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore(octane): read the scoped-style fixtures from @tsrx/core instead of vendoring

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* fix(compiler): control-flow style CSS on the client and imported theme CSS on the server

- inheritOriginLoc no longer descends into StyleSheet subtrees: their
  positions are CSS-relative, and stamping module positions onto them
  rendered a control-flow scope's CSS as '.hash b {}' on the client
- server: assigned blocks lower to styleMap(hash, css, map, applied), a
  proxy that injects the sheet (after the sheets of the themes it applies)
  into the active request on property access, and every component touches
  the imported themes its scopes apply (touchStyleMap) before its own
  injectStyle calls, so a theme from another module reaches the css
  collector ahead of the applying scope's rules

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(octane): scoped styles, themes, and apply across docs, website, rules, evals, and scaffold

- docs/tsrx-basics.md Styles section; stale single-scope claims fixed in
  deferred-hydration, ssr, differences-from-react (with the STYLE_* codes),
  getting-started, css-module-constants, universal-renderer-architecture,
  product-example-regressions, octane-cleanup-plan
- website: new Learn Octane › Styling page (docs-meta, docs, sitemap, llms
  index, pagination pin), styles mentioned on tsrx-vs-tsx and quick-start,
  build-tools notes per bundler, llms.txt authoring bullets, regenerated
  TextMate grammar, scoped-styles playground example
- rulesync: tsrx-authoring Styles section, skill enumeration, one-line
  project pointer within the context budget; MCP skills; CONTRIBUTING and
  README mentions
- evals: scoped-styles coverage axis with tsrx.nested-scope-styles and
  octane.theme-apply tasks, corpus regenerated (21 tasks)
- scaffold: the link styles are an applied theme; harbor PriceBadge dark
  variant via apply; examples catalog regenerated
- tests: conformance runner over @tsrx/core's fixtures (client + server +
  evaluation) and the parser spec-table fallback replay

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* test(octane): scoped style fixtures, parity, runtime, streaming, and browser coverage

- fixtures: style-scopes, style-theme(+consumer), style-element-rooted,
  style-local-assigned, style-order-theme/applier, returned nested scopes
- suites: RFC class table and head order, multi-block/nested/control-flow/
  sibling scopes, {style()} chains, $class pins, SSR cascade with in-body
  themes, streaming per-hash dedupe and theme waves, Float sibling and
  apply-is-not-a-resource, clsx spread + hashes + theme.$class parity,
  frozen-AST run over every fixture, per-scope inspect origins, emit audit,
  deferred-hydration split message, universal renderer rejection, React-
  hosted multi-hash islands, injectStyle DOM order, HMR hazard pin
  (it.fails, #938), Playwright cascade (client, SSR+hydrate)
- runtime: the client dedupe matches React's batched data-href by token,
  so hydrating a multi-hash island no longer re-injects its sheets
- typetest: theme.$class is string under tsrx-tsc
- docs: server-side lazy theme injection described in tsrx-basics and the
  Styling page; Scoped CSS notes in the bundler plugin READMEs

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore: patch-level changeset for octane

A minor bump cascades into major bumps for every dependent's peer range;
the release plan checker rejects it without a coordinated peer expansion.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore(evals): regenerate the corpus manifest after merging main

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore: consume @tsrx/core from the scoped-styles branch until it ships

packages/octane, @octanejs/evals, and website depend on
github:tsrx-org/tsrx#feat/scoped-styles-apply&path:packages/tsrx (a git
dependency is not allowed as a subdependency, so the spec lives on the
direct dependents); overrides pin the branch manifest's workspace/catalog
dependencies to the published runtime and the tsrx catalog ranges.

Also: the client injectStyle refreshes a sheet it already owns when an HMR
re-evaluation arrives with an unchanged hash and changed CSS (#938).

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore: interim formatter ignores and regenerated react-parity lockfile hashes

The published @tsrx/prettier-plugin cannot parse the fixtures that place a
<style> beside a code block's output node until its release ships the new
parser; the react-parity audit files hash the lockfile, which the branch
dependency changed.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* fix(compiler): keep server theme touches in the applying component's body

The touches were handed to the shared body emitter through a context slot
that the first nested branch helper drained; they are now a parameter that
only the component body passes (nested helpers pass none), with a test
pinning the placement ahead of the component's own injectStyle calls.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore(evals): regenerate the corpus manifest for the branch lockfile

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore: keep vitest peer resolution as on main; no skipped conformance test

The non-frozen install that introduced the branch dependency also swapped
the happy-dom peer suffix of five vitest snapshots, which changed which
vitest instance packages/pdf resolved and broke its typecheck (TS2769);
those hunks are reverted. The conformance runner asserts the documented
compiled-output-only reason instead of skipping (test-marker policy).

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore(evals): regenerate the corpus manifest for the final lockfile

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore: let packed consumers install the branch @tsrx/core (interim)

The pack validator and the Lynx consumer generators write their own
pnpm-workspace.yaml; while octane depends on @tsrx/core from a git branch
they now emit blockExoticSubdeps: false (pnpm 11 blocks a git dependency
below a packed package by default) plus the branch-manifest pins read from
the root workspace, so the block disappears with that override at release.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore: regenerate react-parity lockfile hashes for the final lockfile

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* test(octane): drop the react-compat $class typetest until the core release

That directory is type-checked through the published @tsrx/react and its
released @tsrx/core, which has no $class yet; the compiled-output checks in
the conformance and style-map suites cover $class on the Octane side.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore: interim workspace for the external packed consumer too

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(octane): opting elements into a theme with $class

Document `class={theme.$class}` (and passing it to a child through a prop)
as the selective counterpart of `apply` in tsrx-basics, the Styling page,
llms.txt, and the tsrx-authoring rule; extend the playground's scoped-styles
example with an `accent` theme, a Footnote child, and an untouched sibling;
add a client/server test suite for the pattern. Lockfile moves to the tsrx
branch commit that classifies a block whose $class is read as a theme
(and ships the class-opt-in conformance fixture), with the parity and
corpus hashes regenerated.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* feat(octane): scope standalone <style> blocks to their children list

Amendment A1 of RFC tsrx-org/RFCs#1. A standalone block is a child of an
element or a fragment and styles the items beside it and everything below
them; it never styles the element that contains it. Every children list
holding a block is a scope with its own hash, and a `@{ … }` or directive
body holds one output node, so the statement-list scope machinery is gone
(those lists are only searched for nested templates and assigned blocks).

Rule C: `<style>{expr}</style>` is an ordinary element; a `style` host is
never stamped, and the Node parser entry retries that shape in the
JavaScript parser when the native facade's CSS reader rejects it with a
bare Error. Rule B's `tsrx-style-standalone-outside-template` comes from the
core analyzer through compile.js and volar.js.

Fixtures and tests that relied on a nested block styling its container move
the block beside the element in a fragment; the Status class table from the
spec and the rule B/C placement forms are pinned on the client and the
server. The placement suite and the conformance runner wait on the core
lockfile bump.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* fix(website): put scoped <style> blocks beside the elements they style

Every component whose block sat as the last child of its classed root
element (41 files), the embedded playground examples, and the docs code
samples now wrap the block and the root output in a fragment, so the root
keeps its rules under amendment A1. The pinned Counter scope hash in the
playground mapping test moves with the block's position.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs: describe the sibling-scope <style> rule and the new diagnostics

A block styles the items beside it and everything below them, never the
element that contains it; raw CSS in <style> is TSRX template syntax and
plain TSX uses <style>{css}</style>. Rewrites the Styles sections of
tsrx-basics, the tsrx-authoring rule (regenerated), llms.txt, the styling
and quick-start pages, differences-from-react, ssr.md, the MCP skills, the
scaffold templates, the harbor PriceBadge island, and the nested-scope
evals task (prompt and reference).

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore: extend the scoped-style changeset with amendment A1

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore: drop the interim prettierignore entries for scoped-style fixtures

The four fixtures now use the fragment form, which the published
@tsrx/prettier-plugin parses, so they format like every other file.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* fix(octane): prune standalone scopes like core and re-pin the parser table

Against tsrx c05ca370. The conformance runner's `sibling-scope` fixture
resolved the `status` label to two hashes: core prunes a standalone block's
selectors against the list's other children (the `.status` rule inside the
section reaches nothing and becomes an `(unused)` comment), Octane kept
every selector. `prepareScope` now mirrors core: the list's other children
are cloned (fresh metadata per node, so the frozen parser AST is never
written), their host elements collected with ancestor paths, and each sheet
is `analyzeCss` + `pruneCss` per element instead of the blanket
`prepareStylesheetForRender('scope')`. The conformance runner asserts
`expected.pruned` across every sheet, and the tests that relied on a
container-aimed rule surviving pin the pruned shape.

The style-syntax fallback test follows the flipped spec table: the
multiple-outputs forms and the four `<style>{css}</style>` shapes fall back
to the JavaScript parser; the self-closed-block cases parse natively and
stay pinned as the known `css: undefined` divergence (tsrx-org/tsrx#46).
The rule C server assertion checks the server's nested template-literal
runs instead of the client's single template string.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore: lockfile on tsrx c05ca370 (amendment A1), parity hashes, evals corpus

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* fix(octane): inject a theme's applied same-module themes on the server

Bugbot on #939: `wrapServerStyleMap` listed only imported `theme.$class`
reads as injection dependencies, and a body-less assigned block skipped the
wrapper. A same-module theme an exported theme applies is inlined as a hash
in the class list, so when another module's component touched the export
only the export's own sheet reached the SSR collector while the applied
themes' class names were present without their CSS.

Every `styleApplies` expression is now a dependency of the server wrapper,
same-module and imported alike, so `touchStyleMap(theme)` and `theme.$class`
reads inject the apply chain transitively, applied before applier, each
sheet once (the wrappers dedupe by hash and guard re-entry). A body-less
bundle lowers to `_$styleMap(null, null, map, [applied])` and the runtime
skips its own injection while forwarding the touch. The client path is
unchanged: every sheet is a module-level `injectStyle` there.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* fix(octane): keep a returned styled fragment a static descriptor

A render-only `@{ <>…</> }` child of a returned fragment is transparent
grouping — the same rule normalizeChildren and extractFragment already
apply — so `requiresTemplateNormalization` now looks at its render instead
of forcing the compiled-renderer path for any code block. Under amendment
A1 a value factory in plain TSX keeps its scoped CSS in exactly that block
(raw CSS needs a `@{ … }` container), and the tests inspecting the stored
value expect the static `Fragment` element it used to be, not a lowered
renderer function. Fixes signals-deferred-values in the signals projects.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* test(website): locate playground keywords through the editor document

The playground e2e tests found a keyword by walking the text nodes CodeMirror had rendered, so a keyword below the initial viewport (the counter example now opens with its <style> block) was reported missing. Find it in the document, scroll its line into view, wait for the viewport to cover it, and read the node from the editor.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* test(octane): render a value factory's render-only styled block

Pins, with a mounted client tree and a server render, that a plain-TSX
value factory returning `<><h1/>@{ <><style/><div class="x"/></> }</>`
renders the heading and the styled div with the scope hash and the injected
sheet on both sides (dev and prod compiles, frozen-AST guard included):
the render-only block is transparent grouping in the descriptor path, and
its output is not dropped.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* test(website): find playground keywords beyond the rendered viewport

CodeMirror renders only the lines around its scroll position, so the playground e2e helpers could not see a keyword further down the source. Sweep the scroller, record every occurrence by its document-coordinate line top, scroll the chosen one into view, and read the node after the re-render. The counter example opens with its markup again and keeps the style block last in the fragment, so the default demo reads top-down and the token hovers land on JSX rather than on CSS selectors; the pinned scope hash follows the block's new position.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(website): place playground style blocks beside the markup they style

A standalone <style> block styles the other children of the list it sits
in and their descendants, never the element that contains it and never a
child component's elements. Rework the TSRX playground examples around
that rule:

- Examples whose subject is not styling put the markup first and the block
  below it in the same fragment (branch-hooks, context, portals,
  dynamic-tags, parallel-use, form-actions, esm-sh, octane-compat island,
  react-compat host). view-transition keeps its block first: the CSS
  animations are what enter="card-in"/exit="card-out" name. theme-app is
  untouched.
- counter, keyed-list, inputs, suspense, and transitions split their block:
  the container rule stays at the top of the fragment and each part's rules
  sit beside the markup they style (toolbar row, output panel, or inside
  the <ul> next to the @for and @empty rows).
- Rules aimed at a child component's elements never matched and were being
  pruned as (unused): ThemeCard's .card, the dynamic-tags chips, Quote's
  .quote, SlowList's and Elapsed's .hint, SubmitButton's button, and
  IslandData's .data now live in their own component's fragment.

playground-examples.test.ts gates this for every .tsrx file, client and
server: no injected sheet may contain an (unused) rule, and every authored
class a block targets must carry a scope hash in the compiled markup. The
counter's pinned scope hash in playground-mapping.test.ts follows the
block's new position.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs: call the <style> scope a sibling scope

A standalone <style> block is scoped to the children list it is written
in, not to the @{ … } body around it. Readers took "lexically scoped" to
mean the latter, so every doc surface now says "sibling scope" and
defines it once where it first appears: a block styles its siblings and
everything below them, and sibling blocks share one hash. "Lexical
order"/"lexical pre-order" for CSS emission order, "lexically inside a
@{ … } body" for the TSX rule, and "lexical scope" in its JavaScript
binding sense are unchanged.

Regenerated the RuleSync outputs and the evals user-app corpus after
editing the rule and the task prompt.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(styling): say each rule in plain words

Rework the Styling page so every section makes one point, its title
states that point, and the body opens with the rule, then a short
example, then what to do. Define "hash class" once up front and use it
instead of "stamp"/"stamping"; say "branch" instead of "arm", "the
block that applies it" instead of "applier", "a block with CSS in it"
instead of "bodied", and describe output order as "source order, outer
scope first" instead of "lexical pre-order". The control-flow section
is now "Styles inside @if and @for" with a shorter example; the
fragment rule and the static-CSS rule get their own sections; the
runtime injection details move out of "Which rule wins" into "Where
the CSS goes at runtime".

Apply the same wording to the Styles section of docs/tsrx-basics.md,
the styling bullets of website/public/llms.txt, and the tsrx-authoring
rule (regenerated). No fact, compiled output, example output, or
diagnostic changes; the new examples were compiled to confirm the
documented sheet count, class chains, and parser error.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(styling): drop the last two jargon terms and fix the Next link

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(styling): document :global, its forms, ranking, and when to pass $class

Add "Reach outside the scope with :global" to the Styling page, with the
same material in docs/tsrx-basics.md, llms.txt, and the tsrx-authoring rule:
the selector forms (bare, prefixed, leading, compound), the block form and
its nested use under a scoped rule, the CSS_GLOBAL_PLACEMENT limit, how a
global rule ranks against a scoped one (hash on the first compound,
:where() on the rest), and a decision table that prefers passing
theme.$class to a child over reaching in with :global.

Pin the compiled selector shapes on both emitters in
packages/octane/tests/style-global-forms.test.ts.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* test(octane): give the :global fixture a real .note sibling

The purple .note pin held only because a sibling with a dynamic class kept every class selector alive. A <p class="note"> makes the scoped rule live on its own, and the test now also asserts nothing in the sheet was removed as unused.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore: rebase the react-parity audit files on main's evidence hashes

The merge kept the branch side of the audit files, whose evidence-file hashes predate main's changes; take main's files and refresh only the lockfile integrity, which is all this branch changes.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* fix(octane): resolve style(expr) only in class-string positions

Bugbot on #939: the style-scope pre-pass rewrote every one-argument call
to an identifier named `style` it walked — a local `const s = style(props)`
became `const s = props`, an imported helper in `style={style(props)}` was
rewritten too. Before the pre-pass the emitters expanded `style(expr)` only
as the expression of a JSX attribute value or of a template expression
child, so that is the rule now: an attribute value (the `style` attribute
excepted — its value is CSS, never a class list, so the old rewrite there was
a quirk and is retired) or a template child hole, directly or nested in the
array/conditional/logical/template expressions of that container. Every
other `style(...)` — a statement, a declaration initializer, a call
argument, a callback body — is a user call and prints as authored. The
attribute walk now runs before the stamp so nested calls resolve first, and
a resolved value is marked so the stamp does not append the chain again; the
emitters' `resolveStyleExpr` fallback is a pass-through.

Also pins that a rule matched only by a dynamic-tag sibling stays in the
sheet on both emitters (a `<{expr}>` can match any selector).

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* test(website): wait for CodeMirror to paint before reading keywords

The scroller sweep waited two animation frames per step, which a slow runner can outpace, so a keyword's lines were sometimes never in the DOM when read ("@empty not found" on the production run). Each step now waits until a line is painted inside the visible range, uses half-height steps, and the final read retries until the target line appears.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs: give the opt-in example's article its own local class; core on tsrx 393d1754

The $class opt-in example declared a .local rule the article never used; the article now carries local alongside the passed theme class, and the opt-in test expects it on client and server. The lockfile moves to the tsrx commit whose class-opt-in conformance fixture has the same shape, with parity hashes and the evals corpus regenerated.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore: consume the released @tsrx/core 0.1.66

tsrx-org/tsrx#68 shipped the sibling-scoped style blocks, `$class`, and
`apply` this branch was consuming from the `feat/scoped-styles-apply`
git branch, so:

- `packages/octane`, `@octanejs/evals`, and `website` depend on
  `@tsrx/core` through `catalog:default` again;
- the catalog moves every `@tsrx/*` entry to that release (core 0.1.66,
  prettier/typescript plugins 0.3.132, react 0.2.66, solid 0.1.66,
  vite plugins 0.0.99/0.0.96) and `minimumReleaseAgeExclude` follows;
- the INTERIM override block that made the branch manifest installable
  is deleted, and the pack validator, its canary tests, and the Lynx
  consumer generators drop the `blockExoticSubdeps` shim (back to
  main's versions);
- `pnpm sync` regenerates the lockfile-hashed parity audits and the
  evals manifest.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* fix(octane): allow complete style scopes inside Hydrate splits (#959)

* fix(octane): allow complete style scopes inside Hydrate splits

Lift OCTANE_HYDRATE_SPLIT_STYLE when a lexical style scope sits entirely
inside the extracted child (plan S8.5). Keep the error when the scope
has blocks or stamped hosts on both sides of the boundary.

Co-authored-by: Jon Wheeler <[email protected]>

* fix(octane): keep hydrate extraction from writing frozen style nodes

Extraction now reaches complete in-boundary style scopes. Skip frozen
parser/StyleSheet nodes when stamping generated origins, and assert the
split child's sheet after the child hydrates.

Co-authored-by: Jon Wheeler <[email protected]>

* fix(octane): count namespaced hosts in hydrate style-scope straddle check

JSXNamespacedName hosts are stamped by the style-scope pass. Treat them
as stampable so a parent-list scoped style with only namespaced hosts
inside a split Hydrate is rejected as OCTANE_HYDRATE_SPLIT_STYLE.

Co-authored-by: Jon Wheeler <[email protected]>

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Jon Wheeler <[email protected]>

* refactor(website): dogfood sibling-scoped styles in CoreApiDemo (#958)

Migrate the Core APIs live examples off a class-map plus :global descendants
onto sibling scopes, control-flow scopes, and <style apply={theme} />. Move
PortalEventDemo toast rules into ToastBody. Document the class-map pruning
trap and the apply path for shared chrome.

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Jon Wheeler <[email protected]>

* fix(octane): stamp the scope chain once when style() is part of a class value

A `style(expr)` nested in an array, conditional, logical, or template
class value resolved to the chain plus its value, and the element's stamp
then appended the chain again (Bugbot on #939). Inside the class of an
element the chain is stamped on, a call that is only part of the value
now yields its value alone and the stamp adds the chain once to the
composed value, so the chain is present whichever branch runs and never
twice. A whole-value `class={style(expr)}` keeps its chain-first form,
now also through parenthesized and TS wrapper expressions.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* style: format for @tsrx/prettier-plugin 0.3.132

The released plugin drops the stray `;` after `@try` blocks in three
fixtures, and #958's styling table is realigned.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
Co-authored-by: Jon Wheeler <[email protected]>
Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Jon Wheeler <[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.

1 participant