Skip to content

fix: rename search-entry resource type to entry#5398

Open
habdelra wants to merge 1 commit into
mainfrom
cs-11759-prerender-split-rename-search-entry-entry
Open

fix: rename search-entry resource type to entry#5398
habdelra wants to merge 1 commit into
mainfrom
cs-11759-prerender-split-rename-search-entry-entry

Conversation

@habdelra

@habdelra habdelra commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The JSON:API resource type that search results ride on is renamed from search-entry to entry, and the sparse-fieldset key follows: fields[search-entry]fields[entry]. One resource type now names a result entry independent of how it is sourced — today the search collection; a single-instance GET can reuse the same resource as-is.

Server and host change together here because they deploy together and the wire literal is load-bearing on both sides: type guards key on type === 'entry' and the query parser rejects any other fields key.

What's renamed:

  • The wire literaltype: 'entry' on every result resource /_search and /_federated-search emit, the fields[entry] sparse-fieldset key (parser + serializer), and the fields[entry] URL param query-backed fields use.
  • The TS names that name the resource, so the identifiers match the wire value: SearchEntryResourceTypeEntryResourceType, SearchEntryResourceEntryResource, isSearchEntryResourceisEntryResource, buildSearchEntryResourcebuildEntryResource, SearchEntryCollectionDocumentEntryCollectionDocument, SearchEntryIncludedResourceEntryIncludedResource, isSearchEntryCollectionDocumentisEntryCollectionDocument.
  • Every consumer of the literal: host (store, search resources/components, host-mode head prefetch, file tree from index, OpenRouter model sync), boxel-cli (_federated-search request body + response flattening), vscode-boxel-tools skill discovery, the base boxel-development skill card's examples, and the search docs/skill.

The search-machinery vocabulary deliberately keeps its names — SearchEntryWireQuery and the other query/parser types, searchEntries, getSearchEntriesResource, RenderableSearchEntryLike, SearchEntryResults — those name the search operation, not the resource. File names (search-entry.ts, search-entries.ts, test files) likewise stay.

boxel-cli now sends fields[entry], so the republished CLI pairs with servers running this rename (hence the fix: patch bump).

Test plan: the existing suites pin the wire shape end-to-end — search-entry-test, search-entries-engine-test, the realm/server _search endpoint tests, host store/search-results/search-entries-resource tests, and boxel-cli's search-query tests — and all fixtures and assertions moved with the rename.

🤖 Generated with Claude Code

The JSON:API resource type search results ride on becomes 'entry'
(fields[search-entry] -> fields[entry]): one resource type for a result
entry regardless of how it is sourced. The resource-naming TS
identifiers follow the wire value (EntryResourceType, EntryResource,
isEntryResource, buildEntryResource, EntryCollectionDocument,
EntryIncludedResource, isEntryCollectionDocument), and every consumer
of the literal moves with it: host, boxel-cli, vscode-boxel-tools, the
base boxel-development skill card, and the search docs/skill. The
search-machinery vocabulary (SearchEntryWireQuery and the other
query/parser types, searchEntries, getSearchEntriesResource,
RenderableSearchEntryLike, SearchEntryResults) keeps its names - it
names the search operation, not the resource - and file names stay.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Changes in packages/base/Skill/boxel-development.json

Instructions Changes

