refactor: migrate boxel-cli and vscode-boxel-tools search to /_federated-search-v2 (data-only)#5291
Open
habdelra wants to merge 2 commits into
Open
Conversation
…ted-search-v2 (data-only) boxel-cli search() and vscode-boxel-tools skill discovery now issue v2 search-entry queries with the data-only fieldset (fields[search-entry]=item) and read the item serializations out of the document's included, instead of the legacy /_federated-search and /_search top-level data array. SearchResult, the CLI surface, and the skill tree are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
habdelra
commented
Jun 19, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the remaining direct-HTTP search consumers (boxel-cli and vscode-boxel-tools skill discovery) off the legacy search endpoints and onto the v2 search-entry endpoints, using the data-only fieldset (fields[search-entry]=item) and resolving item serializations from included.
Changes:
- Update boxel-cli federated search to call
/_federated-search-v2, translating legacy card-rooted queries into thesearch-entrywire grammar and flattening results fromincluded. - Update vscode-boxel-tools skill discovery to call
/_search-v2withitem.*addressing and extract Skillitemserializations fromincluded. - Add/adjust tests to pin the query translation + included-flattening behavior and update the ingest-card-graph fake realm to speak the v2 data-only contract.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/vscode-boxel-tools/src/skills.ts | Switch skill discovery to /_search-v2 data-only search-entry queries and resolve results from included. |
| packages/boxel-cli/src/commands/search.ts | Implement v2 request-body translation helpers and return flattened item serializations from /_federated-search-v2. |
| packages/boxel-cli/src/lib/boxel-cli-client.ts | Update client documentation to reflect v2 endpoint + item-serialization return shape. |
| packages/boxel-cli/tests/commands/search-query.test.ts | New unit tests for query translation and data-only search-entry doc flattening. |
| packages/boxel-cli/tests/commands/ingest-card-graph.test.ts | Update fake search responses to v2 data-only search-entry documents and assert fieldset usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
habdelra
commented
Jun 19, 2026
habdelra
commented
Jun 19, 2026
Extract resourceIdentity + RESOURCE_IDENTITY_SEPARATOR into a dependency-free runtime-common/resource-identity.ts leaf (re-exported from resource-types) so boxel-cli can import the canonical identity helper without pulling the index's url-style base imports. boxel-cli's search uses it for the included-resource lookup instead of a hand-rolled key. Document why the search-entry doc type is a local structural shape, and fix a test-name typo. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
backspace
approved these changes
Jun 19, 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.
Moves the two remaining direct-HTTP search consumers — boxel-cli and vscode-boxel-tools — off the legacy
/_federated-searchand/_searchendpoints onto the v2search-entryendpoints. Both issue data-only queries; neither renders HTML.boxel-cli
commands/search.tsposts to/_federated-search-v2. Callers still author ordinary card-rooted queries;search()rewrites them into theitem.-addressed search-entry grammar (type/on→item.on, field operators and sort keys gain theitem.prefix), requestsfields[search-entry]=item, and returns theitemserializations the endpoint links inincluded— the samecard/file-metaresources the old top-leveldataarray carried.SearchResultand the CLI surface are unchanged;parse.tsconsumessearch()results and needs no change.vscode-boxel-tools
skills.tsskill discovery posts to_search-v2with the data-only fieldset, anchored onitem.onSkill and sorted byitem.title, reading the skillitemserializations out ofincluded.Why data-only
fields[search-entry]=itemresolves tohtml: falseserver-side, so no prerenderedhtml(and therefore no scopedcss, which only rides underhtml.styles) is emitted — the payload carries only the serializations, never markup.Tests
search-query.test.tspins the card-rooted → search-entry translation and the item-from-includedflattening, including that the data-only fieldset is always requested.ingest-card-graphfake realm speaks the v2 data-only contract and asserts every request carriesfields[search-entry]=item./_federated-search-v2.With these moved, the legacy
/_federated-searchand/_searchendpoints have no remaining consumers.🤖 Generated with Claude Code