fix: gate demo-mode forms UI for ui test fixture compatibility#862
fix: gate demo-mode forms UI for ui test fixture compatibility#862BigSimmo wants to merge 6 commits into
Conversation
|
Updates to Preview Branch (codex/merge-safe-819-mainfix-regression) ↗︎
Tasks are run on every commit but only new migration files are pushed.
❌ Branch Error • Sat, 18 Jul 2026 14:11:48 UTC View logs for this Workflow Run ↗︎. |
📝 WalkthroughWalkthroughThe PR updates Clinical KB headings and result rendering, hides demo-mode forms controls, adds caller cancellation to RAG retrieval and classifier waits, records coalescing metrics, adjusts Playwright motion settings, and refreshes regression assertions and Supabase validation fixtures. ChangesClinical KB UI and request handling
RAG cancellation and coalescing
Supabase validation and browser execution
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
…mainfix-regression
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f20b807cd
ℹ️ 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".
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/lib/rag-candidate-sources.ts`:
- Around line 91-99: Update both retrieval RPC invocations in rag.ts—at the
hybrid and vector search call sites—to pass args.signal as the fifth argument.
In the fallback logic after each RPC, re-check the cancellation state before
proceeding so an aborted request does not fall through to another retrieval
path.
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8580c8c8-6868-47ce-8726-d08ce7f90bb4
📒 Files selected for processing (14)
playwright.config.tssrc/app/page.tsxsrc/components/ClinicalDashboard.tsxsrc/components/forms/forms-search-results-page.tsxsrc/components/route-error-boundary.tsxsrc/lib/rag-candidate-sources.tssrc/lib/rag.tssupabase/drift-manifest.jsontests/audit-content-services-regressions.test.tstests/audit-navigation-auth-regressions.test.tstests/supabase-schema.test.tstests/ui-accessibility.spec.tstests/ui-smoke.spec.tstests/ui-tools.spec.ts
|
@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e4d283ab83
ℹ️ 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".
| versionedName: string, | ||
| legacyName: string, | ||
| args: Record<string, unknown>, | ||
| signal?: AbortSignal, |
There was a problem hiding this comment.
Pass caller abort signals into retrieval RPCs
This new signal parameter is never supplied by the production retrieval path: a repo-wide check of callVersionedRetrievalRpc call sites shows the searchChunksWithTelemetry/candidate-source callers still pass only the RPC args and their helper argument types do not carry signal. When a user hits Stop after retrieval starts, the code still waits for outstanding Supabase RPCs instead of aborting them, so the cancellation fix only covers the classifier boundary; thread args.signal through the candidate helpers and direct RPC calls so this hook is effective.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Summary
- Propagated the caller
AbortSignalfromsearchChunksWithTelemetryinto table-fact, document-lookup, embedding-field, index-unit, hybrid, and vector fallback retrieval paths. src/lib/rag.tsL2618-L2630 src/lib/rag.tsL2642-L2654 src/lib/rag.tsL2808-L2854 - Added signal support to candidate-source helper argument types and passed the signal into their versioned Supabase retrieval RPC calls. src/lib/rag-candidate-sources.tsL383-L405 src/lib/rag-candidate-sources.tsL507-L533 src/lib/rag-candidate-sources.tsL938-L966 src/lib/rag-candidate-sources.tsL1012-L1038 src/lib/rag-candidate-sources.tsL1079-L1105
- Added cancellation re-checks after hybrid retrieval and before/after vector fallback handling so an aborted request does not continue into fallback retrieval/reranking. src/lib/rag.tsL2883-L2885 src/lib/rag.tsL2960-L2974
- Committed the fix on the current branch:
6ee08e4 fix: propagate retrieval abort signals. - Created PR metadata with title:
fix: propagate RAG retrieval abort signals.
Testing
- ✅
export PATH="$HOME/.nvm/versions/node/v24.15.0/bin:$PATH"; npm ci - ✅
export PATH="$HOME/.nvm/versions/node/v24.15.0/bin:$PATH"; npm run typecheck - ✅
export PATH="$HOME/.nvm/versions/node/v24.15.0/bin:$PATH"; npm run test -- tests/retrieval-selection.test.ts tests/rag-routing.test.ts tests/rag-offline-contract.test.ts - ✅
export PATH="$HOME/.nvm/versions/node/v24.15.0/bin:$PATH"; npm run eval:rag:offline - ❌
export PATH="$HOME/.nvm/versions/node/v24.15.0/bin:$PATH"; npm run verify:cheap— failed in unrelatedtests/pdf-extraction-budget.test.tschild-process deadline expectation after lint/typecheck and the broader Vitest suite started successfully. - ❌
export PATH="$HOME/.nvm/versions/node/v24.15.0/bin:$PATH"; npm run test -- tests/pdf-extraction-budget.test.ts— reproduced the same unrelated PDF child-process deadline failure.
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 2 file(s) based on 1 unresolved review comment. Files modified:
Commit: The changes have been pushed to the Time taken: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2868f9040d
ℹ️ 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".
Fixed 2 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
|
@copilot resolve the merge conflicts on this branch. |
|
Closing as superseded by merged PR #861 (and #859 earlier in the same remediation line). #861 already landed the design-audit forms/registry UI gating, reduced-motion handling, retrieval abort propagation, and related test alignment on main. This branch is a stale overlapping remount of that work (DIRTY vs current main) and should not merge. Branch retained; no branch deletion performed. |
Pull request was closed
Summary
tests/ui-tools.spec.tsso test slug lookup no longer fails on unknown fixture slugs.src/components/forms/forms-search-results-page.tsxso fixture-backed form UI stays within expected assertions.f99d4cfon this branch.Verification
npm run verify:pr-localnpm run verify:uiscripts/run-playwright.mjs) after the branch-safety sync; targetednpm run test:e2e:pr -- tests/ui-tools.spec.ts ...checks could not complete while stale lock/processes were present.Risk and rollout
demoModeguards informs-search-results-page.tsxand restoretests/ui-tools.spec.tsslug filtering behavior.Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes