Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/branch-review-ledger.md
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,7 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie
| 2026-08-08 | dependabot/npm_and_yarn/js-yaml-4.3.1 | a79943df33e653d2a65d4db2f192ee77c22ab75a | PR #1668 unblock | late-synced main after CI green on f04a96c3; merge-tree clean (GitHub DIRTY was stale); js-yaml 4.3.1 + nanoid 3.3.18 preserved; no unresolved threads; CI re-run after push | pre-late-sync: PR required pass on f04a96c3; Production UI skipped; post-sync pending |
| 2026-08-08 | cursor/safety-plan-copy-timer-a650 | cf57b34a36b768e150cd776f7e19acfd984245f7 | PR #1717 unblock | fixed missing it() closer from Copilot autofix; merged origin/main after #1668; merge-tree clean; no unresolved threads | local: vitest patient-safety-plan.dom.test.tsx (8/8); format ok; pending hosted CI after push |
| 2026-08-08 | cursor/safety-plan-copy-timer-a650 | 3142eb9a93275ce2c2435523560b4ed6624d8f53 | PR #1717 unblock | fixed parse + no-explicit-any from Copilot autofix; merged origin/main after #1668; merge-tree clean; 0 threads | local: vitest 8/8; eslint file clean; format ok; pending hosted CI |
| 2026-08-08 | cursor/more-modes-popup-2f4b | 04e6a80653c3ccf103577f6c3886b162498621ed | sidebar more-modes sheet popup | pass | focused-pw tablet rail; test:focused ClinicalSidebar; favourites+therapy wiring; verify:pr-local stages+build+rag-fixtures |
| 2026-08-08 | cursor/more-modes-popup-2f4b | bea4b0c09b74368cf6d63e944bac9c1eec6b0c93 | sidebar more-modes sheet popup | pass | focused-pw tablet rail; test:focused ClinicalSidebar; favourites+therapy wiring; verify:pr-local stages+build+rag-fixtures |
| 2026-08-08 | cursor/specifiers-builder-mobile-f72a | 894677891e2793cadc721b106e5abb715ff918e3 | specifiers-builder-pathway-mobile | pass-pathway-strip-and-mobile-overflow | npm run test:e2e -- tests/ui-specifiers.spec.ts --project=chromium: 6 passed |
| 2026-08-08 | cursor/differentials-query-lit-stream-8bc0 | bed84986742ca85b3724dd3ccc0758d4b9649934 | differentials diagnoses query-lit stream | implemented query-lit Diagnoses stream with match jump, related clusters, compare select, browse chapters; PR #1757 | unit:pass;lint:pass;typecheck:pass;verify:ui:not-run |
| 2026-08-08 | cursor/differentials-query-lit-stream-8bc0 | 106124d8084a1eab2eddab828076d10f96d3cedc | differentials diagnoses query-lit stream | implemented query-lit Diagnoses stream with match jump, related clusters, compare select, browse chapters; PR #1757 | unit:pass;lint:pass;typecheck:pass;verify:ui:not-run |
| 2026-08-08 | cursor/differentials-query-lit-stream-8bc0 (PR #1757) | e7529dd2dd847b0bfd4b53daa723a8f5a329a50e | heavy review-and-fix | synced main; fixed P1 compare id drop + P2 mobile threshold + P2 query normalize; 3 threads need reply (API 403) | vitest differential-stream+differentials-navigation+differentials 42 passed; no provider-backed checks |
Expand Down Expand Up @@ -823,3 +822,5 @@ Records before 2026-07-28 were written by hand and had drifted: 146 lines carrie
| 2026-08-08 | cursor/safety-snapshot-mobile-4ab3 | ef9a5ed85a3e16dd38bca39d5a6a7e0056c7d42d | differentials Safety Snapshot mobile density redesign | ship; final tip after Watch-for tighten + ledger supersede; phone 390 PASS; unit 21/21 | test:differential-detail,phone-visual-390,build |
| 2026-08-07 | PR #1686 / cursor/site-testing-speed-08c1 | 4dca89079dbfb5bb676ccc385d7dbafcd8ab90f5 | testing-speed: phone-chrome keep-root, pr-local #167, explicit UI shards, viewport trim, playwright revision #255 | implemented; focused + ci-workflow contracts green; Production UI wall-time confirmation pending first CI run | vitest focused+ci-workflows; playwright-pr-shards --validate; check:playwright-browser-revision; check:outstanding-issues |
| 2026-08-07 | cursor/site-testing-speed-08c1 | 91bac89827ae2f4f0e59aeed7de6344fe8779a95 | PR #1686 Autopilot+Bugbot review-and-fix: conflicts, threads, Static PR checks, CI/testing selection | fixed: merged origin/main (outstanding-issues #167/#255 archive + #256 keep); removed unused pathToFileURL; added ui-forms-section-nav to PR UI shards (21 specs); no unresolved threads; Bugbot unavailable (usage limit). Local: eslint file max-warnings0, vitest 36/36 focused, shard --validate OK, check:outstanding-issues OK. verify:cheap/pr-local blocked by foreign worktree heavy lock (PID 26228). | eslint scripts/playwright-pr-shards.mjs --max-warnings 0; vitest 36 passed; playwright-pr-shards --validate 21; check:outstanding-issues; verify:cheap/pr-local lock-blocked |
Comment thread
cursor[bot] marked this conversation as resolved.
| 2026-08-08 | cursor/more-modes-popup-2f4b | 04e6a80653c3ccf103577f6c3886b162498621ed | sidebar more-modes sheet popup | pass | focused-pw tablet rail; test:focused ClinicalSidebar; favourites+therapy wiring; verify:pr-local stages+build+rag-fixtures |
| 2026-08-08 | cursor/more-modes-popup-2f4b | bea4b0c09b74368cf6d63e944bac9c1eec6b0c93 | sidebar more-modes sheet popup | pass | focused-pw tablet rail; test:focused ClinicalSidebar; favourites+therapy wiring; verify:pr-local stages+build+rag-fixtures |
79 changes: 41 additions & 38 deletions src/components/specifiers/specifier-builder-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
SpecifierBreadcrumbs,
SpecifierPageShell,
SpecifierSafetyNote,
SpecifierWordingPathway,
specifierCard,
} from "@/components/specifiers/specifier-ui";
import { cn, eyebrowText } from "@/components/ui-primitives";
Expand Down Expand Up @@ -84,37 +85,35 @@ export function SpecifierBuilderPage({ initialSpecifiers = [] }: { initialSpecif
<SpecifierPageShell>
<SpecifierBreadcrumbs current="Build wording" />

<header className="grid gap-2 border-b border-[color:var(--border)] pb-5">
<header className="grid min-w-0 gap-2 border-b border-[color:var(--border)] pb-5">
<p className={eyebrowText}>Structured diagnostic language</p>
<h1 className="text-3xl font-extrabold tracking-tight text-[color:var(--text-heading)] sm:text-4xl">
<h1 className="text-3xl font-extrabold tracking-tight break-words text-[color:var(--text-heading)] sm:text-4xl">
Build the diagnosis in the right order
</h1>
<p className="max-w-3xl text-sm font-medium leading-6 text-[color:var(--text-muted)]">
Start with the base diagnosis, then add episode features, course or onset, and one current severity or
remission descriptor.
</p>
</header>

<div className="grid gap-5 xl:grid-cols-[minmax(0,1fr)_23rem]">
<div className="grid gap-4">
<section className={cn(specifierCard, "grid gap-3 p-4 sm:p-5")}>
<div className="flex items-center gap-3">
<span className="nums grid h-8 w-8 place-items-center rounded-full bg-[color:var(--clinical-accent)] text-xs font-extrabold text-[color:var(--clinical-accent-contrast)]">
<SpecifierWordingPathway />

<div className="grid min-w-0 gap-5 xl:grid-cols-[minmax(0,1fr)_23rem]">
<div className="grid min-w-0 gap-4">
<section className={cn(specifierCard, "grid min-w-0 gap-3 p-4 sm:p-5")}>
<div className="flex min-w-0 items-center gap-3">
<span className="nums grid h-8 w-8 shrink-0 place-items-center rounded-full bg-[color:var(--clinical-accent)] text-xs font-extrabold text-[color:var(--clinical-accent-contrast)]">
1
</span>
<div>
<div className="min-w-0">
<p className={eyebrowText}>Base diagnosis</p>
<h2 className="text-lg font-extrabold text-[color:var(--text-heading)]">
<h2 className="text-lg font-extrabold break-words text-[color:var(--text-heading)]">
Name the disorder and episode
</h2>
</div>
</div>
<label className="grid gap-1.5">
<label className="grid min-w-0 gap-1.5">
<span className="text-xs font-bold text-[color:var(--text-muted)]">Diagnostic phrase</span>
<select
value={diagnosisId}
onChange={(event) => changeDiagnosis(event.target.value as SpecifierBuilderDiagnosis)}
className="min-h-12 rounded-lg border border-[color:var(--border-strong)] bg-[color:var(--surface)] px-3 text-sm font-bold text-[color:var(--text-heading)] shadow-[var(--shadow-inset)] outline-none focus:border-[color:var(--focus)] focus:ring-4 focus:ring-[color:var(--focus)]/20"
className="min-h-12 w-full max-w-full rounded-lg border border-[color:var(--border-strong)] bg-[color:var(--surface)] px-3 text-sm font-bold text-[color:var(--text-heading)] shadow-[var(--shadow-inset)] outline-none focus:border-[color:var(--focus)] focus:ring-4 focus:ring-[color:var(--focus)]/20"
>
{diagnosisPresets.map((item) => (
<option key={item.id} value={item.id}>
Expand All @@ -131,25 +130,27 @@ export function SpecifierBuilderPage({ initialSpecifiers = [] }: { initialSpecif
const records = specifierRecords.filter((record) => record.family === family.id);
const singleChoice = family.id === "severity-remission";
return (
<section key={family.id} className={cn(specifierCard, "overflow-hidden")}>
<div className="flex items-center gap-3 border-b border-[color:var(--border)] px-4 py-3 sm:px-5">
<span className="nums grid h-8 w-8 place-items-center rounded-full bg-[color:var(--clinical-accent-soft)] text-xs font-extrabold text-[color:var(--clinical-accent)]">
<section key={family.id} className={cn(specifierCard, "min-w-0 overflow-hidden")}>
<div className="flex min-w-0 items-center gap-3 border-b border-[color:var(--border)] px-4 py-3 sm:px-5">
<span className="nums grid h-8 w-8 shrink-0 place-items-center rounded-full bg-[color:var(--clinical-accent-soft)] text-xs font-extrabold text-[color:var(--clinical-accent)]">
{familyIndex + 2}
</span>
<div>
<div className="min-w-0">
<p className={eyebrowText}>{singleChoice ? "Choose up to one" : "Choose when supported"}</p>
<h2 className="text-lg font-extrabold text-[color:var(--text-heading)]">{family.label}</h2>
<h2 className="text-lg font-extrabold break-words text-[color:var(--text-heading)]">
{family.label}
</h2>
</div>
</div>
<div className="grid sm:grid-cols-2">
<div className="grid min-w-0 sm:grid-cols-2">
{records.map((record, index) => {
const checked = selected.includes(record.slug);
const compatible = specifierAppliesToBuilderDiagnosis(record, diagnosisId);
return (
<label
key={record.slug}
className={cn(
"group grid cursor-pointer grid-cols-[2rem_minmax(0,1fr)] gap-3 border-b border-[color:var(--border)] px-4 py-3.5 transition hover:bg-[color:var(--surface-subtle)] sm:px-5",
"group grid min-w-0 cursor-pointer grid-cols-[2rem_minmax(0,1fr)] gap-3 border-b border-[color:var(--border)] px-4 py-3.5 transition hover:bg-[color:var(--surface-subtle)] sm:px-5",
index % 2 === 1 && "sm:border-l",
checked && "bg-[color:var(--clinical-accent-soft)]/55",
!compatible && "cursor-not-allowed opacity-50",
Expand All @@ -172,11 +173,11 @@ export function SpecifierBuilderPage({ initialSpecifiers = [] }: { initialSpecif
>
<Check className="h-4 w-4" aria-hidden />
</span>
<span>
<span className="block text-sm font-extrabold text-[color:var(--text-heading)]">
<span className="min-w-0">
<span className="block text-sm font-extrabold break-words text-[color:var(--text-heading)]">
{record.shortName}
</span>
<span className="mt-1 block text-xs font-medium leading-5 text-[color:var(--text-muted)]">
<span className="mt-1 block text-xs font-medium leading-5 break-words text-[color:var(--text-muted)]">
{compatible ? record.clinicalSignal : "Not applicable to the selected diagnosis."}
</span>
</span>
Expand All @@ -189,36 +190,38 @@ export function SpecifierBuilderPage({ initialSpecifiers = [] }: { initialSpecif
})}
</div>

<aside className="grid content-start gap-4 xl:sticky xl:top-20">
<section className="overflow-hidden rounded-lg border border-[color:var(--clinical-accent-border)] bg-[color:var(--surface)] shadow-[var(--shadow-soft)]">
<div className="flex items-center gap-3 border-b border-[color:var(--clinical-accent-border)] bg-[color:var(--clinical-accent-soft)] px-4 py-3">
<span className="grid h-9 w-9 place-items-center rounded-lg bg-[color:var(--clinical-accent)] text-[color:var(--clinical-accent-contrast)]">
<aside className="grid min-w-0 content-start gap-4 xl:sticky xl:top-20">
<section className="min-w-0 overflow-hidden rounded-lg border border-[color:var(--clinical-accent-border)] bg-[color:var(--surface)] shadow-[var(--shadow-soft)]">
<div className="flex min-w-0 items-center gap-3 border-b border-[color:var(--clinical-accent-border)] bg-[color:var(--clinical-accent-soft)] px-4 py-3">
<span className="grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-[color:var(--clinical-accent)] text-[color:var(--clinical-accent-contrast)]">
<FileCheck2 className="h-4 w-4" aria-hidden />
</span>
<div>
<div className="min-w-0">
<p className={cn(eyebrowText, "!text-[color:var(--clinical-accent)]")}>Working diagnosis</p>
<h2 className="text-base font-extrabold text-[color:var(--text-heading)]">Structured wording</h2>
</div>
</div>
<div className="grid gap-4 p-4">
<p className="text-base font-extrabold leading-7 text-[color:var(--text-heading)]">{wording}</p>
<div className="grid gap-2 border-t border-[color:var(--border)] pt-3">
<div className="grid min-w-0 gap-4 p-4">
<p className="min-w-0 text-base font-extrabold leading-7 break-words text-[color:var(--text-heading)]">
{wording}
</p>
<div className="grid min-w-0 gap-2 border-t border-[color:var(--border)] pt-3">
<p className={eyebrowText}>Applied specifiers</p>
{selectedRecords.length ? (
<ul className="grid gap-2">
<ul className="grid min-w-0 gap-2">
{selectedRecords.map((record) => (
<li
key={record.slug}
className="flex items-center justify-between gap-2 text-sm font-semibold text-[color:var(--text-muted)]"
className="flex min-w-0 items-center justify-between gap-2 text-sm font-semibold text-[color:var(--text-muted)]"
>
<span className="inline-flex items-center gap-2">
<Tags className="h-3.5 w-3.5 text-[color:var(--clinical-accent)]" aria-hidden />
<span className="inline-flex min-w-0 items-center gap-2 break-words">
<Tags className="h-3.5 w-3.5 shrink-0 text-[color:var(--clinical-accent)]" aria-hidden />
{record.shortName}
</span>
<Link
href={`/specifiers/${record.slug}`}
aria-label={`Review ${record.shortName}`}
className="grid h-tap w-tap place-items-center rounded-md text-[color:var(--clinical-accent)] hover:bg-[color:var(--clinical-accent-soft)]"
className="grid h-tap w-tap shrink-0 place-items-center rounded-md text-[color:var(--clinical-accent)] hover:bg-[color:var(--clinical-accent-soft)]"
>
<ArrowRight className="h-4 w-4" aria-hidden />
</Link>
Expand Down
23 changes: 2 additions & 21 deletions src/components/specifiers/specifier-map-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
SpecifierFamilyBadge,
SpecifierPageShell,
SpecifierSafetyNote,
SpecifierWordingPathway,
specifierCard,
} from "@/components/specifiers/specifier-ui";
import { cn, eyebrowText } from "@/components/ui-primitives";
Expand All @@ -34,27 +35,7 @@ export function SpecifierMapPage({ initialSlug }: { initialSlug?: string }) {
</p>
</header>

<section
aria-label="Specifier wording pathway"
className="grid gap-2 rounded-lg border border-[color:var(--clinical-accent-border)] bg-[color:var(--clinical-accent-soft)] p-3 sm:grid-cols-[minmax(9rem,0.8fr)_auto_minmax(9rem,1fr)_auto_minmax(9rem,1fr)_auto_minmax(9rem,1fr)] sm:items-center"
>
{["Base diagnosis", "Episode features", "Course and onset", "Severity or remission"].map((label, index) => (
<div key={label} className="contents">
<div className="flex min-h-12 items-center gap-2 rounded-lg border border-[color:var(--border)] bg-[color:var(--surface)] px-3 text-sm font-extrabold text-[color:var(--text-heading)] shadow-[var(--shadow-inset)]">
<span className="nums grid h-7 w-7 shrink-0 place-items-center rounded-full bg-[color:var(--clinical-accent)] text-xs text-[color:var(--clinical-accent-contrast)]">
{index + 1}
</span>
{label}
</div>
{index < 3 ? (
<ArrowRight
className="hidden h-4 w-4 justify-self-center text-[color:var(--clinical-accent)] sm:block"
aria-hidden
/>
) : null}
</div>
))}
</section>
<SpecifierWordingPathway />

<div className="grid gap-5 xl:grid-cols-[minmax(0,1fr)_22rem]">
<section className="grid min-w-0 gap-4 lg:grid-cols-3" aria-label="Specifier families">
Expand Down
Loading
Loading