Fold the search sheet / card chooser SearchContent tree into <SearchResults>#5293
Fold the search sheet / card chooser SearchContent tree into <SearchResults>#5293habdelra wants to merge 3 commits into
Conversation
…esults> Render the search sheet and card chooser through the v2 <SearchResults> component family and delete the deprecated SearchContent / SearchResultSection / ItemButton tree. A thin panel-content wrapper owns the nested <SearchResults> queries; a sheet-results presenter derives the realm / recents / URL-paste sections, multiselect, the Adorn treatment, pagination, and the result count in getters over the yielded entries. Behavior and the data-test contract are preserved. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Preview deploymentsHost Test Results 1 files + 1 1 suites +1 1h 56m 24s ⏱️ + 1h 56m 24s Results for commit 4af861e. ± Comparison against earlier commit 11373f8. Realm Server Test Results 1 files ±0 1 suites ±0 12m 24s ⏱️ +16s Results for commit 4af861e. ± Comparison against earlier commit 11373f8. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR consolidates the search sheet / card chooser results rendering into the v2 <SearchResults> component family, removing the legacy SearchContent → SearchResultSection → ItemButton tree and migrating Adorn/type-label behavior to rely on entry view-model data.
Changes:
- Replaces
ItemButtonusage with a new unifiedSearchResultTileand updates Adorn/type-label tests accordingly. - Introduces
SheetResultsto derive sections, pagination, result counts, and header state from yielded<SearchResults>values. - Adds
LiveRecentsProviderto lazily resolve live recents only when prerendered recents search fails; deletes the deprecatedItemButton.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/host/tests/integration/components/card-search-adorn-test.gts | Updates integration tests to assert Adorn label/icon behavior via RenderableSearchEntryLike + SearchResultTile. |
| packages/host/app/components/card-search/sheet-results.gts | New presenter component that lays out realm/recents/URL sections and derives summary/count/pagination from yielded results. |
| packages/host/app/components/card-search/search-result-section.gts | Swaps row rendering from ItemButton to ResultTile and updates component naming/docs. |
| packages/host/app/components/card-search/search-content.gts | Refactors search pane to use nested <SearchResults>, delegates layout to SheetResults, and moves live-recents fallback out. |
| packages/host/app/components/card-search/result-tile.gts | New tile component that renders entry/live-card/new-card rows and implements Adorn chrome. |
| packages/host/app/components/card-search/panel.gts | Updates panel to render PanelContent instead of legacy SearchContent. |
| packages/host/app/components/card-search/live-recents-provider.gts | New component that enables lazy live-recents loading only when prerendered recents errored. |
| packages/host/app/components/card-search/item-button.gts | Deletes deprecated legacy row renderer. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ch-fold-the-search-sheet-card-chooser
Folds the search sheet and card chooser's bespoke
SearchContent → SearchResultSection → ItemButtontree into the v2<SearchResults>component family, so the platform renders all search results through one surface. The three@deprecatedcomponents are deleted.Structure
panel-content.gts— owns the realm + recentssearch-entryqueries, pagination, and the URL-pastegetCard; renders the nested<SearchResults>instances (plus the live-recents fallback) and hands their yielded streams to the presenter.sheet-results.gts— lays the yielded entries out into the realm / recents / URL-paste sections, with the header, multiselect, the Adorn treatment, pagination, and the result count, all derived in getters over the yielded results.result-section.gts/result-tile.gts— section layout and per-row chrome (selection + Adorn) wrapping each<entry.component />. The Adorn type label now comes from the view-model (entry.displayName/entry.iconHtml) instead of scraping the rendered card DOM.live-recents-provider.gts— resolves recents as live cards only when the prerendered recents search errors (a lazygetCardCollectionthat loads nothing on the happy path).The wrapper owns the
<SearchResults>instances and only passes yielded values down; the presenter derives everything in getters over those values, keeping the search field and the per-row components render-stable.Behavior preserved
Sections + headers, multiselect (incl. select-all), the Adorn treatment, URL paste, the live-recents fallback, pagination (Show More / Show Only), the result count, and component stability while typing — the search field never re-mounts mid-search. The
<SearchResults>resources are construct-once and vary only through their@querythunk; rows render through the identity-memoizedentry.component. Thedata-testcontract the search-sheet / card-chooser tests rely on is unchanged.Testing
Locally against the dev stack (fresh
dist):card-chooser,operator-mode card chooser / links / ui,result-tile (adorn), the selection menu, the v2search-results+@context.searchResultsComponenttests,create-file, andinteract-submodeall pass.pnpm lint(types + js + hbs) is green.