--- /tmp/skill-diffs/old_instructions.txt	2026-07-03 14:32:07.921263161 +0000
+++ /tmp/skill-diffs/new_instructions.txt	2026-07-03 14:32:07.926263155 +0000
@@ -2569,7 +2569,7 @@
 `@context.searchResultsComponent` (the `<SearchResults>` component) renders a query as one heterogeneous stream: each result paints as fast prerendered HTML (hydrated lazily on interaction) or falls back to a live card — you never branch on which. It re-runs automatically when a subscribed realm reindexes.
 
 ```gts
-// ⁴⁹ Component with a dynamic search-entry query
+// ⁴⁹ Component with a dynamic entry query
 import {
   searchEntryWireQueryFromQuery,
   type SearchEntryWireQuery,
@@ -2578,7 +2578,7 @@
 export class Dashboard extends Component {
   realms = ['https://app.boxel.ai/sarah/tasks/'];  // Trailing slash!
 
-  // Build the search-entry query from an ordinary query, then add realms.
+  // Build the entry query from an ordinary query, then add realms.
   get urgentTasksQuery(): SearchEntryWireQuery {
     return {
       ...searchEntryWireQueryFromQuery({

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Preview deployments

Host Test Results

    1 files      1 suites   2h 33m 33s ⏱️
3 376 tests 3 361 ✅ 15 💤 0 ❌
3 395 runs  3 380 ✅ 15 💤 0 ❌

Results for commit cb02367.

Realm Server Test Results

    1 files      1 suites   9m 21s ⏱️
1 674 tests 1 674 ✅ 0 💤 0 ❌
1 753 runs  1 753 ✅ 0 💤 0 ❌

Results for commit cb02367.

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

Renames the JSON:API resource type used for search results from search-entry to entry across the realm-server + host + CLI surfaces, including the sparse-fieldset key migration from fields[search-entry] to fields[entry]. This keeps the “search” vocabulary for the operation while aligning the resource/type identifiers with the new wire literal.

Changes:

  • Update wire grammar literals: type: 'entry' and fields: { entry: [...] } (plus fields[entry] URL param usage).
  • Rename runtime-common resource/document types + guards/builders to match the new wire literal (Entry*), and update host/server/CLI consumers accordingly.
  • Refresh docs and skill documentation/examples to reflect the new wire contract.

Reviewed changes

Copilot reviewed 50 out of 51 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/vscode-boxel-tools/src/skills.ts Updates skill discovery _search request to use fields: { entry: ['item'] } and adjusts explanatory comments.
packages/runtime-common/search-results-component.ts Switches search results meta typing to EntryCollectionDocument and updates comments to the entry resource stream.
packages/runtime-common/search-entry.ts Migrates parser + wire-query typing/serialization from fields['search-entry'] to fields.entry, renames resource/document types used by helpers, and renames builder to buildEntryResource.
packages/runtime-common/resource-types.ts Renames resource-type constant/interface from SearchEntryResourceType/SearchEntryResource to EntryResourceType/EntryResource and updates exports.
packages/runtime-common/realm.ts Updates Realm.searchEntries() return type to EntryCollectionDocument and adjusts comments.
packages/runtime-common/realm-index-query-engine.ts Migrates search engine assembly types/guards/builders to Entry* and updates related comments.
packages/runtime-common/query-field-utils.ts Updates query-backed field URL param from fields[search-entry] to fields[entry].
packages/runtime-common/index.ts Re-exports updated Entry* document types/guards from document-types.ts.
packages/runtime-common/document-types.ts Renames SearchEntryCollectionDocument/SearchEntryIncludedResource to EntryCollectionDocument/EntryIncludedResource and updates the collection-document guard accordingly.
packages/runtime-common/card-document-shape.ts Renames runtime guard from isSearchEntryResource to isEntryResource and updates type discriminant constant.
packages/realm-server/tests/superseded-search-surface-removed-test.ts Updates guard-test prose to refer to entry as the search relationship resource type.
packages/realm-server/tests/server-endpoints/search-test.ts Updates federated-search test descriptions and request bodies to use fields: { entry: ... }.
packages/realm-server/tests/search-entry-test.ts Updates parser/builder/guard tests to the entry resource type and fieldset key.
packages/realm-server/tests/search-entries-engine-test.ts Updates engine tests to the Entry* document/resource types and fields.entry fieldsets.
packages/realm-server/tests/realm-endpoints/search-test.ts Updates realm _search endpoint tests to use fields: { entry: ... } and renames test descriptions.
packages/realm-server/tests/helpers/index.ts Updates helper comments describing the data-only projection to the entry model.
packages/realm-server/scripts/bench-realm/bench.ts Updates benchmark commentary to describe an entry-rooted query.
packages/realm-server/handlers/handle-search.ts Updates federated-search handler comments to describe the entry wire model and document.
packages/host/tests/unit/store-card-boundary-test.ts Updates boundary-test prose to call the raw format the entry wire format.
packages/host/tests/integration/store-test.gts Updates fixture documents to use type: 'entry' for search-result resources.
packages/host/tests/integration/store-search-test.gts Updates store-service searchEntries tests to use fields: { entry: ... } and assert entry.type === 'entry'.
packages/host/tests/integration/resources/search-entries-test.gts Updates resource tests to use EntryResourceType and fields.entry.
packages/host/tests/integration/realm-test.gts Updates test commentary for _search returning entry resources in data.
packages/host/tests/integration/components/search-results-test.gts Updates component fixtures/types to EntryResourceType/EntryIncludedResource and uses fields.entry.
packages/host/tests/integration/components/card-context-search-results-test.gts Updates acceptance-level test descriptions to refer to the entry stream/surface.
packages/host/tests/helpers/search-cards.ts Updates helper comments describing search results identity to refer to entry.
packages/host/tests/helpers/realm-server-mock/routes.ts Updates mock realm search types to return EntryCollectionDocument and adjusts comments.
packages/host/tests/acceptance/host-mode-test.gts Updates host-mode head-prefetch interception fixture to return type: 'entry' and request fields: { entry: ['html'] }.
packages/host/app/services/store.ts Updates response validation guard to isEntryCollectionDocument and updates raw-wire-format messaging/comments.
packages/host/app/services/host-mode-service.ts Updates head-prefetch query to request fields: { entry: ['html'] } and adjusts comments.
packages/host/app/resources/search-entries.ts Updates meta typing and comments to the entry wire query/document terminology.
packages/host/app/resources/file-tree-from-index.ts Updates file-tree search query to use fields: { entry: ['item.name'] } and adjusts comments.
packages/host/app/components/operator-mode/create-listing-modal.gts Updates inline comment to describe an entry query.
packages/host/app/components/operator-mode/code-submode/playground/playground-panel.gts Updates inline comments describing the query and entry id semantics.
packages/host/app/components/card-search/sheet-results.gts Updates component doc comment to refer to the entry stream.
packages/host/app/components/card-search/search-results.gts Updates component doc comment + error log message to refer to entry.
packages/host/app/components/card-search/result-tile.gts Updates comments describing icon/type-label data carried by entry rows.
packages/host/app/components/card-search/result-section.gts Updates comment describing rendering surface to reference entry.
packages/host/app/components/card-search/panel-content.gts Updates comments describing query adaptation and htmlQuery lifting to reference entry.
packages/host/app/commands/sync-openrouter-models.ts Updates search response guard usage and comments to refer to entry documents/resources.
packages/experiments-realm/components/card-list.gts Updates comment to describe an entry-rooted query.
packages/experiments-realm/app-card.gts Updates comment to describe an entry-rooted query.
packages/boxel-cli/tests/commands/search-query.test.ts Updates CLI tests to expect fields: { entry: ['item'] } and updates descriptions to entry grammar/doc terminology.
packages/boxel-cli/tests/commands/ingest-card-graph.test.ts Updates test comments to describe the entry grammar/doc shape.
packages/boxel-cli/src/commands/search.ts Updates request body typing and docs/comments to send fields: { entry: ['item'] } and describe the entry wire grammar.
packages/boxel-cli/src/commands/realm/ingest-card.ts Updates ingest commentary to reference fields[entry]=item and an entry document response.
packages/base/components/card-list.gts Updates comment to describe an entry-rooted query.
packages/base/card-api.gts Updates card-facing context docs to describe rendering the entry stream.
docs/search.md Updates HTTP API docs to describe the entry API and entry collection documents.
.claude/skills/search/SKILL.md Updates skill documentation to describe the entry API and fields[entry] usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@habdelra habdelra requested a review from a team July 3, 2026 18:36
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