Skip to content

chore: land design-audit fixups and scoped regression hardening#839

Closed
BigSimmo wants to merge 3 commits into
mainfrom
codex/ensure-unique-tree-pr-822-final
Closed

chore: land design-audit fixups and scoped regression hardening#839
BigSimmo wants to merge 3 commits into
mainfrom
codex/ensure-unique-tree-pr-822-final

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Carry forward cleanup and regression-hardening changes from the active design-audit cleanup train:
    • site-map/docs and generator parity
    • service navigator and routing guard hardening
    • RAG candidate source/scope behavior adjustments
    • supabase migration/trgm indexing and drift manifest parity
    • regression and UI test updates
  • Includes the Escape key focus restoration and mode-menu interaction stabilization from PR fix: stop Escape focus restore from closing the app-mode menu #822 context.

Verification

  • git status clean on branch.
  • git fetch and branch comparison done against origin/main before PR creation.
  • Full local verification could not be completed in this environment because dependency install is absent (node_modules missing) and heavy-gate checks were blocked by an active external heavy test lock in another worktree.

Notes

  • This branch is a dedicated handoff branch and is not currently the primary main branch.

Summary by CodeRabbit

  • New Features

    • Updated the dashboard heading to “Clinical KB.”
    • Improved search result presentation across clinical and services views.
    • Enhanced mobile search behavior and accessibility.
  • Bug Fixes

    • Improved presentation search query handling and redirects.
    • Refined mode-menu and fullscreen document interactions.
    • Clarified unavailable-answer messaging.
  • Documentation

    • Updated the sitemap to reflect current routes and redirect destinations.
  • Tests

    • Expanded regression, accessibility, and UI coverage for search, navigation, and service results.

BigSimmo and others added 2 commits July 18, 2026 17:18
* 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>
@supabase

supabase Bot commented Jul 18, 2026

Copy link
Copy Markdown

Updates to Preview Branch (codex/ensure-unique-tree-pr-822-final) ↗︎

Deployments Status Updated
Database Sat, 18 Jul 2026 09:32:01 UTC
Services Sat, 18 Jul 2026 09:32:01 UTC
APIs Sat, 18 Jul 2026 09:32:01 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Sat, 18 Jul 2026 09:32:07 UTC
Migrations Sat, 18 Jul 2026 09:32:09 UTC
Seeding ⏸️ Sat, 18 Jul 2026 09:31:54 UTC
Edge Functions ⏸️ Sat, 18 Jul 2026 09:31:54 UTC

❌ Branch Error • Sat, 18 Jul 2026 09:32:10 UTC

ERROR: Unsafe supabase_admin default privileges; migration blocked. (SQLSTATE 42501)
{"safe": false, "entries": ["function:PUBLIC:execute", "function:anon:execute", "function:authenticated:execute", "function:postgres:execute", "function:service_role:execute", "function:supabase_admin:execute", "sequence:anon:select", "sequence:anon:update", "sequence:anon:usage", "sequence:authenticated:select", "sequence:authenticated:update", "sequence:authenticated:usage", "sequence:postgres:select", "sequence:postgres:update", "sequence:postgres:usage", "sequence:service_role:select", "sequence:service_role:update", "sequence:service_role:usage", "sequence:supabase_admin:usage", "table:anon:delete", "table:anon:insert", "table:anon:maintain", "table:anon:references", "table:anon:select", "table:anon:trigger", "table:anon:truncate", "table:anon:update", "table:authenticated:delete", "table:authenticated:insert", "table:authenticated:maintain", "table:authenticated:references", "table:authenticated:select", "table:authenticated:trigger", "table:authenticated:truncate", "table:authenticated:update", "table:postgres:delete", "table:postgres:insert", "table:postgres:maintain", "table:postgres:references", "table:postgres:select", "table:postgres:trigger", "table:postgres:truncate", "table:postgres:update", "table:service_role:delete", "table:service_role:insert", "table:service_role:maintain", "table:service_role:references", "table:service_role:select", "table:service_role:trigger", "table:service_role:truncate", "table:service_role:update", "table:supabase_admin:delete", "table:supabase_admin:insert", "table:supabase_admin:maintain", "table:supabase_admin:references", "table:supabase_admin:select", "table:supabase_admin:trigger", "table:supabase_admin:truncate", "table:supabase_admin:update"], "role_exists": true, "schema_exists": true}
At statement: 3
do $$
declare
  v_status jsonb;
