[codex] Build typed global search results#173
Conversation
ced8e5e to
95c15d8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95c15d8b53
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| const tokens = normalized.split(/[^a-z0-9:_-]+/).filter(Boolean); | ||
| if ( | ||
| profile.terms.every((term) => | ||
| tokens.some((token) => token === term || token.startsWith(term)), |
There was a problem hiding this comment.
Match multi-term queries across all searchable fields
The new ranking logic only accepts a result when all query terms are found inside a single field (title, subtitle, one keyword, etc.), because matchTextField evaluates one field at a time and bestTextMatch never combines evidence across fields. This regresses searches where terms are intentionally split across fields (for example, "home dashboard" for Overview, where both are separate keywords), so valid results are now dropped even though all terms exist on that result.
Useful? React with 👍 / 👎.
Summary
ui-tauri/src/components/kb/search/.Validation
pnpm --dir ui-tauri exec vitest run src/components/kb/search/ranking.test.ts src/lib/transactionLookup.test.tspnpm --dir ui-tauri run typecheckhttp://127.0.0.1:5176: exact txid Enter opens/transactions?tx=tx1with the detail drawer, no-match txid state renders, BTCPay search opens the setup dialog, and arrow-key Enter follows the highlighted result../scripts/quality-gate.sh