Hide cross-mode matches from unsubmitted mode homes - #1806
Conversation
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughThe dashboard and search result pages now render ChangesUniversal search match rendering
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant ClinicalDashboard
participant UniversalSearchAlsoMatches
User->>ClinicalDashboard: Submit a non-empty search query
ClinicalDashboard->>UniversalSearchAlsoMatches: Render matches for submitted mode
User->>ClinicalDashboard: Complete Answer generation
ClinicalDashboard->>UniversalSearchAlsoMatches: Render matches after final answer event
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed: dependency version conflict. Check your lock file or package.json. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:ff88e1b031
ℹ️ 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".
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@tests/ui-universal-search.spec.ts`:
- Around line 281-287: Update the test “keeps submitted cross-mode matches off
the unsubmitted shared home” to first establish submitted or stale search
matches, then navigate back to `/?mode=therapy` with only draft text and assert
`universal-also-matches` is absent. Ensure the setup reaches the
`modeSearchSubmitted` path in `ClinicalDashboard` so the regression assertion
exercises the new `!showSharedHome` guard.
🪄 Autofix
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
Run ID: cb4f7398-4522-4ad1-b51c-5fb57c19a5e1
📒 Files selected for processing (3)
AGENTS.mdsrc/components/ClinicalDashboard.tsxtests/ui-universal-search.spec.ts
Uh oh!
There was an error while loading. Please reload this page.
# Conflicts: # src/components/ClinicalDashboard.tsx # tests/ui-universal-search.spec.ts
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #9671 (failure). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/components/services/services-navigator-page.tsx`:
- Line 824: Move the UniversalSearchAlsoMatches component outside the primary
non-empty-results conditional in the services navigator page so it renders for
empty service results as well, while retaining the registryReady gate. Add a
regression test covering a valid query with no service-mode matches and
available cross-mode matches, asserting the panel is rendered.
🪄 Autofix
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
Run ID: 790fab34-cf0b-41c1-b529-d40484658840
📒 Files selected for processing (4)
src/components/ClinicalDashboard.tsxsrc/components/clinical-dashboard/favourites-command-library-page.tsxsrc/components/forms/forms-search-results-page.tsxsrc/components/services/services-navigator-page.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/components/ClinicalDashboard.tsx
Uh oh!
There was an error while loading. Please reload this page.
BigSimmo
commented
Aug 11, 2026
PR unblock snapshot (#1806)
What blocked and what was fixed
Residual risks / dispositions
Ledger
Merge remains with you. |
BigSimmo
commented
Aug 11, 2026
Unblock sweep snapshot
What was fixed/dispositioned
Residual risks
|
Uh oh!
There was an error while loading. Please reload this page.
Motivation
Description
showUniversalAlsoMatchesflag insrc/components/ClinicalDashboard.tsxto prevent rendering when the shared home is active by adding!showSharedHometo the predicate.tests/ui-universal-search.spec.tsthat asserts the cross-mode card is not present on an unsubmitted Therapy home.AGENTS.md(commit included) sonext devdoes not recreate a dirty working tree.Testing
npm run ensure, which completed successfully.universal-also-matchescard is absent on the Therapy home and captured a screenshot (/tmp/therapy-home-without-also-matches.png).npm run format) andgit diff --check, both of which passed.npm run test:e2e/test:e2ewrapper), but the isolated production build/typecheck failed due to pre-existing malformed generated.next/dev/typesdeclarations, blocking the full e2e gate (this is an environment/typecheck failure unrelated to the change).Codex Task
Summary by CodeRabbit
New Features
Bug Fixes