begin
  if not exists (select 1 from pg_catalog.pg_roles where rolname = 'supabase_admin') then
    raise notice 'role supabase_admin does not exist; default-privilege assertion is not applicable';
    return;
  end if;

  begin
    -- Local/Superuser-capable environments can assume the target role even
    -- when the migration role cannot use ALTER DEFAULT PRIVILEGES FOR ROLE
    -- directly. Hosted environments that cannot assume it fall through to the
    -- catalog assertion and block with operator instructions.
    execute 'set local role supabase_admin';
    -- Revokes must be global: per-schema ACLs cannot subtract privileges from
    -- built-in or previously granted global defaults.
    alter default privileges for role supabase_admin
      revoke all privileges on tables from public, anon, authenticated, service_role;
    alter default privileges for role supabase_admin in schema public
      revoke all privileges on tables from public, anon, authenticated, service_role;
    alter default privileges for role supabase_admin
      revoke all privileges on sequences from public, anon, authenticated, service_role;
    alter default privileges for role supabase_admin in schema public
      revoke all privileges on sequences from public, anon, authenticated, service_role;
    alter default privileges for role supabase_admin
      revoke execute on functions from public, anon, authenticated, service_role;
    alter default privileges for role supabase_admin in schema public
      revoke execute on functions from public, anon, authenticated, service_role;
    alter default privileges for role supabase_admin in schema public
      grant select, insert, update, delete on tables to service_role;
    alter default privileges for role supabase_admin in schema public
      grant usage, select on sequences to service_role;
    alter default privileges for role supabase_admin in schema public
      grant execute on functions to service_role;
    execute 'reset role';
  exception when insufficient_privilege then
    begin execute 'reset role'; exception when others then null; end;
    raise notice 'current role % cannot remediate supabase_admin default privileges; asserting the catalog postcondition', current_user;
  end;

  v_status := public.default_privileges_status('supabase_admin', 'public');
  if not coalesce((v_status->>'safe')::boolean, false) then
    raise exception using
      errcode = '42501',
      message = 'Unsafe supabase_admin default privileges; migration blocked.',
      detail = v_status::text,
      hint = E'Run these six statements as supabase_admin, then retry the migration:\n'
        'DO $remediate$ BEGIN ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin REVOKE ALL PRIVILEGES ON TABLES FROM PUBLIC, anon, authenticated, service_role; ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL PRIVILEGES ON TABLES FROM PUBLIC, anon, authenticated, service_role; END $remediate$;\n'
        'DO $remediate$ BEGIN ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin REVOKE ALL PRIVILEGES ON SEQUENCES FROM PUBLIC, anon, authenticated, service_role; ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE ALL PRIVILEGES ON SEQUENCES FROM PUBLIC, anon, authenticated, service_role; END $remediate$;\n'
        'DO $remediate$ BEGIN ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin REVOKE EXECUTE ON FUNCTIONS FROM PUBLIC, anon, authenticated, service_role; ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public REVOKE EXECUTE ON FUNCTIONS FROM PUBLIC, anon, authenticated, service_role; END $remediate$;\n'
        'ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO service_role;\n'
        'ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT USAGE, SELECT ON SEQUENCES TO service_role;\n'
        'ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT EXECUTE ON FUNCTIONS TO service_role;';
  end if;
end;
$$

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updates route handling and sitemap documentation, search UI behavior, RAG execution plumbing, Supabase schema state, and associated regression tests.

Changes

Product and platform updates

