Skip to content

fix: remediate dark mode audit issues#1190

Closed
BigSimmo wants to merge 3 commits into
mainfrom
remediate-dark-mode-audit
Closed

fix: remediate dark mode audit issues#1190
BigSimmo wants to merge 3 commits into
mainfrom
remediate-dark-mode-audit

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Addresses dark mode audit findings and resolves conflicts. Fully linted.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 105 files, which is 5 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 521fe5db-7156-40f9-84f4-421434401b55

📥 Commits

Reviewing files that changed from the base of the PR and between fc9d162 and 00eca49.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (105)
  • .agents/skills/catalog.json
  • .agents/skills/prompt-perfector/SKILL.md
  • .gitattributes
  • .github/workflows/ci.yml
  • .github/workflows/pr-policy.yml
  • .npmrc
  • AGENTS.md
  • data/forms-catalog.json
  • docs/audit-handover-2026-07-14.md
  • docs/audit/repo-audit-2026-07-01.md
  • docs/audit/repo-wide-review-remediation-plan-2026-07-23.md
  • docs/audit/repo-wide-review-sweep-2026-07-19.md
  • docs/branch-review-ledger.md
  • docs/clinical-governance.md
  • docs/codex-review-protocol.md
  • docs/database-drift-detection.md
  • docs/ingestion-concurrency-fix-workorder.md
  • docs/outstanding-issues.md
  • docs/process-hardening.md
  • docs/search-chrome-behaviour.md
  • eslint-rules/no-hardcoded-hex.mjs
  • eslint.config.mjs
  • package.json
  • playwright.config.ts
  • scripts/audit-formatting-fixtures.ts
  • scripts/check-branch-review-ledger.mjs
  • scripts/check-github-action-pins.mjs
  • src/app/api/answer/route.ts
  • src/app/api/answer/stream/route.ts
  • src/app/api/documents/[id]/reindex/route.ts
  • src/app/api/documents/bulk/reindex/route.ts
  • src/app/api/documents/bulk/route.ts
  • src/app/api/search/route.ts
  • src/app/api/upload/route.ts
  • src/app/globals.css
  • src/app/layout.tsx
  • src/app/manifest.ts
  • src/app/privacy/page.tsx
  • src/app/reference/colour-coding/page.tsx
  • src/components/ClinicalDashboard.tsx
  • src/components/DocumentViewer.tsx
  • src/components/clinical-dashboard/ClinicalSidebar.tsx
  • src/components/clinical-dashboard/document-admin.tsx
  • src/components/clinical-dashboard/favourites-hub.tsx
  • src/components/clinical-dashboard/global-search-shell.tsx
  • src/components/clinical-dashboard/mobile-composer-reserve.ts
  • src/components/clinical-dashboard/provider-brand-icons.tsx
  • src/components/clinical-dashboard/settings-dialog.tsx
  • src/components/clinical-dashboard/signed-image.tsx
  • src/components/clinical-dashboard/use-theme.ts
  • src/components/differentials/differential-presentation-workflow-page.tsx
  • src/components/document-viewer/source-panels.tsx
  • src/components/document-viewer/types.ts
  • src/components/favourites-page-mockups/favourites-library-redesign-page.tsx
  • src/components/forms/form-detail-page.tsx
  • src/components/master-document-flow-mockups.tsx
  • src/components/mode-home-template.tsx
  • src/components/navigation-back-button.tsx
  • src/components/patient-safety-plan.tsx
  • src/components/services/service-detail-page.tsx
  • src/components/services/services-home-page.tsx
  • src/components/services/services-navigator-page.tsx
  • src/components/ui-primitives.tsx
  • src/components/ui/sheet.tsx
  • src/lib/answer-render-policy.ts
  • src/lib/compact-best-use-title.ts
  • src/lib/document-detail-contract.ts
  • src/lib/document-detail.ts
  • src/lib/form-catalog.ts
  • src/lib/ingestion-mutation-safety.ts
  • src/lib/search-scope.ts
  • src/lib/service-catalog-mapper.ts
  • src/lib/source-authority-metadata.ts
  • src/lib/source-authority-registry.ts
  • src/lib/source-metadata.ts
  • src/lib/supabase/database.types.ts
  • src/lib/validation/answer-request.ts
  • supabase/drift-manifest.json
  • supabase/migrations/20260724120000_create_uploaded_document_with_ingestion_job.sql
  • supabase/schema.sql
  • tests/accessible-table.dom.test.tsx
  • tests/answer-render-policy.test.ts
  • tests/audit-content-services-regressions.test.ts
  • tests/clinical-dashboard-merge-artifacts.test.ts
  • tests/document-detail-performance.test.ts
  • tests/favourites-auth-gate.test.ts
  • tests/favourites-hub-unavailable-controls.dom.test.tsx
  • tests/formatting-fixture-audit.test.ts
  • tests/forms-back-navigation.dom.test.tsx
  • tests/forms.test.ts
  • tests/ingestion-mutation-safety.test.ts
  • tests/mobile-composer-reserve.test.ts
  • tests/navigation-back-button.dom.test.tsx
  • tests/pdf-extraction-budget.test.ts
  • tests/private-access-routes.test.ts
  • tests/search-scope.test.ts
  • tests/services-catalog.test.ts
  • tests/signed-image.dom.test.tsx
  • tests/source-authority-tooling.test.ts
  • tests/ui-overlay-css-contract.test.ts
  • tests/ui-tools.spec.ts
  • tests/visual-evidence-tabs.dom.test.tsx
  • worker/main.ts
  • worker/python/extract_pdf_assets.py
  • worker/python/test_extract_pdf_assets_budget.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remediate-dark-mode-audit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@supabase

