feat(search): add native Smart catalogue matching - #2508
Conversation
…es-20260901 # Conflicts: # data/repo-awareness-snapshot.json
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_34901acd-c7c8-49db-97b7-eb748859f31d) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c65f5b5c83
ℹ️ 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".
CI triageCI failed on this PR. Automated classification of the 3 failed job(s):
Compared with main CI run #14717 (success). That run's conclusion is an aggregate and did not exercise Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_e4394dc1-40b6-4f58-ac87-7675e4ba6754) |
|
Final PR sweep
After that verification, GitHub automatically squash-merged the PR at 2026-09-01T15:59:42Z as 410f596. Auto-merge had been enabled by BigSimmo; I did not enable, disable, modify, merge, or close the PR. |
…iering branch Bundled into this PR rather than pushed as a separate ledger-only tip, matching how every recent review record landed (#2517, #2508, #2504). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ou4w8atP9kDKHVAXUvYPe
Summary
Verification
npm run verify:pr-local— ran on the merged feature tree. Runtime, installed-lock parity, formatting, sitemap, repository snapshot, documentation checks, ledger guards, lint, and typecheck passed. The full suite reported 11,756 passes and six failures only because Windows resolvedbashto the WSL launcher (exit 127); with Git Bash first onPATH, the untouchedclaude-cloud-profile.test.tspassed 24/24. Build and the three not-reached static checks were then run directly and passed. GitHub checks are authoritative for the final pushed head.npm run build— production compilation, TypeScript, 1,998 static pages, and client-bundle secret scan passed.npm run check:rag:fixtures— 36 golden cases across 26 suites passed.npm run check:medication-interactions— 531-row index current.npm run check:medication-lexicon-report— 37 catalogue terms current.npm run docs:check-links— 4,727 repository path references resolved.npm run verify:ui— not repeated as an equivalent broad UI gate; focused browser coverage targets the changed behaviour and GitHub will run final-head UI lanes.npm run verify:release— not run; this is a dormant/provider-free catalogue search PR, not a release or deployment action.Risk and rollout
Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
> [!NOTE]
> Medium Risk
> Changes deterministic catalogue ranking and composer routing in clinically sensitive Medication search and suppresses federated escape paths during Smart NL; behaviour is bounded by tests and retrieval-only medication semantics, but ordering and suppressed shortcuts affect how clinicians discover content.
>
> Overview
> Extends provider-free Smart natural-language search to Medication (prescribing), Tools, Calculators, Factsheets, and Dictionary by growing the shared
smart-search-intentallowlist, adding mode-scoped expansion rules, and threading those terms into each mode’s existing deterministic matchers while keeping the rawqin the URL and composer.>
> For these five local-only Smart states, natural-language queries stop universal-search / also-matches and hide Documents, Answer, and Favourites shortcuts in the command surface (literal lookups keep prior cross-mode behaviour). Tools uses
rankToolRecordson launcher and results pages and filters Ask/Documents/Favourites during Smart NL; Medication applies expansions for ranking only—Smart terms never surface in query analysis, and expansion-only API hits are labeled Related match rather than implying clinical suitability.>
> Governance and search-chrome docs plus design/plan artefacts document the boundary; repo-awareness-snapshot and broad unit/DOM/e2e tests cover intent, counts, guest Favourites gates, and zero Clinical Ask/universal requests.
>
> Reviewed by Cursor Bugbot for commit c65f5b5. Configure here.
Note
Medium Risk
Changes deterministic ranking and composer routing in Medication and five catalogue modes, including suppressed federated escape paths during Smart NL; behaviour is test-bounded and medication remains retrieval-only, but result order and discoverability affect clinicians.
Overview
Adds provider-free Smart natural-language search to Medication, Tools, Calculators, Factsheets, and Dictionary by extending
smart-search-intent(new mode rules,smartLocalOnlyModeIds, tighter compact-code handling) and threading bounded expansions into each mode’s existing deterministic matchers while keeping the raw query in the URL and composer.For those five modes in natural-language Smart state, the PR turns off universal typeahead and also-matches and hides Documents, Answer, and Favourites shortcuts in the command surface and Tools launcher; literal lookups keep prior cross-mode behaviour. Medication uses expansions for ranking only (not analysis chips) and the API labels expansion-only hits Related match so Smart retrieval is not read as clinical suitability.
Ranking fixes prioritise embedded catalogue identities (factsheet titles/brands, dictionary terms/abbreviations, calculator codes) ahead of expansion-only matches. Tools hub/results share one ranked query path via
rankToolRecords.Governance and search-chrome docs, design/plan artefacts, repo snapshot, and focused unit/DOM/e2e tests document and lock the boundary (zero Clinical Ask/universal requests in the five-mode matrix).
Reviewed by Cursor Bugbot for commit a4d6007. Configure here.