Layer / File(s) Summary
Routing and sitemap contracts
src/app/..., scripts/generate-site-map.ts, docs/site-map.md, tests/site-map.test.ts
Redirect documentation now uses [workflow-slug], factsheet routes are removed from generated documentation, presentation query parsing is simplified, and home route parameters are narrowed.
Search UI and interaction behavior
src/components/..., playwright.config.ts, tests/audit-*.test.ts, tests/ui-*.spec.ts
Dashboard match rendering, header menu behavior, services navigation placement, rail remounting, reduced-motion settings, form assertions, and dashboard heading expectations are updated.
RAG execution plumbing
src/lib/rag.ts, src/lib/rag-candidate-sources.ts
RPC calls use simplified direct invocation, classifier fallback no longer accepts caller abort signals, chunk-load caching is removed, and answer coalescing telemetry hooks are removed.
Supabase schema and migration state
supabase/migrations/*, supabase/drift-manifest.json, tests/supabase-schema.test.ts
Schema metadata and function hashes are refreshed, obsolete indexes/triggers/constraints are removed from the manifest, trigger comparisons change, and a trigram index migration is added.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested labels: codex

Suggested reviewers: copilot, cursoragent

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description omits the required Risk and rollout and Clinical Governance Preflight sections from the template. Add the missing Risk and rollout section and complete the Clinical Governance Preflight checklist, then format Verification to match the template.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main design-audit cleanup and regression-hardening changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/ensure-unique-tree-pr-822-final

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

CI triage

CI failed on this PR. Automated classification of the 6 failed job(s):

  • Unit coverageneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Advisory UIneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Static PR checksneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Production UIneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Buildneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/components/services/services-navigator-page.tsx (1)

36-37: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Restore the metrics imports.

RightRail still calls serviceNavigatorMetrics and canCompareServices (Lines 296-297). Removing these bindings leaves unresolved identifiers and blocks the build.

Proposed fix
+import { canCompareServices, serviceNavigatorMetrics } from "`@/lib/service-navigator-metrics`";
🤖 Prompt for 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.

In `@src/components/services/services-navigator-page.tsx` around lines 36 - 37,
Restore the serviceNavigatorMetrics and canCompareServices imports in
services-navigator-page.tsx so the existing RightRail references resolve and the
build succeeds; leave the surrounding rankServiceRecords and useRegistryRecords
imports unchanged.
src/lib/rag.ts (1)

1291-1292: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Restore per-caller classifier cancellation.

This removes the contract exercised by tests/rag-classifier-memo.test.ts:168-192: a cancelled caller must reject with AbortError without cancelling the shared classifier request. It now waits for pending and returns a verdict/fallback instead. Restore signal and race only the caller’s await against it.

Also applies to: 1363-1366

🤖 Prompt for 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.

In `@src/lib/rag.ts` around lines 1291 - 1292, Restore the optional caller
AbortSignal in the RAG classifier options and classifier invocation near the
ownerId field. In the pending-request await path, race only this caller’s wait
against its signal so cancellation rejects with AbortError, while leaving the
shared classifier request active for other callers. Preserve the existing
verdict/fallback behavior for non-cancelled callers.
🤖 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 in the route handler to trim each
search-parameter candidate before choosing between them, so an empty or
whitespace-only query falls back to q. Preserve the existing behavior of
trimming the selected value and the redirect contract for valid query values.

In `@supabase/migrations/20260714190000_document_table_facts_trgm_idx.sql`:
- Around line 1-11: Move the index DDL from the existing migration into a new
migration created after the current migration head, leaving the released
migration unchanged. Create document_table_facts_text_trgm_idx concurrently and
configure the migration to run outside a transaction, using the repository’s
established convention.

In `@tests/audit-content-services-regressions.test.ts`:
- Around line 209-212: Update the source-rendering assertions in
audit-content-services-regressions.test.ts to match the current form-detail
implementation rather than expecting the stale ternary string. Use the current
normalized rendering shape or assert the resulting rendered behavior, while
preserving coverage for source-link availability.

In `@tests/audit-navigation-auth-regressions.test.ts`:
- Around line 126-128: Update the ClinicalDashboard.tsx implementation or the
corresponding clinicalDashboardSource assertion so the root dashboard contains
exactly one visually hidden H1 with the text “Clinical KB”, matching the
contract checked by the test.

In `@tests/ui-accessibility.spec.ts`:
- Line 51: Align the rendered H1 and all related assertions on the “Clinical KB”
heading: update the H1 in ClinicalDashboard, and ensure
tests/ui-accessibility.spec.ts lines 51-51, tests/ui-smoke.spec.ts lines
876-876, and tests/ui-smoke.spec.ts lines 1271-1271 use the same heading text.

---

Outside diff comments:
In `@src/components/services/services-navigator-page.tsx`:
- Around line 36-37: Restore the serviceNavigatorMetrics and canCompareServices
imports in services-navigator-page.tsx so the existing RightRail references
resolve and the build succeeds; leave the surrounding rankServiceRecords and
useRegistryRecords imports unchanged.

In `@src/lib/rag.ts`:
- Around line 1291-1292: Restore the optional caller AbortSignal in the RAG
classifier options and classifier invocation near the ownerId field. In the
pending-request await path, race only this caller’s wait against its signal so
cancellation rejects with AbortError, while leaving the shared classifier
request active for other callers. Preserve the existing verdict/fallback
behavior for non-cancelled callers.
🪄 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: e5ceafc7-5e2c-4ba5-8ad3-f43dcac43736

📥 Commits

Reviewing files that changed from the base of the PR and between 7815204 and b630b99.

📒 Files selected for processing (20)
  • docs/site-map.md
  • playwright.config.ts
  • scripts/generate-site-map.ts
  • src/app/differentials/presentations/route.ts
  • src/app/page.tsx
  • src/components/ClinicalDashboard.tsx
  • src/components/clinical-dashboard/master-search-header.tsx
  • src/components/services/services-navigator-page.tsx
  • src/lib/rag-candidate-sources.ts
  • src/lib/rag.ts
  • supabase/drift-manifest.json
  • supabase/migrations/20260714180000_patch_rag_and_corrector_scalability.sql
  • supabase/migrations/20260714190000_document_table_facts_trgm_idx.sql
  • tests/audit-content-services-regressions.test.ts
  • tests/audit-navigation-auth-regressions.test.ts
  • tests/site-map.test.ts
  • tests/supabase-schema.test.ts
  • tests/ui-accessibility.spec.ts
  • tests/ui-smoke.spec.ts
  • tests/ui-tools.spec.ts

Comment thread src/app/differentials/presentations/route.ts Outdated
Comment on lines +1 to +11
-- Migration to add GIN trigram index on document_table_facts text fields for performance optimization
create index if not exists document_table_facts_text_trgm_idx
on public.document_table_facts using gin (
lower(
coalesce(table_title, '') || ' ' ||
coalesce(row_label, '') || ' ' ||
coalesce(clinical_parameter, '') || ' ' ||
coalesce(threshold_value, '') || ' ' ||
coalesce(action, '')
) extensions.gin_trgm_ops
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Ship this as a new, concurrent migration.

Editing this previously released migration will not create the index in environments that already applied its former no-op version. Move the DDL into a new migration after the current migration head, and create it concurrently outside a transaction (or use the repository’s equivalent) so a large document_table_facts table does not block ingestion writes.

🧰 Tools
🪛 Squawk (2.59.0)

[warning] 2-11: During normal index creation, table updates are blocked, but reads are still allowed. Use concurrently to avoid blocking writes.

(require-concurrent-index-creation)

🤖 Prompt for 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.

In `@supabase/migrations/20260714190000_document_table_facts_trgm_idx.sql` around
lines 1 - 11, Move the index DDL from the existing migration into a new
migration created after the current migration head, leaving the released
migration unchanged. Create document_table_facts_text_trgm_idx concurrently and
configure the migration to run outside a transaction, using the repository’s
established convention.

Source: Linters/SAST tools

Comment thread tests/audit-content-services-regressions.test.ts Outdated
Comment on lines +126 to +128
it("keeps the root dashboard H1 as Clinical KB", () => {
expect(clinicalDashboardSource.match(/<h1\b/g)).toHaveLength(1);
expect(clinicalDashboardSource).toMatch(/<h1 className="sr-only">\s*Clinical Guide\s*<\/h1>/);
expect(clinicalDashboardSource).toMatch(/<h1 className="sr-only">\s*Clinical KB\s*<\/h1>/);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Fix the failing H1 contract before merge.

The unit-coverage check confirms that ClinicalDashboard.tsx does not contain the expected <h1 className="sr-only">Clinical KB</h1>. Update the implementation or the assertion so this test passes.

🧰 Tools
🪛 GitHub Check: Unit coverage

[failure] 128-128: [node] tests/audit-navigation-auth-regressions.test.ts > audit navigation and auth regressions > keeps the root dashboard H1 as Clinical KB
AssertionError: expected '"use client";\n\nimport { useRouter, …' to match /

\s*Clinica…/h1>

  • Expected:
    /

    \sClinical KB\s</h1>/

  • Received:
    ""use client";

import { useRouter, useSearchParams } from "next/navigation";
import dynamic from "next/dynamic";
import {
CircleAlert,
BookOpen,
ChevronDown,
Clock3,
ExternalLink,
FileImage,
FileText,
FolderOpen,
Heart,
ListChecks,
Loader2,
Quote,
RefreshCw,
Search,
ShieldAlert,
Square,
UploadCloud,
WifiOff,
Wrench,
} from "lucide-react";
import { type CSSProperties, useCallback, useEffect, useMemo, useReducer, useRef, useState } from "react";
import { type DocumentDeleteResult } from "@/components/DocumentManagementActions";
import { extractSafetyFindings } from "@/lib/clinical-safety";
import { isLocalNoAuthMode, publicUploadsEnabled } from "@/lib/client-env";
import { readLocalProjectIdentity, unsafeLocalProjectMessage } from "@/lib/local-project-identity";
import { isDeployedClinicalKb } from "@/lib/deployed-app";
import {
appBackdrop,
answerSurface,
cn,
EmptyState,
floatingControl,
InlineNotice,
primaryControl,
textMuted,
} from "@/components/ui-primitives";
import { useAuthSession } from "@/lib/supabase/client";
import { AccountSetupDialog } from "@/components/clinical-dashboard/account-setup-dialog";
import { CrossModeLinksSection } from "@/components/clinical-dashboard/cross-mode-links";
import { useEventCallback } from "@/components/clinical-dashboard/use-event-callback";
import { AuthPanel } from "@/components/clinical-dashboard/auth-panel";
import { buildMobileSectionFabState, MobileSectionFab, ToolsHub } from "@/components/clinical-dashboard/dashboard-nav";
import { SettingsDialog } from "@/components/clinical-dashboard/settings-dialog";
import { useSidebarCollapsed } from "@/components/clinical-dashboard/use-sidebar-collapsed";
import { useTheme } from "@/components/clinical-dashboard/use-theme";
import {
deriveSidebarIdentity,
ClinicalDesktopSidebar,
ClinicalMobileSidebar,
} from "@/components/clinical-dashboard/ClinicalSidebar";
import {
SetupChecklist,
UploadPanel,
IndexingMonitor,
IngestionQualityConsole,
LibraryHealthStrip,
fallbackSetupChecks,
hasReadyRequiredPublicSearchConfig,
hasReadyPublicSearchSetup,
type SetupCheck,
type IngestionQualityReviewItem,
} from "@/components/clinical-dashboard/DocumentManagerPanel";
import { GuideDialog, GuideTrigger, UtilityDrawer } from "@/components/clinical-dashboard/dashboard-shell";
import { sanitizeAnswerDisplayText, sanitizeDisplayText } from "@/components/clinical-dashboard/display-text";
import {
isPreformattedGroundedAnswer,
NaturalLanguageAnswer,
ScopeAndGovernanceNotice,
UserQuestionBubble,
} from "@/components/clinical-dashboard/answer-content";
import { AnswerEmptyState, AnswerProgressStepper, AnswerSkeleton } from "@/components/clinical-dashboard/answer-status";
import {
type AnswerProgressUpdate,
type TimedAnswerProgressUpdate,
} from "@/components/clinical-dashboard/answer-progress";
import { evidenceMapRowsFromRenderModel } from "@/components/clinical-dashboard/evidence-map-model";
import { MasterSearchHeader } from "@/components/clinical-dashboard/master-search-header";
import { UniversalSearchAlsoMatches } from "@/components/clinical-dashboard/universal-search-also-matches";
import { useScrollHideReporter } from "@/components/clinical-dashboard/use-hide-on-scroll";
import { SearchCommandProvider } from "@/components/clinical-dashboard/search-command-context";
import {
answerReferencesDocument,
answerTimedOutError,
applyRenamedDocumentToAnswer,
compactScopeFilters,
hasActiveIndexingWork,
hasNonProductionSupabaseApiKeyFallback,
isAbortError,
mergeDocumentRefresh,
normalizeNavigationHash,
setupNeedsSlowRecheck,
setupRecheckPollMs,
shorterPollDelay,
} from "@/components/clinical-dashboard/clinical-dashboard-helpers";
import { answerRecovery, errorCopy } from "@/lib/ui-copy";
imp

🤖 Prompt for 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.

In `@tests/audit-navigation-auth-regressions.test.ts` around lines 126 - 128,
Update the ClinicalDashboard.tsx implementation or the corresponding
clinicalDashboardSource assertion so the root dashboard contains exactly one
visually hidden H1 with the text “Clinical KB”, matching the contract checked by
the test.

Source: Linters/SAST tools

Comment thread tests/ui-accessibility.spec.ts Outdated
@BigSimmo

Copy link
Copy Markdown
Owner Author

No-op/duplicate cleanup PR: head branch tree is identical to origin/main after unique-tree alignment; regression fix from #822 is already in main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant