fix: rename search-entry resource type to entry#5398
Open
habdelra wants to merge 1 commit into
Open
Conversation
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>
Contributor
Changes in packages/base/Skill/boxel-development.jsonInstructions 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({ |
Contributor
Contributor
There was a problem hiding this comment.
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'andfields: { entry: [...] }(plusfields[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.
backspace
approved these changes
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The JSON:API resource type that search results ride on is renamed from
search-entrytoentry, 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 otherfieldskey.What's renamed:
type: 'entry'on every result resource/_searchand/_federated-searchemit, thefields[entry]sparse-fieldset key (parser + serializer), and thefields[entry]URL param query-backed fields use.SearchEntryResourceType→EntryResourceType,SearchEntryResource→EntryResource,isSearchEntryResource→isEntryResource,buildSearchEntryResource→buildEntryResource,SearchEntryCollectionDocument→EntryCollectionDocument,SearchEntryIncludedResource→EntryIncludedResource,isSearchEntryCollectionDocument→isEntryCollectionDocument._federated-searchrequest body + response flattening), vscode-boxel-tools skill discovery, the baseboxel-developmentskill card's examples, and the search docs/skill.The search-machinery vocabulary deliberately keeps its names —
SearchEntryWireQueryand 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 thefix:patch bump).Test plan: the existing suites pin the wire shape end-to-end —
search-entry-test,search-entries-engine-test, the realm/server_searchendpoint 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