Skip to content

Ember 6.10 upgrade#4115

Merged
ef4 merged 25 commits intomainfrom
ember-upgrade-6-10
Apr 1, 2026
Merged

Ember 6.10 upgrade#4115
ef4 merged 25 commits intomainfrom
ember-upgrade-6-10

Conversation

@ef4
Copy link
Copy Markdown
Contributor

@ef4 ef4 commented Mar 4, 2026

This is extracted out of the vite branch.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

Host Test Results

    1 files  ± 0      1 suites  ±0   2h 15m 38s ⏱️ - 12m 24s
2 091 tests ± 0  2 076 ✅ +15  15 💤 ±0  0 ❌ ± 0 
2 091 runs   - 15  2 076 ✅ +15  15 💤 ±0  0 ❌  - 15 

Results for commit bdcf18b. ± Comparison against base commit 1ff4d11.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
Chrome ‑ ember-qunit: Ember.onerror validation: Ember.onerror is functioning properly
Chrome ‑ Unit | isolated-render: render tears down the previous live tree before rerendering

♻️ This comment has been updated with latest results.

@ef4
Copy link
Copy Markdown
Contributor Author

ef4 commented Mar 5, 2026

Next step here is to pick one of the remaining host test failures and dig into it. Many probably share the same few causes.

I was investigating Integration | ai-assistant-panel | sending: displays retry button for message that failed to send and ran out of time before getting to the bottom of it.

ef4 and others added 12 commits March 30, 2026 12:27
The previous approach extracted a template via getComponentTemplate() and
rendered it through renderMain(). In Ember 6, strict-mode templates use
scope-based resolution instead of upvars, and the asLayout() path does
not preserve scope information. This caused "no free vars were found"
errors when rendering the wrapper template.

Switch to glimmerRenderComponent from @glimmer/runtime, which is the
API Ember 6's own ComponentRootState uses internally. This properly
handles strict-mode scope resolution and also fixes the missing
`result` variable bug from a prior refactor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Message.status was not @Tracked and MessageBuilder.updateMessage() never
updated it. When a message transitioned from "sending" to sent via
Matrix's LocalEchoUpdated event, the RoomResource would re-process
events and find the existing Message via clientGeneratedId, but
updateMessage() left status unchanged — keeping the is-pending CSS class
permanently applied.

Add @Tracked to Message.status and update it in updateMessage() so the
UI reflects the correct send state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cached or pre-compiled templates from realm servers may still use the
Ember 5 wire format where the block array has 4 elements:
[statements, symbols, hasEval, upvars]. Ember 6 changed this to 3
elements: [statements, locals, upvars].

The opcode compiler's meta() function destructures block[2] as upvars,
but for Ember 5 templates block[2] is the hasEval boolean (false),
causing the "no free vars were found" assertion to fire.

Detect the old format via block.length === 4 && typeof block[2] ===
'boolean' and extract upvars from block[3] instead. This allows a
safe rollout where existing cached templates continue to work while
new templates are compiled in the Ember 6 format.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lukemelia lukemelia force-pushed the ember-upgrade-6-10 branch from 1406276 to 73360a4 Compare March 30, 2026 20:59
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

Realm Server Test Results

  1 files  ±0    1 suites  ±0   12m 35s ⏱️ +28s
828 tests ±0  828 ✅ ±0  0 💤 ±0  0 ❌ ±0 
899 runs  ±0  899 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit bdcf18b. ± Comparison against base commit 1ff4d11.

♻️ This comment has been updated with latest results.

