Skip to content

refactor: migrate boxel-cli and vscode-boxel-tools search to /_federated-search-v2 (data-only)#5291

Open
habdelra wants to merge 2 commits into
mainfrom
cs-11589-unified-search-migrate-remaining-direct-http-consumers-to-v2
Open

refactor: migrate boxel-cli and vscode-boxel-tools search to /_federated-search-v2 (data-only)#5291
habdelra wants to merge 2 commits into
mainfrom
cs-11589-unified-search-migrate-remaining-direct-http-consumers-to-v2

Conversation

@habdelra

@habdelra habdelra commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Moves the two remaining direct-HTTP search consumers — boxel-cli and vscode-boxel-tools — off the legacy /_federated-search and /_search endpoints onto the v2 search-entry endpoints. Both issue data-only queries; neither renders HTML.

boxel-cli

commands/search.ts posts to /_federated-search-v2. Callers still author ordinary card-rooted queries; search() rewrites them into the item.-addressed search-entry grammar (type/onitem.on, field operators and sort keys gain the item. prefix), requests fields[search-entry]=item, and returns the item serializations the endpoint links in included — the same card/file-meta resources the old top-level data array carried. SearchResult and the CLI surface are unchanged; parse.ts consumes search() results and needs no change.

vscode-boxel-tools

skills.ts skill discovery posts to _search-v2 with the data-only fieldset, anchored on item.on Skill and sorted by item.title, reading the skill item serializations out of included.

Why data-only

fields[search-entry]=item resolves to html: false server-side, so no prerendered html (and therefore no scoped css, which only rides under html.styles) is emitted — the payload carries only the serializations, never markup.

Tests

  • New search-query.test.ts pins the card-rooted → search-entry translation and the item-from-included flattening, including that the data-only fieldset is always requested.
  • The ingest-card-graph fake realm speaks the v2 data-only contract and asserts every request carries fields[search-entry]=item.
  • The boxel-cli search + spec-discovery integration tests pass against a live /_federated-search-v2.

With these moved, the legacy /_federated-search and /_search endpoints have no remaining consumers.

🤖 Generated with Claude Code

…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>
Comment thread packages/boxel-cli/src/commands/search.ts

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

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 the search-entry wire grammar and flattening results from included.
  • Update vscode-boxel-tools skill discovery to call /_search-v2 with item.* addressing and extract Skill item serializations from included.
  • 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.

Comment thread packages/vscode-boxel-tools/src/skills.ts
Comment thread packages/boxel-cli/tests/commands/search-query.test.ts Outdated
Comment thread packages/boxel-cli/src/commands/search.ts Outdated
Comment thread packages/boxel-cli/src/commands/search.ts Outdated
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>
@habdelra habdelra requested a review from a team June 19, 2026 13:57
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Host Test Results

    1 files      1 suites   1h 57m 7s ⏱️
3 114 tests 3 099 ✅ 15 💤 0 ❌
3 133 runs  3 118 ✅ 15 💤 0 ❌

Results for commit 2513ca3.

Realm Server Test Results

    1 files      1 suites   13m 16s ⏱️
1 740 tests 1 740 ✅ 0 💤 0 ❌
1 833 runs  1 833 ✅ 0 💤 0 ❌

Results for commit 2513ca3.

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