Repository navigation
Conversation
Adds the two GXT flavors next to the classic build, without changing the classic one: - `EMBER_RENDER_BACKEND=gxt` (rollup) / `GXT_MODE=true` (vite): the compat backend. A shared alias table (scripts/gxt-alias-map.mjs) swaps the @glimmer/* reactivity and manager packages for the gxt-backend shims and drops the Glimmer VM packages from the dist. - `EMBER_RENDER_BACKEND=gxt-native`: the native layer. Classic Ember source with `__GXT_MODE__ = false`; only the modules that touch the Glimmer VM are aliased to gxt-backend/native (same table, native section), and templates compile with the gxt compiler. `__GXT_MODE__` / `__GXT_CLASSIC_COMPONENTS__` are build-time constants (scripts/replace-build-constant.mjs, declared in types/gxt-ambient.d.ts) that both bundlers inline, so classic dists fold every GXT branch away. Other pieces: the `@lifeart/gxt` 0.0.82 dependency, playwright for the GXT browser tests, the bundle-size check and budgets, the compat package assembler (scripts/build-gxt-package.mjs), the opt-in gxt-backend checker, and lint / tsconfig / prettier / yuidoc exclusions for gxt-backend. On top of main's build: the classic test build keeps main's `treeshake: false`; GXT test pages isolate a test module the gxt compiler cannot compile (a failing synthetic module instead of a page that fails to load); the stable-decorators type check excludes gxt-backend like the main one; `@glimmer/component` resolves to its source in the GXT configs too; the published types (types/publish.mjs now fails on tsc errors) leave out gxt-backend and @glimmer/component-gxt and see the `__GXT_MODE__` declaration. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
packages/@ember/-internals/gxt-backend renders Ember with glimmer-next
(@lifeart/gxt) instead of the Glimmer VM:
- compile.ts / ast-transforms.ts: the Ember template dialect on the gxt
compiler (runtime `precompileTemplate`, `plugins.ast`, the Ember keyword
helpers) and the gxt runtime patches the dialect needs;
- manager.ts / ember-gxt-wrappers.ts / helper-manager.ts: component, helper
and modifier managers (classic curly components behind
`__GXT_CLASSIC_COMPONENTS__`), the `$_tag` / `$_maybeHelper` / `$_dc`
wrappers compiled templates call;
- validator.ts / reference.ts / destroyable.ts (+ the `-vm-compat` test
surfaces): @glimmer/validator, /reference and /destroyable on gxt cells,
including main's standalone `trackedValue` on the shim's tags;
- gxt-bridge.ts: the side-effect-free registry the classic packages reach
the backend through, so classic builds never load it;
- outlet.ts: route outlets. Main renders routes through route managers and a
`RootOutlet` component; the compat backend keeps its own outlet machinery
(the `<ember-outlet>` element, the root template's outlet path) driven by
the `{ render, outlets }` chain that `Route#setup` records through the
bridge's route-outlet hooks.
Also @glimmer/component-gxt and the backend's own QUnit tests (__tests__).
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
gxt-backend/native replaces only the Ember modules that touch the Glimmer VM (renderer, outlet, managers, validator / reference / destroyable, template factories, runtime helpers) with gxt-native implementations; everything else is classic Ember source built with `__GXT_MODE__ = false`. Main renders routes through route managers. Native aliases `route-managers/root-outlet` to native/root-outlet.ts: the root outlet state holds a native `OutletView` whose levels are live views of main's `OutletState`s (owner, controller, tracked context as `@model`, the route template looked up once per route bucket), and `renderComponent` renders a `RootOutlet` through the owner's `appendOutletView`. The classic route wrapper and the classic route manager's `RouteTemplate` (both Glimmer VM internal components) are plain records, the route-manager registry asserts through `@ember/debug` instead of `@glimmer/global-context`, `base-renderer` maps to the native renderer, and owners with live roots are listed in main's `renderers` list for `captureRenderTree`. Like main, the root outlet adds no render-tree node. Packaging: scripts/build-gxt-native-package.mjs and scripts/gxt-native-package (ember-source-gxt-native), assert-native-dist (the VM-free dist check), and the modern-app bundle/boot harness (scripts/bundle-modern-app*.mjs, smoke-tests/modern-app) plus the packaged consumer smoke test (smoke-tests/gxt-native-package). Following main: the package and the harness's dist snapshots carry ember-source's `sideEffects`; @glimmer/component builds a dev and a prod dist of its own, and the package, the preset and the dist assertion pick the one of the mode; the consumer app compiles for main's browser targets (lib/browsers.cjs), so its bundle stays byte-identical to the harness measurement. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The places where classic Ember hands over to the compat backend. Every hook is behind the build-time `__GXT_MODE__` constant and reaches gxt-backend only through gxt-bridge, so the classic dists fold them away; the surrounding code is main's. - glimmer: the renderer's GXT root render (ClassicRootState), its force-rerender / root-tag bookkeeping, and the GXT `renderComponent` (base-renderer); a VM-free renderer state under GXT; the GXT root template (templates/root.ts); GXT-aware `template()`, `unwrapTemplate`, internal components, Input, element helper, scheduleRevalidate. - metal: the single gxt cell behind `@tracked`, the GXT re-render trigger in `notifyPropertyChange`, the CP re-entrancy guards, `set` hooks; barrel imports of @glimmer/validator where the rollup alias map needs them. - routing: `Route#setup` / `teardownViews` record and drop the route's GXT render state, `_setOutlets` renders through the GXT outlet machinery (and skips main's incremental mid-transition passes, which have nothing new to render there), QP / meta fixes; the classic route manager keeps a raw gxt route template uninvoked. - runtime / object / runloop / application / views / template-compiler: smaller GXT hooks (observer flush budget, proxy unknownProperty during renders, settled PromiseProxy fast path, rehydrate DOM handling, view-tree rebuild, GXT `template()`). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- scripts/gxt-test-runner: the Playwright + QUnit runner (per-module isolation, baselines, smoke list, native allow-list and skips, contract tests, baseline gate; the gate's `--subset` mode compares only the modules a smoke shard ran); - index.html: the GXT test-page setup (behind `__GXT_MODE__`) on main's page; native.html: the gxt-native test page, which also runs main's `setupTestHelpers()` and loads QUnit by package name like index.html; - internal-test-helpers: GXT compile through the compat compiler, the GXT teardown harness, GXT artifact stripping in equalTokens / equalInnerHTML, GXT run helpers; the router test case exposes its root element to GXT; - integration-tests: the GXT rehydration delegate (two plain GXT renders; serialization-dependent tests skipped with a reason) on main's `RenderDelegate` / `RenderHandle` interface, GXT `<!---->` stripping, and no empty component sub-modules. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
GXT branches in shared tests (cache-counter parity, debug render tree,
resolver cache), GXT skips (hot reload, `{{mount}}`), new regression tests
(has-block-params in nested blocks, the (hash)/(array) identity tests, which
moved to helpers/gxt-hash-array-identity-test.js because main rewrote
array-test / hash-test as .gjs), and renames that keep the names `array` and
`element` out of module scope in the single-chunk GXT test bundle.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The GXT smoke (contract + sharded smoke modules, each shard gated against the compat baseline: main rewrote tests in six smoke modules, and their new versions are known reds there), dual-build, gxt-native (modern-app boot, package, native suite against its baseline) and nightly full workflows; the setup action's optional Playwright install; the ember-source-gxt scenarios and the v2 app template for them. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
test-results/gxt-baseline.json (compat, 8703/9828, 954 modules) and
native-baseline.json (native, 7061/7103, 672 modules), regenerated on this
series from one local full run each; and docs-internal-gxt-packaging-design.md.
Every status change against the pre-rebase baselines is a test main added
or rewrote: Glimmer components instead of classic ones, .gjs conversions,
route managers, standalone tracked(), {{#each-in}} key=, {{on}} listener
order, and main's rewrite of the @glimmer-workspace integration harness,
which now renders the [integration] suites through Ember's renderComponent
(GXT under GXT_MODE) instead of the Glimmer VM. The notes in the files list
the known reds and the three [integration] modules that hang under GXT.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ever Three compat `[integration]` modules hung the renderer once main's harness rendered through `renderComponent` and registered every helper as a public `setHelperManager` definition. Two loops, both in compat only: 1. A helper's value read wrote reactive state. On every evaluation of the formula that renders a cached custom-manager helper, `$_maybeHelper_ember` assigned the bucket's args, and the args setter dirtied a tag that the formula had consumed through the helper's cache: with no dedup when an argument was a function, and a forced cache miss after any classic dirty (which the assignment itself caused), each evaluation scheduled the next (`<Bar @content={{(foo)}} />`, `<Bar @content="{{foo}}" />`). The read also wrote the result cell. Helper args now follow Glimmer's args proxy: `positional` / `named` are accessors over plain storage; an assignment compares slot by slot (`Object.is`, functions by identity) and only a real change bumps a helper-args tag, which only the shim's caches and track frames see (no GXT cell, no classic bridge, no reactor, no scheduling). `getValue` stays the helper's cache, so compute re-runs only when an argument or a tag it consumed changed; the read path no longer keeps an arg-serialization dedup and never writes the result cell. 2. A `(hash)` / `(array)` argument with a `(component)`, `(hash)` or `(array)` member got a new identity on every read after any change: gxt's `cachedHelper` re-runs a factory that read no cell (every `(hash)`) on each revision change, and those members defeat its shallow-equal check. Each sync then saw an argument change; its write-back fired the `renderComponent` root's classic reactor, which re-rendered the root in the middle of the sync's pass over the component args, and the pass went on into the new components (`<X @stuff={{hash Foo=(component "foo")}} />`). `$__cached` now has reference semantics (re-run only when a cell the factory read changed, constant otherwise, previous identity kept when shallow-equal). The sync's arg write-back and the arg-dirty effect run as arg propagation (`withArgPropagation`), whose classic dirties fire no classic reactor: GXT is already propagating that change. Tests: gxt-backend/__tests__/helper-args-test.ts (14 tests; 11 hang or fail without the fix). The 5 hanging tests of the three modules now pass. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ment The per-slot `Object.is` comparison of the previous commit kept a helper's cached value when an array argument was mutated in place (`pushObject`): the array is the same object, and the old JSON arg-serialization dedup that used to notice the new contents is gone. In Glimmer, reading an array argument consumes the array's `[]` tag, so such an array is a changed argument. A slot now also records an array's elements and is unchanged only when they are still the same (`Object.is` each). Test: helper-args-test.ts `an Ember array argument changed in place re-computes the helper` (passes before the previous commit, fails with it alone, passes now). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Regenerated from one local compat full run on 996d0c9 (runner.mjs --full, no timeouts, no harness errors, no green->red against the previous baseline): 8764/9928 tests in 959 modules (was 8703/9828 in 954). - The three `[integration]` modules that hung the renderer are now in the baseline: `jit :: Components :: Glimmer` 20/42, its `> [integration] Glimmer` sub-module 20/38, `argument-less helper paren-less invoke` 2/5 (the five tests that hung now pass; the other reds are the known harness conformance gaps). - New modules: `GXT helper args: renderComponent roots settle` 10/10, `GXT helper args: helper re-computation` 5/5. - red -> green: Custom Helper test :: works with strict-mode; Helper Tracked Properties :: class based helpers are autotracked, nested tracked properties rerender when updated; [integration] jit :: strict mode: dynamic template values :: Can pass curried helper as argument and invoke dynamically. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
`for…of` over the reference's bookkeeping Map goes through gxt's reactive Map.prototype iterator patch, which registers the Map with the reading formula; the rest of gxt-backend iterates such Maps with `forEach` for that reason. No behaviour change: the three [integration] modules, the new tests and the `--filter "[integration]"` / `--filter Helper` runs give the same results as the baseline generated from 996d0c9. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…he same `<X @f={{fn this.greet "x"}} />` re-rendered forever in a renderComponent root. The compat compiler emits the argument as a getter that calls `$__fn` on every read, and `$__fn` returned a new function each time. The manager compares an argument by identity, so every sync saw a change: it wrote the value back to the component and dirtied the argument, which scheduled the next sync. Glimmer's `fn` is one function per call site; the function reads the callback and the partial arguments when it is called. Now: - an `(fn …)` value records the callback it binds and calls through a replaceable implementation (utils.ts `createFnHelperValue`); a `(mut this.x)` cell records what it writes, so two cells of one call site bind the same callback; - a component argument reads through a slot per component and argument name, shared by the instance's arg getter, the args proxy and a re-render's new getter. The slot keeps its `(fn …)` value while a new evaluation binds the same callback, and takes that evaluation's implementation, so a call still reads the current callback and arguments (`keepFnHelperValue`). Reading an argument writes no reactive state. Tests in helper-args-test.ts: three renderComponent-root hangs (direct, with a changing partial argument, with `(fn (mut …))`), one function per call site for a template-only and a classic component, a changed callback, and a stashed function reading its current arguments. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…e run loop
`{{join-words this.list}}` (and `{{this.list.length}}`, and `{{#each}}`
over the array) kept the old value after `runTask(() => list.push('c'))`.
The formula that read the array does subscribe to the array's collection
cell, but nothing rendered the change: `dirtyCollection` invalidated the
cell and scheduled a `syncDom()` microtask, and before that microtask ran,
the run loop's DOM sync (`_gxtSyncDomNow`) — taking its non-property
branch, since no property change was recorded — cleared gxt's pending
invalidations as initial-render noise, the collection cell's with them.
Glimmer: dirtying a tag schedules a revalidation, rendered when the run
loop ends. A trackedArray change now does what a `@tracked` write does
(glimmer-tracking.ts `trackedSet`): it records a pending state change
(only the pending sync while a render is in progress) and schedules a
revalidation, besides the coalesced flush (validator.ts
`_scheduleNativeCollectionFlush`).
Scoped to the native-cell collection (trackedArray's `collection` tag).
The storage-wrapped collections (trackedMap/Set/Object, `cell()`) go
through `dirtyTag` and keep their behaviour: recording their changes too
made a `renderComponent` root compute a helper over a trackedObject four
times (the classic reactor re-renders the root, then the sync re-ran the
previous render's formulas), a regression of the Helper Managers
"plain functions entangle with any tracked data" test.
Tests in helper-args-test.ts: a trackedArray helper argument, a
trackedArray component argument, and length / plain-function /
custom-manager reads of one trackedArray changed by push and splice.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
📊 Size reportTarball size — dist/dev 0.3%↑
Show files (21 files)
dist/prod -38.7%↓
Show files (187 files)
smoke-tests/v2-app-template/dist 0.2%↑
smoke-tests/v2-app-hello-world-template/dist 0%↑
🤖 This report was automatically generated by wyvox/pkg-size |
…text
A helper inside a template-only component received the component's render
context as its named arguments (`{ $fw, args, attrs }`), and one inside a
block of it the block's context, inside a Glimmer component the instance's
own arg properties. `$_maybeHelper_ember` guessed which of its third and
fourth arguments was the hash and which the context from the third one's
shape, and the shape checks missed those contexts.
gxt's emission decides it: a call by NAME passes the render context last
(`(name, positional, ctx)`, or `(name, positional, named, ctx)` with named
arguments); a call of a BINDING passes `(definition, positional, named)`;
Ember-side callers pass all four. So with four arguments the third is the
hash, a name's third argument is its context, and a binding's third
argument is a context only after compile.ts's scope rewrite turned a name
call into a binding call, recognised by gxt's component id
(`COMPONENT_ID_PROPERTY`), which every render context carries and a hash
never does. The strict-mode `$_maybeHelper` shadow now forwards the call's
own arguments, so their number survives it.
Glimmer: a helper's named arguments are exactly the call site's
`key=value` pairs. New helper-call-site-test.ts: a custom-manager and a
function helper in a template-only component, in its blocks, in a Glimmer
component, and a strict-mode scope helper.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Owner-registered helpers (a `setHelperManager` definition, a classic
`Helper` class) were cached per helper NAME: two sibling
`{{counting "a"}}{{counting this.b}}` shared one instance (`[a1][b2]`),
every `{{#each}}` row shared it, and tearing down one call site's
`{{#if}}` branch did not touch the others' state because they were the
same object.
Glimmer creates one helper instance per call site and render scope. The
compat call (`$_maybeHelper("counting", ["a"], this)`) carries the render
scope (`this`, or a block's context) but nothing that tells two call
sites in one scope apart. Now:
- an AST transform (ast-transforms.ts `gxtHelperCallSiteTransform`) gives
each helper call site a process-unique id, passed as a `__gxtSite`
named argument. It marks only calls gxt emits as `$_maybeHelper` by
NAME with at least one positional argument (not keywords, block params,
scope values, or zero-argument / named-only calls, whose emission must
stay exact);
- `$_maybeHelper_ember` takes the id out of the named arguments and keys
the helper bucket / classic instance by (render scope, site), in a map
whose entries are destroyed when gxt destroys the scope (an `{{#if}}`
branch, an `{{#each}}` row, a component); calls without an id keep the
name-keyed cache.
New tests in helper-call-site-test.ts: two sibling call sites keep
separate state, destroying an `{{#if}}`'d call site leaves the other,
`{{#each}}` rows get one instance each, a custom manager creates one
helper per call site. Known gaps (no site id): templates compiled at
build time by gxt's own plugin, binding calls (gxt passes no render
scope with them), zero-argument and named-only calls.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
lifeart
force-pushed
the
ci-scratch-hang2
branch
from
October 13, 2026 12:24
15bed2c to
430658f
Compare
Regenerated from the compat full run on 430658f (961 modules, 8804/9948, no timeouts, no harness errors, no green->red against the previous baseline). Against it: +20 tests in the two extended GXT helper args modules and the two new GXT helper call sites modules, all green; 20 red->green elsewhere: - Components test: contextual components (classic component): GH#14508 rest positional params passed as a named parameter (2); - Components test: curly components (classic component): can use hash parameter instead of arbitrary positional param [GH emberjs#12444]; - Helper Tracked Properties: array properties / getters / tracked properties rerender when updated (3); - Syntax test: {{#let as}}: can access alias of an array; - The <LinkTo /> and {{link-to}} components: it works in an #each'd array of string route names (2); - [integration] jit :: initial render (client): 9 helper / literal tests; - [integration] jit :: trackedArray() (rendering): {{each}} works with new items / when updating old items. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
lifeart
added a commit
that referenced
this pull request
Oct 16, 2026
…ble-component changes Both baselines are regenerated from the GitHub Actions runs on the code of 227a04d (GXT full 38887215533, GXT native 38887215405). Compat full: 9829/10161 (was 9781/10161), 998 modules, no timeouts, no harness errors, no green->red. 36 tests no longer fail (42 rows, counting the parent modules' re-reports of their sub-modules' tests). Green (12): - curried-component boundary comments ignored by the integration assertions: "[BUG] Gracefully handles application of curried args when invoke starts with 0 args", "has-block works within a yielded curried component invoked within mustaches", "has-block-params from within a yielded + invoked curried component", "helpers passed as arguments to {{component}} are not torn down when switching between blocks"; - GXT anchor comments ignored: "Helpers test: {{element}} :: it renders when the tag name changes" (also green in the native suite) and "block helpers whose template has a morph at the edge"; - the 5 "[components] appendable components" tests (the jit delegate's GXT curried component, and a curried-component binding that renders text); - "modifiers do not run in the server render but run in the client render" (rehydration). Skipped under GXT (24), each with its reason in the harness: - [integration] jit :: #each: "When re-iterated via swap #1" to "#9, the original references are updated" (9): they verify only the Glimmer VM's LOCAL_DEBUG 'list-updates' steps. - [integration] jit :: Components :: -with-dynamic-vars and -get-dynamic-var, Curly / Dynamic / Glimmer: "Can get and set dynamic variable", "... with bound names", "Can shadow existing dynamic variable" (9): dynamic variables other than outletState, which only the VM's default DynamicScopeImpl stores; Ember's dynamic scope supports outletState only. - [integration] rehydration :: rehydration (4), rehydration stats: "curly invocation of a classic Component: multiple invocations", "... mismatched multiple invocations", "{{component}} invocation: component invocations", "{{component}} invocation: interacting with builtins". - integration - [glimmer-compiler] Compile options: "moduleName option is passed into meta" (1): reads the opcode compiler's template meta. - [integration] jit serialization :: Server-side rendering in Node.js (serialize): "Null literals do not have representation in DOM" (1): Glimmer's serialization markers. The 6 modules with new skips run fewer assertions (the skipped tests run none), so their passing-assertion counts drop by those; no other module has fewer passing tests or assertions. "ember-template-compiler: custom plugins passed to compile" stays a known red: the module declares no tests in any build, and the runner's per-module filter reports that. Native full: 7158/7191 (was 7157/7191), 683 modules, no green->red; the {{element}} tag-name test turned green; 33 known reds remain. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.
Fork-internal CI scratch for the hang2 worker (gxt-rebase-main commits on top of upstream main a9501d5). Do not merge; closed and deleted when the run is done.
🤖 Generated with Claude Code