Fix service-related options placement and test drift#842
Conversation
* fix: stop Escape focus restore from closing the app-mode menu Scope dismiss deferred a focus restore onto the answer-options trigger. When a mode-menu open landed in the same frame window, that restore stole focus, blur-dismissed the menu, and flaked the Documents mode switch in Production UI CI. Skip restore when the mode menu is open or focus already moved, and wait for the scope popover to hide before opening the menu. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * fix(test): fail closed when scope popover does not dismiss Only wait for the scope popover when it is visible, and let that wait throw if dismissal times out so the mode-menu open cannot recreate the Escape focus-restore race. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…-main-merge-safe-20260718
|
Updates to Preview Branch (codex/design-audit-main-safe-20260718-mergefix) ↗︎
Tasks are run on every commit but only new migration files are pushed.
❌ Branch Error • Sat, 18 Jul 2026 10:09:54 UTC View logs for this Workflow Run ↗︎. |
📝 WalkthroughWalkthroughThe PR updates sitemap route metadata, redirect query handling, UI behavior, RAG cancellation paths, Supabase migrations, and associated regression, schema, and browser tests. ChangesRoute contracts and sitemap generation
Dashboard and navigation rendering
Retrieval and database paths
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/app/differentials/presentations/route.ts`:
- Line 6: Update the query extraction expression in the route handler so a
trimmed blank query parameter falls back to the trimmed `q` parameter, while
retaining the `query` value when non-blank and preserving the existing
null/undefined behavior.
In `@src/components/ClinicalDashboard.tsx`:
- Line 3651: Update the generic error branch in ClinicalDashboard to restore the
mode-specific title: use “Answer unavailable” when activeModeResultKind is
“answer” and “Search unavailable” for other result kinds, preserving the
existing error handling.
In `@supabase/migrations/20260714190000_document_table_facts_trgm_idx.sql`:
- Around line 2-11: Update the document_table_facts_text_trgm_idx creation to
use CREATE INDEX CONCURRENTLY and ensure the migration runs outside the
transaction, preserving the existing index expression and IF NOT EXISTS
behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 327cb148-0fa1-44f1-b432-22a17d0c8f65
📒 Files selected for processing (20)
docs/site-map.mdplaywright.config.tsscripts/generate-site-map.tssrc/app/differentials/presentations/route.tssrc/app/page.tsxsrc/components/ClinicalDashboard.tsxsrc/components/clinical-dashboard/master-search-header.tsxsrc/components/services/services-navigator-page.tsxsrc/lib/rag-candidate-sources.tssrc/lib/rag.tssupabase/drift-manifest.jsonsupabase/migrations/20260714180000_patch_rag_and_corrector_scalability.sqlsupabase/migrations/20260714190000_document_table_facts_trgm_idx.sqltests/audit-content-services-regressions.test.tstests/audit-navigation-auth-regressions.test.tstests/rag-abort-signal.test.tstests/rag-classifier-memo.test.tstests/site-map.test.tstests/supabase-schema.test.tstests/ui-tools.spec.ts
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #3245 (success). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
Merge closeout summary\n- PR #842 is already merged to main (commit: 5c3a0e5).\n- Duplicate PR #844 was closed as superseded (closedAt 2026-07-18T10:45:22Z).\n- PR-policy blocker was resolved by fixing PR body to include required verification section wording (UI verification not run: blocked by environment constraints).\n- External Supabase Preview check continues to fail on the live preview project (Unsafe supabase_admin default privileges); this is an external provider-state gate, not a code regression in this branch.\n- Main branch is clean at handoff; no additional local changes pending from this closure pass.\n\nNo additional merge action was required after this verification and closure cleanup. |
Summary
Verification
npm run test -- tests/site-map.test.ts tests/supabase-schema.test.ts(2 passed)npx playwright test tests/ui-accessibility.spec.ts --project=chromium --workers=1(7 passed)npx playwright test tests/ui-tools.spec.ts --project=chromium --workers=1 --grep "Clinical KB tools launcher"(68 passed, 1 skipped / unrelated)npx playwright test tests/ui-universal-search.spec.ts --project=chromium --workers=1(15 passed)Risk and rollout
Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)