supabase Bot commented Jul 25, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy due to reaching the limit of concurrent preview branches.
Go to Project Integrations Settings ↗︎ if you wish to update this limit.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 00eca49b9b

ℹ️ 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".

for (const filePath of discoverGitHubActionFiles(process.cwd())) {
const fileName = path.relative(process.cwd(), filePath).replaceAll("\\", "/");
const lines = readFileSync(filePath, "utf8").split(/\r?\n/);
function discoverCompositeActionFiles(root) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove the duplicate composite-action helper

Whenever CI or verify:cheap runs npm run check:github-actions, Node rejects this ES module before executing any checks because this new discoverCompositeActionFiles declaration duplicates the existing declaration at line 176. The exact command currently fails with SyntaxError: Identifier 'discoverCompositeActionFiles' has already been declared, so the required CI job cannot pass; consolidate the implementations and retain a self-test for recursive composite-action discovery.

Useful? React with 👍 / 👎.

Comment thread worker/main.ts
Comment on lines +1213 to 1214
if (data.searchable !== false || retainForDocumentView) {
insertedImages.push({

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep viewer-only images out of retrieval inputs

When a table/diagram/page crop falls outside the caption budget, it is deliberately persisted with searchable: false and needs-review, but this condition still adds it to insertedImages. That array is subsequently passed to buildVisualDocumentIndexUnitInputs and buildAdditionalEmbeddingFieldInputs, creating searchable embeddings/index units and linking the uncaptioned crop to retrieved chunks despite the non-searchable classification; such crops can therefore influence clinical answers. Split viewer-retained rows from retrieval images or filter them before every retrieval input, and cover a below-caption-budget crop in an offline retrieval test.

AGENTS.md reference: AGENTS.md:L256-L259

Useful? React with 👍 / 👎.

navigateToMode(searchMode, { focus: true });
}
}}
onMobileBack={() => router.back()}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Route mobile back actions to a stable in-app parent

On mobile information pages opened directly, from an external site, or in a new tab, router.back() either leaves the application or has no useful destination. This replaces the prior route-specific parent mapping while the form detail page's own canonical back control is also removed, so affected pages can lose their only reliable in-app exit; restore an explicit router.push fallback for each information-page family, with history behavior only when it is known to be safe.

AGENTS.md reference: AGENTS.md:L192-L195

Useful? React with 👍 / 👎.

Comment on lines +1 to +3
<<<<<<< ours
<<<<<<< ours
<<<<<<< ours

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Resolve the committed remediation-plan conflict markers

The newly added remediation plan begins with unresolved merge markers and contains additional marker blocks around lines 308 and 422–472, interleaving incompatible plan fragments and making the document unreliable as an execution handoff. git diff --check 7278a9c^ 7278a9c reproduces the failure; resolve the intended version rather than committing both sides.

Useful? React with 👍 / 👎.

BigSimmo added a commit that referenced this pull request Jul 25, 2026
…gressions (#1214)

* chore: implement dark mode audit recommendations

* fix(theme): salvage dark-mode audit delta without clinical regressions

Cherry-pick the intentional dark-mode commit from PR #1190 onto current main,
keep trustGatedAnswerForClinicalNotes, drop unused manifest theme imports, and
normalize the no-hardcoded-hex ESLint rule export.

* style: prettier-format dark-mode salvage files

* test(pwa): expect theme colors on meta/viewport, not static manifest

Matches the dark-mode salvage that removed locked theme_color/background_color
from the PWA manifest so light/dark can update at runtime.

* chore: retrigger CI after pr-branch-sync bot merge

Bot-authored main sync left required CI on action_required; this agent commit
re-triggers human-authored checks for PR #1214.

* chore: skip-branch-sync and retrigger CI for #1214 merge

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@BigSimmo BigSimmo closed this Jul 25, 2026
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