Skip to content

DSM: add diagnosis reference mode#661

Merged
BigSimmo merged 18 commits into
mainfrom
codex/dsm-main-integration-20260714
Jul 14, 2026
Merged

DSM: add diagnosis reference mode#661
BigSimmo merged 18 commits into
mainfrom
codex/dsm-main-integration-20260714

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a dedicated DSM-5 Diagnosis mode backed by a local 146-diagnosis catalogue.
  • Add DSM home, search, diagnosis detail, differential-considerations, and comparison routes.
  • Integrate DSM into the shared header/sidebar, app-mode routing, universal search, sitemap, and accessibility contracts.
  • Preserve the latest main additions, including Specifiers, while resolving the integration conflicts.

Why

This recovers and completes the DSM implementation prepared in the side task, then integrates it through the current Database design system and protected-branch workflow.

Areas touched

  • src/app/dsm, src/components/dsm, src/data/dsm-clinical-content.json, src/lib/dsm.ts
  • Shared app-mode, shell, sidebar, command-menu, and universal-search files
  • Generated sitemap and focused unit/Chromium coverage

Verification

  • npm run verify:cheap: passed (2,321 tests passed, 1 skipped; lint, TypeScript, sitemap, brand/type/icon checks passed)
  • Focused DSM/app-mode/sitemap/universal-search Vitest: 48/48 passed
  • Targeted Chromium DSM redirect/search/detail journey: 1/1 passed
  • npm run format:check: passed
  • npm run typecheck: passed
  • npm run check:production-readiness:ci: READY with only expected missing-secret warnings

Checks not run

  • Provider-backed Supabase/OpenAI, live retrieval, and drift checks were not run because this work is local catalogue/UI integration and provider usage was not authorized.
  • The full advisory verify:ui/release suite was not run; the changed DSM journey was exercised directly in Chromium.

Risk and governance

  • The imported catalogue is paraphrased local reference content. Formal clinical governance and any applicable regulatory review remain required before broader clinical deployment.
  • No production data, provider configuration, dependency manifest, or database schema was changed.

Summary by CodeRabbit

  • New Features
    • Added a DSM-5 Diagnosis app mode with dedicated home, search, diagnosis detail, differential review, and comparison pages (desktop + mobile), including deep-linking and compare selection.
    • Surfaced DSM-5 diagnoses in universal search and added DSM entry to the tools sidebar.
  • Documentation
    • Updated the site map and generated route/slug inventories for DSM diagnosis navigation.
  • Bug Fixes
    • Fixed a mobile tap-target issue and improved mode=dsm deep-linking/redirect behavior.
  • Tests
    • Added unit, site-map, and UI smoke coverage for DSM flows.

BigSimmo added 2 commits July 14, 2026 20:07
# Conflicts:
#	docs/site-map.md
#	scripts/generate-site-map.ts
#	src/app/page.tsx
#	src/components/clinical-dashboard/ClinicalSidebar.tsx
#	src/components/clinical-dashboard/global-search-shell.tsx
#	src/components/clinical-dashboard/master-search-header.tsx
#	src/components/clinical-dashboard/mode-action-popup.tsx
#	src/lib/app-mode-icons.ts
#	src/lib/app-modes.ts
#	tests/app-modes.test.ts
#	tests/ui-smoke.spec.ts
@supabase

supabase Bot commented Jul 14, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


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: 104cb1fb4e

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

Comment thread src/lib/universal-search-domains.ts Outdated
@BigSimmo

Copy link
Copy Markdown
Owner Author

@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.

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

CI triage

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

  • UI regressionpossible known flake: UI/Playwright job; check tests/flake-ledger.json (tests/ui-smoke.spec.ts, tests/ui-smoke.spec.ts, tests/ui-tools.spec.ts, tests/ui-tools.spec.ts) and re-run before bisecting.
  • PR requiredpossible known flake: UI/Playwright job; check tests/flake-ledger.json (tests/ui-smoke.spec.ts, tests/ui-smoke.spec.ts, tests/ui-tools.spec.ts, tests/ui-tools.spec.ts) and re-run before bisecting.

Heuristic only — a main-side or flake label is a starting point, not a verdict.

@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: 104cb1fb4e

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

Comment thread src/components/dsm/dsm-comparison-page.tsx Outdated
Comment thread src/lib/dsm.ts
@BigSimmo

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts on this branch.

@BigSimmo
BigSimmo enabled auto-merge (squash) July 14, 2026 13:18
auto-merge was automatically disabled July 14, 2026 13:20

Head branch was pushed to by a user without write access

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a DSM-5 diagnosis catalogue with search, comparison, diagnosis detail, differential review, dedicated routes, shared navigation/search integration, sitemap generation, and automated validation.

Changes

DSM-5 diagnosis mode

Layer / File(s) Summary
Catalogue model and mode contract
src/data/dsm-clinical-content.json, src/lib/dsm.ts, src/lib/app-modes.ts
Adds the diagnosis catalogue, normalized DSM types, lookup/search/differential helpers, static route data, and DSM/specifier mode definitions.
DSM route entry points
src/app/dsm/...
Adds DSM home, search, comparison, diagnosis detail, differential routes, metadata, static generation, layout, and loading behavior.
DSM user interfaces
src/components/dsm/*
Adds home, search, diagnosis, comparison, page-header, and differential-consideration interfaces with filtering, selection, comparison, and linked records.
Shared navigation and search integration
src/app/page.tsx, src/components/clinical-dashboard/..., src/lib/universal-search*.ts, src/lib/search-command-surface.ts
Wires DSM redirects, sidebar navigation, mode actions, dashboard behavior, universal search, command surfaces, domain ordering, and icons.
Sitemap generation and inventories
scripts/generate-site-map.ts, docs/site-map.md
Documents DSM routes, diagnosis slug inventories, mode examples, ownership sources, and generated sitemap handling.
Validation
tests/dsm.test.ts, tests/app-modes.test.ts, tests/site-map.test.ts, tests/universal-search.test.ts, tests/ui-smoke.spec.ts
Validates catalogue integrity, mode routing, sitemap coverage, universal search results, DSM navigation, touch targets, redirects, and keyboard navigation.

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

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Dashboard
  participant DsmRoute
  participant DsmCatalogue
  participant DsmSurface
  User->>Dashboard: select DSM mode or submit query
  Dashboard->>DsmRoute: navigate to /dsm/search
  DsmRoute->>DsmCatalogue: list and rank diagnoses
  DsmCatalogue-->>DsmRoute: diagnosis summaries
  DsmRoute->>DsmSurface: render search results
  User->>DsmSurface: open diagnosis or compare selection
  DsmSurface->>DsmRoute: navigate to detail or comparison route
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and verification, but it omits the required Clinical Governance Preflight checklist and Notes section. Add the full Clinical Governance Preflight checklist with checkbox answers, and include a Notes section to match the repository template.
Docstring Coverage ⚠️ Warning Docstring coverage is 2.04% 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, specific, and matches the main DSM diagnosis-mode change.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/dsm-main-integration-20260714

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

- Merge origin/main into branch (branch-review-ledger.md conflict)
- Prefer DSM domain over differentials in universal search domain order
- Preserve comparison IDs when navigating to Add another diagnosis
- Resolve catalogue aliases (abbreviations, initialisms, slash variants) in differential matching

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts on this branch.

Merge conflict in docs/branch-review-ledger.md resolved in commit fix(dsm): resolve merge conflict, fix P2 review findings. Both the DSM ledger row from this branch and the PR #655 rows from origin/main are preserved.

...

All three P2 Codex review findings resolved in commit fix(dsm): resolve merge conflict, fix P2 review findings:

P2 — Prefer DSM hits before differential ties (universal-search-domains.ts): Moved dsm before differentials in the canonical domain order so exact DSM catalogue matches win the Best match tiebreak over the Differentials catalogue.

P2 — Preserve selected IDs when adding diagnoses (dsm-comparison-page.tsx, dsm-search-page.tsx, src/app/dsm/search/page.tsx): The "Add another diagnosis" link now includes the current comparison slugs as ?ids=…. DsmSearchPage accepts an initialIds prop (read from the ids search param in the route) and uses it to seed the comparison selection state, so the user's previously selected diagnosis is pre-checked when they land on the search page.

P2 — Resolve catalogue aliases in differentials (dsm.ts): resolveDsmDifferential now tries three additional lookup paths before falling back to prefix matching: (1) parenthetical abbreviation extracted from the title (covers PMDD, ADHD, DSED, etc.), (2) word-initial initialism derived from the title (covers MDD, OCD, GAD, BDD, DID, BED), and (3) slash-normalised title match (covers "Persistent depressive disorder / dysthymia" → "Persistent depressive disorder (dysthymia)").

48/48 focused tests pass (dsm, universal-search, app-modes, site-map). CodeQL and code review both clean.

…714' into codex/dsm-main-integration-20260714
@BigSimmo
BigSimmo enabled auto-merge (squash) July 14, 2026 13:31
@BigSimmo

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts on this branch.

@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: 2

🧹 Nitpick comments (3)
src/lib/search-command-surface.ts (1)

81-90: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

DSM cross-modes omit specifiers despite clinical overlap.

crossModes: ["differentials", "prescribing", "documents"] doesn't include "specifiers", even though DSM diagnoses and diagnostic specifiers are closely related content domains. This is a content/UX choice rather than a defect, and may be intentional given differing scope.

🤖 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/search-command-surface.ts` around lines 81 - 90, Review the dsm
configuration’s crossModes in the search command surface and decide whether
diagnostic specifiers should be included alongside differentials, prescribing,
and documents. If the intended UX supports this clinical overlap, add the
existing "specifiers" mode while preserving the other cross-mode entries;
otherwise leave the configuration unchanged and document the intentional scope
decision.
tests/universal-search.test.ts (1)

60-61: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Hardcoded domain-order literals have drifted from the canonical source.

Both arrays place "dsm" after "presentations", but src/lib/universal-search-domains.ts's canonical array (and its comment) places "dsm" right after "forms", before "differentials"/"presentations", specifically so DSM wins tie-breaks over Differentials. These are manually duplicated literals rather than imports of the real constant, so they silently drifted when "dsm" was added.

The line 60-61 filter result happens to be unaffected today, but the mockRuntime copy at 416-425 mocks universalSearchDomains for the live/public-path suite — if any assertion there depends on dsm-vs-differentials ordering (the exact fix this PR's commit message describes), it would be exercised against the wrong order.

Prefer importing/spreading the real universalSearchDomains constant (optionally re-ordered per-test via .filter/.sort if a specific subset order is needed) instead of hand-copying the array, so future domain additions can't silently desync test fixtures from production behavior.

♻️ Suggested fix for the mockRuntime duplicate
+import { universalSearchDomains as realUniversalSearchDomains } from "`@/lib/universal-search-domains`";
...
     vi.doMock("`@/lib/universal-search`", () => ({
       runUniversalSearch,
-      universalSearchDomains: [
-        "documents",
-        "medications",
-        "services",
-        "forms",
-        "differentials",
-        "presentations",
-        "dsm",
-        "tools",
-      ],
+      universalSearchDomains: realUniversalSearchDomains,
     }));

Also applies to: 416-425

🤖 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/universal-search.test.ts` around lines 60 - 61, Replace the manually
duplicated domain-order arrays in the test, including the filter near the
current diff and the mockRuntime fixture, with the canonical
universalSearchDomains constant imported from
src/lib/universal-search-domains.ts. Preserve any test-specific subset or
ordering by deriving it from that constant rather than recreating domain
literals, ensuring DSM retains its canonical precedence over Differentials.
src/lib/dsm.ts (1)

74-74: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

P2 context (consolidated): category filter trusts a hand-maintained count instead of deriving it.

dsmCategories filters on the JSON's static diagnosis_count rather than computing it from dsmDiagnoses. Current data is internally consistent (verified all 18 categories sum to 146 and match actual counts), so this isn't a live bug — but it's a duplicate source of truth: any future diagnosis addition/removal without a matching JSON count update could silently hide a populated category from /dsm/search filters or show one with zero real results. The dataset already carries one zero-count, zero-diagnosis category ("med" / Due to Medical Condition in src/data/dsm-clinical-content.json) that only "disappears" because its count happens to be 0, not because it's derived.

Consider computing diagnosis_count from dsmDiagnoses directly so the two can't drift.

As per coding guidelines ("Automatic reviews may emit at most three inline findings... P2 context belongs in one summary"), this is folded into a single note rather than filed as a separate P1-style finding.

🤖 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/dsm.ts` at line 74, Update dsmCategories to determine category
inclusion from the diagnoses in dsmDiagnoses rather than the hand-maintained
category.diagnosis_count field. Ensure categories are retained only when they
have at least one matching diagnosis, while preserving the existing category
objects and dsmDiagnoses filtering behavior.

Source: Coding guidelines

🤖 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/components/clinical-dashboard/master-search-header.tsx`:
- Around line 613-626: Update the dsm-compare branch in the action handler to
navigate directly to the DSM comparison UI at /dsm/compare, matching the routing
behavior used by specifiers-compare, while preserving the existing DSM mode and
query setup as appropriate.

In `@src/lib/app-modes.ts`:
- Around line 183-204: Update MasterSearchHeader’s canRunLocalSearch allowlist
to include the "dsm" search kind, preserving DSM submission when realDataReady
is false. Add a targeted test covering DSM search while document readiness is
disabled, using the existing header test patterns.

---

Nitpick comments:
In `@src/lib/dsm.ts`:
- Line 74: Update dsmCategories to determine category inclusion from the
diagnoses in dsmDiagnoses rather than the hand-maintained
category.diagnosis_count field. Ensure categories are retained only when they
have at least one matching diagnosis, while preserving the existing category
objects and dsmDiagnoses filtering behavior.

In `@src/lib/search-command-surface.ts`:
- Around line 81-90: Review the dsm configuration’s crossModes in the search
command surface and decide whether diagnostic specifiers should be included
alongside differentials, prescribing, and documents. If the intended UX supports
this clinical overlap, add the existing "specifiers" mode while preserving the
other cross-mode entries; otherwise leave the configuration unchanged and
document the intentional scope decision.

In `@tests/universal-search.test.ts`:
- Around line 60-61: Replace the manually duplicated domain-order arrays in the
test, including the filter near the current diff and the mockRuntime fixture,
with the canonical universalSearchDomains constant imported from
src/lib/universal-search-domains.ts. Preserve any test-specific subset or
ordering by deriving it from that constant rather than recreating domain
literals, ensuring DSM retains its canonical precedence over Differentials.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bc3772d0-6a68-4f19-a5a2-c1434475a8bb

📥 Commits

Reviewing files that changed from the base of the PR and between c0b76a5 and f24ff03.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (34)
  • docs/branch-review-ledger.md
  • docs/site-map.md
  • scripts/generate-site-map.ts
  • src/app/dsm/compare/page.tsx
  • src/app/dsm/diagnoses/[slug]/differentials/page.tsx
  • src/app/dsm/diagnoses/[slug]/page.tsx
  • src/app/dsm/layout.tsx
  • src/app/dsm/loading.tsx
  • src/app/dsm/page.tsx
  • src/app/dsm/search/page.tsx
  • src/app/page.tsx
  • src/components/clinical-dashboard/ClinicalSidebar.tsx
  • src/components/clinical-dashboard/global-search-shell.tsx
  • src/components/clinical-dashboard/master-search-header.tsx
  • src/components/clinical-dashboard/mode-action-popup.tsx
  • src/components/clinical-dashboard/universal-search-command-surface.tsx
  • src/components/dsm/dsm-comparison-page.tsx
  • src/components/dsm/dsm-diagnosis-page.tsx
  • src/components/dsm/dsm-differential-considerations-page.tsx
  • src/components/dsm/dsm-home-page.tsx
  • src/components/dsm/dsm-page-header.tsx
  • src/components/dsm/dsm-search-page.tsx
  • src/data/dsm-clinical-content.json
  • src/lib/app-mode-icons.ts
  • src/lib/app-modes.ts
  • src/lib/dsm.ts
  • src/lib/search-command-surface.ts
  • src/lib/universal-search-domains.ts
  • src/lib/universal-search.ts
  • tests/app-modes.test.ts
  • tests/dsm.test.ts
  • tests/site-map.test.ts
  • tests/ui-smoke.spec.ts
  • tests/universal-search.test.ts

Comment thread src/components/clinical-dashboard/master-search-header.tsx
Comment thread src/lib/app-modes.ts

@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: 66a38c3162

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

Comment thread src/components/dsm/dsm-comparison-page.tsx
@BigSimmo

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts on this branch.

@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: 3

🤖 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/components/clinical-dashboard/mode-action-popup.tsx`:
- Around line 126-129: Update runModeAction in master-search-header.tsx to
handle specifiers-builder, specifiers-compare, and specifiers-map with their
intended mode, navigation, or workflow behavior before runActionAndClose is
invoked; alternatively remove these action entries from the mode-action popup if
they are not supported. Add focused tests covering each exposed action and its
resulting behavior.

In `@tests/ui-smoke.spec.ts`:
- Around line 2363-2370: Fix the syntax in the dashboard specifiers test
callback: remove the extra opening brace after `async ({ page }) =>` and replace
the invalid quote characters in the `getByRole` heading name with valid
JavaScript string quoting, preserving the expected heading text.
- Line 2369: Update the heading locator in the test’s getByRole assertion to use
ASCII string delimiters, while preserving the curly quotes around “anxious
distress” as string content so the JavaScript parses correctly.
🪄 Autofix (Beta)

❌ Autofix failed (check again to retry)

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: b096e118-fa96-4df2-9491-e2b0d0e9b73a

📥 Commits

Reviewing files that changed from the base of the PR and between f24ff03 and 56a83c3.

📒 Files selected for processing (11)
  • docs/site-map.md
  • scripts/generate-site-map.ts
  • src/app/page.tsx
  • src/components/clinical-dashboard/ClinicalSidebar.tsx
  • src/components/clinical-dashboard/global-search-shell.tsx
  • src/components/clinical-dashboard/master-search-header.tsx
  • src/components/clinical-dashboard/mode-action-popup.tsx
  • src/lib/app-mode-icons.ts
  • src/lib/app-modes.ts
  • tests/app-modes.test.ts
  • tests/ui-smoke.spec.ts
🚧 Files skipped from review as they are similar to previous changes (7)
  • src/lib/app-mode-icons.ts
  • src/components/clinical-dashboard/ClinicalSidebar.tsx
  • src/components/clinical-dashboard/global-search-shell.tsx
  • src/components/clinical-dashboard/master-search-header.tsx
  • docs/site-map.md
  • src/lib/app-modes.ts
  • scripts/generate-site-map.ts

Comment thread src/components/clinical-dashboard/mode-action-popup.tsx
Comment thread tests/ui-smoke.spec.ts Outdated
Comment thread tests/ui-smoke.spec.ts Outdated
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Cannot run autofix: This PR has merge conflicts.

Please resolve the conflicts with the base branch and try again.

Alternatively, use @coderabbitai resolve merge conflict to automatically resolve the conflicts.

@BigSimmo

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts on this branch.

…ation-20260714

# Conflicts:
#	src/components/clinical-dashboard/universal-search-command-surface.tsx
#	src/lib/app-modes.ts
#	src/lib/universal-search-domains.ts
#	src/lib/universal-search.ts
#	tests/universal-search.test.ts

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts on this branch.

Merge conflicts resolved in commit 3f9d6f0. The branch is now up to date with origin/main (PRs #658, #654, #665, #664, #663 — mode-aware universal search, a11y fixes, and medication top-4 overhaul).

5 conflicted files were resolved, combining both sides — dsm/specifiers from this branch and specifiers/formulation from main now coexist across:

  • app-modes.ts — adopted the as const array from main, added dsm and specifiers
  • universal-search-domains.ts — type union now includes both dsm and specifiers; array already had both
  • universal-search.ts — both dsm and specifiers domain handlers registered; both deep-link case branches kept
  • universal-search-command-surface.tsxdomainsByTargetMode has both dsm: ["dsm"] and formulation: ["specifiers"]; modeIdByDomain maps both; domainHeadings has both
  • universal-search.test.ts — both DSM and formulation catalogue assertions kept; domain-order arrays include both

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 2 file(s) based on 2 unresolved review comments.

Files modified:

  • src/components/clinical-dashboard/master-search-header.tsx
  • src/components/clinical-dashboard/mode-action-popup.tsx

Commit: f6aa414ce2dcf0227d70d6834532463a003dae6a

The changes have been pushed to the codex/dsm-main-integration-20260714 branch.

Time taken: 16m 40s

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

⚠️ Branch updated during autofix.

The branch was updated while autofix was in progress. Please try again.

Fixed 2 file(s) based on 2 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@BigSimmo
BigSimmo enabled auto-merge (squash) July 14, 2026 15:28
Remove stale @/lib/specifiers site-map imports, restore DSM/specifier mode-context mappings, and fix the broken ui-smoke redirect test so typecheck, unit, and static PR gates can pass after the formulation workspace merge.

Co-authored-by: Cursor <cursoragent@cursor.com>

@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: 0a85e2b4d8

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

Comment thread src/components/dsm/dsm-comparison-page.tsx Outdated
Comment thread src/lib/dsm.ts Outdated

@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: 06f129aa8a

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

Comment thread src/lib/dsm.ts Outdated
Comment thread src/components/clinical-dashboard/mode-action-popup.tsx
BigSimmo and others added 3 commits July 15, 2026 00:07
Format the five Prettier-failing files so CI static checks pass, preserve compare selection ids when choosing diagnoses, and strip title parentheticals before building initialisms so aliases like PDD resolve correctly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Route Specifiers builder/compare/map actions to Formulation destinations, and include title abbreviations/initialisms in DSM search ranking so queries like MDD/PDD surface the right diagnoses.

Co-authored-by: Cursor <cursoragent@cursor.com>
ESLint --max-warnings 0 failed on the unused local domain-to-mode map after universalSearchModeForDomain took over that lookup.

Co-authored-by: Cursor <cursoragent@cursor.com>

@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: b367aeb084

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

Comment thread src/lib/dsm.ts Outdated
Comment thread src/components/dsm/dsm-search-page.tsx Outdated
BigSimmo and others added 2 commits July 15, 2026 00:29
The home heading uses curly quotes around the query, matching the Specifiers redirect smoke coverage, so the straight-quote assertion timed out.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep comparison ids on category filter links, and add common AU/US DSM spelling variants so queries like generalized anxiety disorder rank the catalogue record first.

Co-authored-by: Cursor <cursoragent@cursor.com>

@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: 9e013894b2

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

Comment thread src/components/clinical-dashboard/master-search-header.tsx
@BigSimmo
BigSimmo merged commit 430f27f into main Jul 14, 2026
34 checks passed
@BigSimmo
BigSimmo deleted the codex/dsm-main-integration-20260714 branch July 18, 2026 18:37
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.

2 participants