Skip to content

Fold the search sheet / card chooser SearchContent tree into <SearchResults>#5293

Open
habdelra wants to merge 3 commits into
mainfrom
cs-11683-unified-search-fold-the-search-sheet-card-chooser
Open

Fold the search sheet / card chooser SearchContent tree into <SearchResults>#5293
habdelra wants to merge 3 commits into
mainfrom
cs-11683-unified-search-fold-the-search-sheet-card-chooser

Conversation

@habdelra

Copy link
Copy Markdown
Contributor

Folds the search sheet and card chooser's bespoke SearchContent → SearchResultSection → ItemButton tree into the v2 <SearchResults> component family, so the platform renders all search results through one surface. The three @deprecated components are deleted.

Structure

  • panel-content.gts — owns the realm + recents search-entry queries, pagination, and the URL-paste getCard; 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 lazy getCardCollection that 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 @query thunk; rows render through the identity-memoized entry.component. The data-test contract 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 v2 search-results + @context.searchResultsComponent tests, create-file, and interact-submode all pass. pnpm lint (types + js + hbs) is green.

…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>
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Preview deployments

Host Test Results

    1 files  +    1      1 suites  +1   1h 56m 24s ⏱️ + 1h 56m 24s
3 136 tests +3 136  3 121 ✅ +3 121  15 💤 +15  0 ❌ ±0 
3 155 runs  +3 155  3 140 ✅ +3 140  15 💤 +15  0 ❌ ±0 

Results for commit 4af861e. ± Comparison against earlier commit 11373f8.

Realm Server Test Results

    1 files  ±0      1 suites  ±0   12m 24s ⏱️ +16s
1 740 tests ±0  1 740 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 833 runs  ±0  1 833 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 4af861e. ± Comparison against earlier commit 11373f8.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ItemButton usage with a new unified SearchResultTile and updates Adorn/type-label tests accordingly.
  • Introduces SheetResults to derive sections, pagination, result counts, and header state from yielded <SearchResults> values.
  • Adds LiveRecentsProvider to lazily resolve live recents only when prerendered recents search fails; deletes the deprecated ItemButton.

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.

Comment thread packages/host/app/components/card-search/panel.gts
Comment thread packages/host/app/components/card-search/sheet-results.gts
Comment thread packages/host/app/components/card-search/result-tile.gts
@habdelra habdelra requested a review from a team June 19, 2026 20:09
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.

3 participants