Add FileDef support for prerendered search #4035
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for FileDef types in the prerendered search pipeline. When a query filters on FileDef or its subclasses (like MarkdownDef), the system now correctly routes the query through the prerendered search engine with the appropriate entry type, enabling file-meta entries to be returned as prerendered cards.
Changes:
- Route file-meta queries through the prerendered search pipeline by detecting FileDef type filters
- Add
entryTypeparameter toIndexQueryEngine.searchPrerendered()to distinguish between instance and file queries - Add comprehensive test coverage for FileDef and MarkdownDef prerendered search scenarios
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/runtime-common/realm-index-query-engine.ts | Detect file-meta queries using queryTargetsFileMeta() and pass appropriate entryType to searchPrerendered() |
| packages/runtime-common/index-query-engine.ts | Add entryType parameter with default value to searchPrerendered() method |
| packages/realm-server/tests/search-prerendered-test.ts | Add comprehensive test coverage for file-meta queries including FileDef, MarkdownDef, fitted/embedded formats, and exclusion of card instances |
| packages/host/tests/integration/components/prerendered-card-search-test.gts | Add integration test for searching markdown files using FileDef type filter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Preview deployments |
Route file-meta queries through the prerendered search pipeline by detecting FileDef type filters via queryTargetsFileMeta() and passing the appropriate entryType to IndexQueryEngine.searchPrerendered(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3c4390d to
04a4269
Compare
Host Test Results 1 files ±0 1 suites ±0 1h 42m 31s ⏱️ + 2m 24s For more details on these errors, see this check. Results for commit 04a4269. ± Comparison against base commit 8d45ff7. |
Route file-meta queries through the prerendered search pipeline by detecting FileDef type filters via queryTargetsFileMeta() and passing the appropriate entryType to IndexQueryEngine.searchPrerendered().