lukemelia and others added 2 commits March 30, 2026 17:16
uploadCards() stored entry.card.id (a resolved full URL like
http://localhost:4201/skills/Skill/boxel-environment) as the sourceUrl.
This broke lookups that use the portable prefix form
(@cardstack/skills/Skill/boxel-environment).

Use unresolveCardReference() to convert the URL back to its registered
prefix form, making sourceUrl stable across different environments.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lukemelia lukemelia force-pushed the ember-upgrade-6-10 branch from 73360a4 to 91add26 Compare March 30, 2026 21:17
lukemelia and others added 10 commits March 31, 2026 11:47
Commit 91add26 changed uploadCards() to call
unresolveCardReference(entry.card.id), but card.id is undefined for
cards that were never persisted (e.g. SearchCardsResult created by
the search command). The undefined value causes a TypeError in
unresolveCardReference when it calls resolvedURL.startsWith().

Guard against undefined by falling back to an empty string.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In .gts files, glint's @ts-expect-error directive only suppresses
the error on the immediate next line. For multi-line imports, the
TS2307 error on the `from` clause is beyond the directive's reach,
causing both "unused directive" and "cannot find module" errors.

Collapse the @glimmer/runtime import to a single line with
@ts-ignore (which is more permissive) and prettier-ignore to
prevent reformatting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In Ember 6.10, settled() no longer waits for the async work inside
functions invoked via debounce() from @ember/runloop. The debounce
timer fires and calls the async drainCommandProcessingQueue(), but
settled() sees the timer as resolved and returns before the async
processing completes. This caused search command tests to fail
because the command result was never visible when assertions ran.

Two fixes:
- Add @ember/test-waiters to drainCommandProcessingQueue and
  drainCodePatchProcessingQueue so settled() properly tracks the
  full async lifecycle of debounced processing.
- Replace await settled() with await waitFor('[data-test-command-
  result-header]') in search command tests for explicit waiting on
  the rendered result rather than relying on settlement heuristics.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tdout JSON parsing

Ember 6.10 added an unconditional console.log() deprecation warning to
dist/ember-template-compiler.js that prints to stdout whenever the legacy
AMD template compiler bundle is loaded:

  --------
  + Your app is using the legacy ember-template-compiler.js AMD bundle.
    This will be removed in ember-source 7.0.
  --------

This breaks the software-factory "factory:go" package script, which writes
its JSON summary to stdout via process.stdout.write(JSON.stringify(...)).
The test at factory-entrypoint.integration.test.ts:234 parses this output
with JSON.parse(result.stdout). With the deprecation warning prepended to
stdout, the parser encounters "\n\n--------" before the JSON. It interprets
the first "-" as a negative number sign, then fails on the second "-":

  SyntaxError: No number after minus sign in JSON at position 3
  (line 3 column 2)

The fix extends the existing patches/ember-source.patch (which already
patches several ember-source files) to remove the console.log call from
ember-template-compiler.js. The pnpm-lock.yaml hash updates are a
consequence of the patch content changing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In Ember 6.10 the SSE event that assigns newInstance.id can arrive while
hassan's auto-save is still pending its 500ms client-side delay, causing
waitUntil(() => newInstance.id) to resolve before hassan's onSaveSubscriber
fires. Guard the callback to only assert on newInstance's save.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use a positive conditional instead of early return to satisfy the
qunit/no-early-return lint rule.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ef4 ef4 force-pushed the ember-upgrade-6-10 branch from b2d8f4e to 4b68e1a Compare April 1, 2026 19:25
Originally introduced as a patch in fc65f24. Inadvertently dropped in cdfeb15. The fix is published upstream now, so using overrides to force it at all levels of deps.
@ef4 ef4 marked this pull request as ready for review April 1, 2026 20:45
@ef4
Copy link
Copy Markdown
Contributor Author

ef4 commented Apr 1, 2026

After discussions with @lukemelia and followup investigations, there's only one outstanding open question here, which is figured out what is consuming cached old-wire-format templates in our CI (making the patch of ember-source required). We're going to land this and then follow up on that part. We need to do that anyway because the wire format will change again (there are already more upstream wire format changes -- and it's not guarantee stable between any particular ember versions).

@ef4 ef4 merged commit 0d644c9 into main Apr 1, 2026
61 of 62 checks passed
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