feat: setup openai plugin and fix E2E tests - #172
Conversation
…locator and timing flakiness
|
@copilot resolve the merge conflicts in this pull request |
…etup # Conflicts: # src/app/documents/[id]/page.tsx # src/app/page.tsx # src/lib/document-naming.ts # src/lib/rag.ts # src/lib/supabase/admin.ts
Resolved. The five conflicting files were merged in commit
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5ad93f81c
ℹ️ 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".
Adds /mockups/document-search as a review board for the three concepts and
/mockups/document-search/source, which resolves a mock result into the real
document viewer at /documents/{id}?page=...&chunk=... via the documents API.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sed tesseract.js - Dynamically import DifferentialsHome, FavouritesHub, MedicationPrescribingWorkspace, and ApplicationsLauncherWorkspace with ssr disabled in ClinicalDashboard. - Simplify openClinicalNotes/openEvidence to plain functions and let the clinical-notes/evidence sheets open on their own state. - Memoize markdown table parsing in AccessibleTable. - Remove tesseract.js (OCR runs via the Python worker and native binary). - Add a near-sheet-breakpoint (1018px) viewport case to ui-smoke. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…codex/openai-plugin-setup
…etup # Conflicts: # src/components/clinical-dashboard/master-search-header.tsx
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8e2e54251
ℹ️ 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.
💡 Codex Review
Database/scripts/classify-documents.ts
Line 405 in f3cb0f1
When classify:documents or backfill:smart-v2-labels runs after a reviewer has hidden or approved a generated label, this upsert conflicts on the same (document_id,label_type,label,source) row and writes the freshly generated metadata (review_status: "new" with no hidden flag). That silently turns reviewed/hidden labels back into unreviewed visible labels, undoing curation; preserve existing review_status/hidden metadata on conflict or skip already reviewed rows.
ℹ️ 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".
|
@copilot resolve the merge conflicts in this pull request |
…etup # Conflicts: # src/lib/rag.ts
Head branch was pushed to by a user without write access
Resolved in commit |
…yInsert - Run prettier --write to clear the format:check gate (20 files: mockup components, governance scripts, rag.ts, ui-smoke.spec.ts, etc.). No trap files touched (worker/main.ts and database.types.ts stay .prettierignore'd). - Fix a latent typecheck error the format gate was masking: the main-merge kept logRagQuery(row: Record<string, unknown>) while #174 tightened insertRagQuery to require RagQueryInsert (mandatory query). Align the signature to main's logRagQuery(row: RagQueryInsert). Local: format:check, typecheck, lint (0 errors), and unit tests (863) all green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e4e81deb6
ℹ️ 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".
ESLint flagged a synchronous setState inside a useEffect in FormsSearchResultsPage (react cascading-render rule), which was blocking the verify check on PR #172. Replace the query->draft sync effect with the render-time previous-value adjustment pattern and drop the now-unused useEffect import. Behaviour is unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@copilot resolve the merge conflicts in this pull request |
Head branch was pushed to by a user without write access
Resolved in commit |
|
Carved the plugin-scaffolding slice out of this PR into #199 (isolated, no app-code coupling, prettier-clean, no package.json/build impact) so it can be reviewed and land independently. Suggested next slices for the remaining pieces here: (1) document-search mockups ( |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
feat: add Clinical KB Codex/OpenAI plugin scaffolding (carved from #172)
feat: add document-search UI mockups (carved from #172)
Facet counts were built once against the whole match set and never revised. Selections AND together, so the moment one was applied every other facet was still reporting a number for a set the reader was no longer looking at — and some of those numbers pointed at combinations that return nothing, which reads as a live option and behaves as a dead end. `projectSmartTagFacetGroups` re-counts an already-built index against the live selection. Each count now answers the question the row actually poses: how many documents you would have if you ticked this as well. A facet that is already selected reports the current result count, because that is what it is giving you. Membership and order are deliberately preserved rather than re-sorted by the new counts: re-sorting would make rows jump under the pointer while selecting, and re-slicing to the top N could drop a facet already ticked. A facet whose count falls to zero stays in place at zero so the caller can disable it — removing it makes the list jump and hides the reason it went away. The projection is a no-op returning the same array identity when nothing is selected, so the unfiltered path is unchanged. Tests: six cases covering the stale count, the selected-facet count, the dead-end combination driven to zero, agreement between each count and the filter it describes, and stability of membership and order. Verified by mutation — neutering the projection fails three of them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Akwz3Sdms8uJ5AkDt3CduY
fix #186 archive - Restore #156 (read-modify-write race + Update-branch corruption) from archive back to the open issues section with its original full text; the underlying allocation race is not resolved by the conservative architecture decision described in the previous commit. - Re-add #156 to the recommendations priority table as row 51 (between #101 and #172, consistent with its original ordering). - Correct #101 to credit only metadata and memory parallelisation (hydrateCandidatesWithMetadataAndMemory) from PR #1474; visual hydration (attachPageVisualEvidence) is still called serially after hydration on all six call sites and is explicitly listed as a remaining candidate. - Update #186 archive text to reflect that only metadata+memory were updated in #101, not visual hydration. Co-authored-by: BigSimmo <87357024+BigSimmo@users.noreply.github.com>
Summary
This PR sets up the OpenAI plugin, introduces document search mockups, and resolves two critical end-to-end (E2E) test issues in
tests/ui-smoke.spec.ts(strict-mode locator violation and tab-transition flakiness).Verification
npm run verify:cheapnpm run verify:uiwhen UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changednpm run verify:releasebefore release or handoff confidence claimsnpm run format:checknpm run check:production-readinesswhen clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changednpm run check:deployment-readinesswhen deployment startup, hosting, or rollout behavior changedClinical Governance Preflight
Complete this section when the change touches ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
All unit and E2E Chromium tests are now fully green and passing.