Skip to content

Add tappable phone suggestion ticker and conservative fuzzy catalog search - #1851

Merged
BigSimmo merged 22 commits into
mainfrom
codex/investigate-recent-regression-issues
Aug 13, 2026
Merged

Add tappable phone suggestion ticker and conservative fuzzy catalog search#1851
BigSimmo merged 22 commits into
mainfrom
codex/investigate-recent-regression-issues

Conversation

@BigSimmo

@BigSimmoBigSimmo commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Restore the phone suggestion ticker only on unsubmitted standalone mode homes, and prevent held ticker examples from becoming stale when the available examples change.
  • Add conservative typo recovery to catalog search while preserving field weights so title/name matches outrank incidental clinical-content mentions.
  • Add focused source, catalog, DSM, and submitted-root regression coverage.

Verification

  • npm run verify:pr-local — not run; the exact-head fix was bounded to the reviewed search/ticker regressions and the focused suites below.
  • node scripts/run-vitest.mjs run tests/audit-navigation-auth-regressions.test.ts tests/catalog-search.test.ts tests/dsm.test.ts --reporter=dot — 3 files, 37/37 tests passed.
  • npm run verify:ui
  • UI verification not run on the final fix head: the added submitted-root assertion is queued for hosted browser CI; focused source/DOM ownership assertions passed locally.
  • npm run verify:release — not run; no release-confidence claim is made.
  • npm run eval:retrieval:quality — not run because the change ranks the local static catalog and does not alter RAG document retrieval.
  • npm run eval:rag -- --limit 15 / npm run eval:quality -- --rag-only — not run; answer synthesis and post-processing are unchanged.
  • npm run check:production-readiness — not run; no production environment, source governance, privacy, or provider behavior changed.

RAG impact: none. This changes typo scoring for the local catalog only; RAG retrieval, selection, chunking, citation rendering, and answer generation are unchanged.

Risk and rollout

  • Risk: A typo can reorder local catalog suggestions, and the phone ticker visibility predicate affects the shared root route.
  • Rollback: Revert commit 95855174b4f7a9951fb6a81529698b55f1348356.
  • Provider or production effects: None.

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked; this changes local discovery ordering only and does not add diagnostic or treatment logic

Notes

  • Review comments resolved on the exact fix head after focused verification.

@coderabbitai

coderabbitaiBot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in:23 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 686c5e8b-f6ae-4b9c-85a3-40743a307568

📥 Commits

Reviewing files that changed from the base of the PR and between 3673c7b and b39ee76.

📒 Files selected for processing (8)
  • scripts/playwright-pr-shards.mjs
  • src/components/clinical-dashboard/global-search-shell.tsx
  • src/components/clinical-dashboard/universal-search-command-surface.tsx
  • src/lib/catalog-search.ts
  • tests/audit-navigation-auth-regressions.test.ts
  • tests/catalog-search.test.ts
  • tests/dsm.test.ts
  • tests/ui-phone-scroll-submitted-root.spec.ts

Comment @coderabbitai help to get the list of available commands.

@supabase

supabaseBot commented Aug 12, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:82b71b3f4a

ℹ️ 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".

Comment threadsrc/lib/catalog-search.ts Outdated
Comment threadsrc/components/clinical-dashboard/global-search-shell.tsx Outdated
Repository owner locked and limited conversation to collaborators Aug 12, 2026
@BigSimmo
BigSimmo marked this pull request as draft August 12, 2026 19:11
@BigSimmoClaude

Copy link
Copy Markdown
OwnerAuthor

Wrong-drug fuzzy match in the new typo tier (ledger #310, P2) — flagged here because this PR is still open and owns src/lib/catalog-search.ts's fuzzy scoring.

The term.length >= 8 → 2 edits tier in typoDistanceLimit lets the matcher hit a different drug: Damerau counts an adjacent transposition as one edit, so fluoxetine → duloxetine (substitute f→d, transpose lu→ul; SSRI vs SNRI) and prednisone → prednisolone are both within distance 2. Confirmed by running the PR's own algorithm against real catalogue drug names (recorded in docs/outstanding-issues.md#310, 2026-08-12). Because the fuzzy trigger is evaluated per record, the wrong drug can surface as an additional result even when the exactly-matching drug is present, and catalog-search.ts feeds eleven modules including prescribing, DSM, and universal search.

Tested minimal fix: cap the >=8 tier at 1 edit. That removes both cross-drug hits while preserving every legitimate typo recovery in the sample (sertraline→setraline, olanzapine→olanzepine still work). Please also add a test with both the exact and near-match drug records present, asserting the wrong drug is excluded. The typo recovery itself is genuinely useful — no need to remove it, just tighten the tier.


Generated by Claude Code

claudeand others added 3 commits August 13, 2026 08:22
Pins ledger #310: with both the exact drug and its two-edit neighbour in the
catalogue, fluoxetine must not surface duloxetine and prednisone must not
surface prednisolone, while single-edit typo recovery (setraline->sertraline)
keeps working.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBdo125Dh3idPcF7CmCCmG
@BigSimmo
BigSimmo marked this pull request as ready for review August 13, 2026 17:40
@BigSimmoChatGPT Codex Connector

Copy link
Copy Markdown
OwnerAuthor

Addressed the outstanding wrong-drug fuzzy-match finding on the current head. typoDistanceLimit now permits at most one edit for terms of five or more characters, preventing exact fluoxetine/prednisone queries from surfacing duloxetine/prednisolone while preserving genuine one-edit recovery. tests/catalog-search-drug-name-regression.test.ts pins both exclusions and legitimate typo recovery. The branch was merged with current main without rebasing; the overlapping navigation regression file preserves both sides. Exact-head CI, static checks, unit coverage, build, Lighthouse, SAST, Secret Scan and all required UI jobs passed.

@BigSimmo
BigSimmo merged commit 247a359 into mainAug 13, 2026
26 checks passed
@BigSimmo
BigSimmo deleted the codex/investigate-recent-regression-issues branch August 13, 2026 18:03
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@BigSimmo@claude