From 95bd7af844d960d466d85b9b6bf3bed1b6372faf Mon Sep 17 00:00:00 2001 From: Hassan Abdel-Rahman Date: Fri, 19 Jun 2026 09:35:21 -0400 Subject: [PATCH 1/3] Migrate experiments-realm card source to the v2 search surface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the first-party realm card source off the deprecated `@context.prerenderedCardSearchComponent` and onto the v2 `@context.searchResultsComponent` (``) surface, via the `@context` search codemod plus hand-fixes for the shapes it cannot transform mechanically. Only experiments-realm carries prerendered-card-search usages: base declares the (deprecated) `@context` member itself, and catalog / skills-realm have none. - components/grid.gts — codemod-migrated: the query is adapted through `searchEntryWireQueryFromQuery`, `<:response>` becomes `{{#each results.entries}}`, and rows are addressed by `id`. - components/card-list.gts — its loop yields each row to a `:meta` block, so it has no direct `{{#each}}` the codemod can reshape. The block now yields a `RenderableSearchEntryLike`; the `embedded` format is bound through the query's `htmlQuery` field. - app-card.gts — the result list is handed to the local `TableView` / `CardsGrid` components, so it is not a direct `{{#each}}` either. Those components now take `RenderableSearchEntryLike[]` and address rows by `id`. - blog-app.gts — its `CardList` `:meta` consumer reads the yielded row's `id`. Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/experiments-realm/app-card.gts | 55 +++++++++++-------- packages/experiments-realm/blog-app.gts | 10 ++-- .../components/card-list.gts | 52 +++++++++++------- .../experiments-realm/components/grid.gts | 37 +++++++------ 4 files changed, 89 insertions(+), 65 deletions(-) diff --git a/packages/experiments-realm/app-card.gts b/packages/experiments-realm/app-card.gts index bacfa80556..ffa91162dc 100644 --- a/packages/experiments-realm/app-card.gts +++ b/packages/experiments-realm/app-card.gts @@ -20,7 +20,9 @@ import { and, bool, cn } from '@cardstack/boxel-ui/helpers'; import { type Query, baseRealm, - type PrerenderedCardLike, + type RenderableSearchEntryLike, + type SearchEntryWireQuery, + searchEntryWireQueryFromQuery, } from '@cardstack/runtime-common'; import { hash } from '@ember/helper'; import { on } from '@ember/modifier'; @@ -64,7 +66,7 @@ export class Tab extends FieldDef { } class TableView extends GlimmerComponent<{ - Args: { cards: PrerenderedCardLike[]; context?: CardContext }; + Args: { cards: RenderableSearchEntryLike[]; context?: CardContext }; }> {