Search pages follow-up: registry error states, no-evidence handling, generator fixes, session hook#335
Merged
Merged
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
BigSimmo
marked this pull request as ready for review
July 6, 2026 18:18
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Owner
Author
|
@copilot resolve the merge conflicts in this pull request |
Copilot stopped work on behalf of
BigSimmo due to an error
July 6, 2026 18:19
BigSimmo
enabled auto-merge
July 6, 2026 18:20
…generator fixes, session hook Follow-up to PR #320's search page review, addressing the remaining items: - Services navigator: stop silently rendering fixture records when the registry is unauthorized or errored - show the same session-expired / load-error notices as the services home and detail pages. Demo mode is unaffected (the registry API serves fixtures as status ready). - Documents flow: findEvidence no longer borrows another document's fixture evidence, so deep links to documents without extracted evidence render an explicit "No extracted evidence" state in the reader hit panel and a dedicated notice page on the evidence detail route. - Differentials export parser: drop the markdown preamble section that became a bogus "# Scenario Presets" preset and "# Red Flag Flows" flow, and drop bare-number field-weight rows from the search alias table; cleaned the checked-in snapshot to match and added parser regression tests. Runtime loader filters from #320 remain as defence in depth. - Differentials search results: rank the real catalogue with rankDifferentialRecords/searchPresentationWorkflows when a query is present (the acute-confusion walkthrough remains the empty-query demo), and reword the demo-content notice accordingly. - Forms results: inert mock controls (secondary tabs, refine rail, view full pathway, mobile filters) are now disabled with "Coming soon" affordances matching the documents page; "View all forms" links to /forms and "Open Form 4A" links to the transport order form. - Favourites: drop the key={query} remount so clearing a search no longer wipes set/type/view/sort selections, and span the empty row correctly on both sides of the lg breakpoint. - Deleted the unused ServicesNavigatorPreview component (no importers, hardcoded overflow badge, fixture-only search). - Added a web-only SessionStart hook that installs Node 24 (the repo is engine-strict node 24.x) into a cached location and runs npm ci when node_modules is missing, so remote sessions are productive immediately. - Lint: removed the unused AnswerEmptyState onPickSample prop and two unused type imports; added the derived canUsePrivateApis to the DocumentViewer fetch effect deps (no behavioural change - its inputs were already dependencies). - Documented the answer-thread Back-button URL/state question in docs/process-hardening.md as an open product decision with a guardrail. Verified with typecheck, lint, vitest (1142 passing), format:check, and npm run verify:ui (106 chromium Playwright tests passing). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015rc3tTjs65D4gFBuCQhZGs
BigSimmo
force-pushed
the
claude/search-pages-review-f4xmhp
branch
from
July 6, 2026 18:23
8b6152e to
0fcb311
Compare
Copilot stopped work on behalf of
BigSimmo due to an error
July 6, 2026 18:36
Copilot stopped work on behalf of
BigSimmo due to an error
July 6, 2026 18:36
Copilot stopped work on behalf of
BigSimmo due to an error
July 6, 2026 18:36
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to the search pages review (#320), clearing the remaining recommendations:
services-navigator-page.tsx): unauthorized/errored registry loads no longer silently fall back to static fixture records (which showed a full result list whose entries then failed on click). The navigator now shows the same "Session expired" / "Could not load services" notices as the services home and detail pages. Demo mode is unaffected — the registry API serves demo fixtures as statusready.master-document-flow-mockups.tsx):findEvidenceno longer borrows the clozapine fixture's evidence for documents whoseevidencearray is empty. The reader's hit panel shows an explicit "No extracted evidence" state, and the evidence detail route renders a dedicated notice page with links back to the document and results instead of mismatched borrowed content.scripts/lib/parse-differentials-export.ts): the markdown preamble before the first##no longer becomes a bogus record (the# Scenario Presetspreset and# Red Flag Flowsflow), and bare-number field-weight rows (e.g.tags → 1.1) are dropped from the search alias table. The checked-in snapshot was cleaned to match (presets 8→7, flows 8→7, aliases 28→20) and parser regression tests added. The runtime loader filters from Fix search page defects across documents, services, forms, favourites, and differentials #320 remain as defence in depth.forms-search-results-page.tsx): inert controls (secondary tabs, refine toggles, "View full pathway", mobile Filters) are now disabled with "Coming soon" affordances matching the documents page pattern; "View all forms" is a real link to/formsand "Open Form 4A" links to the transport order form.favourites/page.tsx,favourites-command-library-page.tsx): dropped thekey={query}remount (query is a pure prop), so clearing the search chip no longer wipes set/type/view/sort selections; the empty-state row now spans the correct column count on both sides of thelgbreakpoint.ServicesNavigatorPreview(no importers, hardcoded "+1" overflow badge, fixture-only search)..claude/hooks/session-start.sh,.claude/settings.json): web-only hook that installs Node 24 into a cached location when the container ships an older Node (the repo is engine-strictnode 24.x/npm 11.x), exports it via$CLAUDE_ENV_FILE, and runsnpm ciwhennode_modulesis missing. Validated end-to-end in this container, idempotent, and leaves the lockfile untouched.onPickSampleprop fromAnswerEmptyState(and its call site), removed two unused type imports in API routes, and added the derivedcanUsePrivateApisto theDocumentViewerfetch effect deps (no behavioural change — all its inputs were already dependencies). The remainingexhaustive-depswarning inClinicalDashboardguards deliberate auto-run semantics and was intentionally left.docs/process-hardening.mdas an open product decision, with a guardrail against "fixing" it by re-running searches on Back.Dropped during rebase: the originally-planned query-ranked differentials results in
differentials-home.tsxwere superseded by main's own implementation (useDifferentialSearch+composeDifferentialSearchResults, merged via #331's line); this PR keeps main's version untouched.Verification
npm run verify:cheap(typecheck, lint — 1 deliberate pre-existing warning, vitest 1182 passing post-rebase, runtime + sitemap checks)npm run verify:ui— full Chromium Playwright suite, 106/106 passing on the pre-rebase head (required downloading the pinned Playwright Chromium build in this container first); post-rebase re-verified with typecheck/lint/vitest/formatnpm run verify:release— not applicable to this PRnpm run format:checknpm run eval:retrieval:quality— not run (needs live Supabase/OpenAI keys). RAG retrieval/ranking/selection/chunking/scoring are untouched; the only ranking-adjacent changes are parser/alias hygiene for the client-side differentials static catalogue, which make its query expansion strictly cleanernpm run eval:rag/eval:quality— answer generation and synthesis untouchednpm run check:production-readiness— no clinical workflow, privacy, environment, Supabase, or deployment behavior changednpm run check:deployment-readiness— no deployment behavior changedClinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy) — no env or Supabase changesNotes
main. It runs synchronously (dependencies guaranteed ready before the session starts); it can be switched to async mode for faster startup if preferred.🤖 Generated with Claude Code
https://claude.ai/code/session_015rc3tTjs65D4gFBuCQhZGs