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
12 changes: 6 additions & 6 deletions src/app/therapy-compass/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { Suspense, type ReactNode } from "react";
import { GlobalSearchShell } from "@/components/clinical-dashboard/global-search-shell";
import { TherapyCompassWorkspace } from "@/components/therapy-compass";

// Therapy Compass keeps the universal header + rail but provides its own primary
// search surface (the in-tool therapy search), so the shared search composer is
// suppressed here. The workspace is mounted at the layout level so the therapy
// dataset and interaction state are shared across every /therapy-compass/* route,
// while each route renders its own screen into the workspace's main content.
// Therapy Compass uses the same universal header, rail, and responsive search
// composer as the other mode homes. The workspace is mounted at the layout level
// so the therapy dataset and interaction state are shared across every
// /therapy-compass/* route, while each route renders its own screen into the
// workspace's main content.
export default function TherapyCompassLayout({ children }: { children: ReactNode }) {
return (
<GlobalSearchShell initialMode="therapy-compass" searchComposerVisible={false}>
<GlobalSearchShell initialMode="therapy-compass">
{/* The workspace provider reads useSearchParams; an explicit boundary lets the
route family prerender on its own, independent of the shell's Suspense. */}
<Suspense fallback={null}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ function GlobalStandaloneSearchShellClient({
(searchMode === "specifiers" && pathname === "/specifiers") ||
(searchMode === "formulation" && pathname === "/formulation") ||
(searchMode === "factsheets" && pathname === "/factsheets") ||
(searchMode === "therapy-compass" && pathname === "/therapy-compass") ||
(searchMode === "tools" && pathname === "/tools"));
const isDifferentialPresentationWorkflow = pathname.startsWith("/differentials/presentations");
const shouldShowDesktopSidebar = !hideDesktopSidebar;
Expand Down
50 changes: 2 additions & 48 deletions src/components/therapy-compass/nav.tsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,26 @@
"use client";

import { useTcBindings } from "./bindings";
import { AlertIcon } from "./icons";
import { s } from "./style-utils";

/**
* In-content tool navigation for Therapy Compass.
*
* The design shipped its own left sidebar, but inside this app that role is
* already filled by the universal rail, so the bespoke rail is dropped. Its
* eight destinations are kept reachable through a horizontal, repo-idiomatic
* pill nav that sits at the top of the content (sticky under the global
* core destinations are kept reachable through a horizontal, repo-idiomatic
* pill nav that sits at the top of non-home content (sticky under the global
* header) and scrolls horizontally on narrow viewports.
*/
export function TherapyCompassNav() {
const b = useTcBindings();
const reviewCount = b.reviewCount;
return (
<div
className="tc-topnav tc-no-print"
style={s(
`position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:18px;padding:14px 40px;background:var(--surface-glass);backdrop-filter:blur(12px);border-bottom:1px solid var(--border);`,
)}
>
{/* Compact tool identity (the design's top-bar brand, slimmed down) */}
<div style={s(`display:flex;align-items:center;gap:11px;flex:none;`)}>
<span
style={s(
`display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:var(--clinical-accent-soft);color:var(--clinical-accent);flex:none;`,
)}
>
<svg width="21" height="21" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.7">
<circle cx="12" cy="12" r="9" />
<circle cx="12" cy="12" r="5.2" />
<circle cx="12" cy="12" r="1.6" fill="currentColor" stroke="none" />
</svg>
</span>
<span style={s(`display:flex;flex-direction:column;line-height:1.15;`)}>
<span style={s(`font-size:14px;font-weight:650;color:var(--text-heading);letter-spacing:-0.01em;`)}>
Therapy
</span>
<span style={s(`font-size:11px;color:var(--text-soft);`)}>Source-grounded decision support</span>
</span>
</div>

{/* Screen nav — horizontal, scrollable */}
<nav
className="tc-scroll"
Expand Down Expand Up @@ -106,30 +83,7 @@ export function TherapyCompassNav() {
</svg>
Patient Sheets
</button>
<span style={s(`width:1px;height:22px;flex:none;background:var(--border);margin:0 4px;`)} aria-hidden="true" />
<button type="button" className="tc-btn" onClick={b.goReview} style={b.navReview}>
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.7">
<path d="M12 3 5 6v5c0 4.2 2.9 7.6 7 9 4.1-1.4 7-4.8 7-9V6Z" />
<path d="m9.2 12 1.9 1.9 3.7-3.8" />
</svg>
Review Queue
</button>
</nav>

{reviewCount > 0 ? (
<button
type="button"
className="tc-btn"
onClick={b.goReview}
title={`${reviewCount} records need review`}
style={s(
`display:inline-flex;align-items:center;gap:7px;flex:none;height:36px;padding:0 12px;border:1px solid var(--warning-border);border-radius:10px;background:var(--warning-bg);color:var(--warning-text);font-size:12.5px;font-weight:600;cursor:pointer;font-family:inherit;`,
)}
>
<AlertIcon size={15} strokeWidth={1.8} />
{reviewCount} to review
</button>
) : null}
</div>
);
}
Loading
Loading