Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
cacaa3f
feat(ui): streamline clinical sidebar navigation
BigSimmo Jul 22, 2026
1165f8e
Merge remote-tracking branch 'origin/main' into codex/chat-sidebar-st…
BigSimmo Jul 22, 2026
cd54e68
test(ui): align therapy wiring with sidebar scope
BigSimmo Jul 23, 2026
754f59b
Merge origin/codex/sidebar-test-fix-20260723 into sidebar land branch
cursoragent Jul 24, 2026
db9e02c
test(ui): align favourites sidebar contract with six-item rail
cursoragent Jul 24, 2026
acb3f74
style: format favourites sidebar contract test
cursoragent Jul 24, 2026
3fe0c14
Merge remote-tracking branch 'origin/main' into cursor/sidebar-six-it…
cursoragent Jul 24, 2026
d97c11e
test(ui): fix guide/settings helpers after sidebar streamlining
cursoragent Jul 24, 2026
3a3f2b6
Merge remote-tracking branch 'origin/cursor/sidebar-six-item-land-cfa…
cursoragent Jul 24, 2026
e72b201
issues: update #066 with sidebar land proof status
cursoragent Jul 24, 2026
3c28afe
issues: pin #066 proof SHA to ledger tip
cursoragent Jul 24, 2026
0ade13a
issues: align #066 tip SHA with branch HEAD
cursoragent Jul 24, 2026
0aaad37
docs: pin #066 proof to content SHA and record review ledger
cursoragent Jul 24, 2026
6756b03
issues: clean #066 proof wording
cursoragent Jul 24, 2026
62eae1e
Merge remote-tracking branch 'origin/main' into cursor/sidebar-six-it…
cursoragent Jul 24, 2026
3fec0dd
Merge remote-tracking branch 'origin/main' into cursor/sidebar-six-it…
cursoragent Jul 24, 2026
3a920cd
Merge cursor/pr-queue-hygiene-72ec for postcss audit + PR branch sync
cursoragent Jul 24, 2026
1f09da1
Merge remote-tracking branch 'origin/main' into cursor/sidebar-six-it…
cursoragent Jul 24, 2026
6d1286a
Merge remote-tracking branch 'origin/main' into HEAD
BigSimmo Jul 24, 2026
c44a5c5
fix(ci): format outstanding issues ledger
BigSimmo Jul 24, 2026
6f383ea
docs: record PR 1174 maintenance
BigSimmo Jul 24, 2026
2cf83dc
Merge origin/main into cursor/sidebar-six-item-land-cfa0
BigSimmo Jul 25, 2026
e2a2326
style: prettier-format outstanding-issues after main merge
BigSimmo Jul 25, 2026
16d78a7
fix(test): use RegExp name matcher for Guide & help query
BigSimmo Jul 25, 2026
0be3de0
fix(test): disambiguate Medications link in prescribing smoke
BigSimmo Jul 25, 2026
b9119f6
Merge origin/main into sidebar six-item (#1174)
BigSimmo Jul 25, 2026
b618aeb
fix(docs): remove conflict markers from outstanding-issues
BigSimmo Jul 25, 2026
a892307
docs(review): append babysit ledger rows for #1177 merge
BigSimmo Jul 25, 2026
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
291 changes: 154 additions & 137 deletions docs/branch-review-ledger.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/outstanding-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ removed after current-main verification; it is not missing recommended work.
| #059 | P1 | task | Verify containment of every credential reported exposed in chat | **Outcome:** every reported exposed credential is rejected or retired. **Next:** in approved security windows, verify and revoke or rotate the GitHub token, OpenAI key, Supabase service-role JWT, database password, and E2E credential; create replacements only when required and update only intended secret stores. **Success:** provider evidence confirms the old credentials cannot authenticate, replacements are distinct and minimally scoped, presence/readiness checks pass, and secret scans remain clean. **Stop:** no provider or secret-store action without approval; never print or paste values into Git, logs, issues, or chat. | session 2026-07-24 security reconciliation; AI Agent Target Manifest | 2026-07-24 |
| #064 | P2 | task | Reconcile the preserved browser and contrast patch | **Outcome:** the isolated dirty formulation/contrast patch is safely landed or explicitly dispositioned. **Next:** rebase its intent against current `main` without overwriting the worktree, then run focused Playwright coverage and `verify:ui`. **Success:** intended disabled/contrast behavior is accessible, browser assertions remain meaningful, and unrelated work is preserved. **Stop:** do not discard or auto-merge the dirty worktree; pause on ambiguous ownership or scope. | `agent/formulation-disabled-contrast`; session 2026-07-24 | 2026-07-24 |
| #065 | P2 | task | Complete the paused compact document source-text accordion | **Outcome:** the document viewer uses compact nested disclosures while retaining complete text, citation/search navigation, print behavior, and composer clearance. **Next:** only when the user explicitly resumes, reconcile `codex/chat-document-text-accordion-7cb4` with current `main` and complete the focused 320/390/1280 px tests. **Success:** default disclosures are closed; deep links and search open only the active passage; printing expands/restores state; no overflow. **Verify:** focused document-viewer Playwright, `verify:cheap`, `verify:ui`, and static production-readiness. **Stop:** remain paused until explicit user return; no provider calls. | paused document-viewer task; `codex/chat-document-text-accordion-7cb4` | 2026-07-24 |
| #066 | P2 | task | Land and prove the streamlined six-item sidebar | Implementation and the corrected Therapy wiring assertion are recoverable from remote branch `origin/codex/sidebar-test-fix-20260723` at full commit `cd54e68fbf7b07b5dffe3220e36af2caa528da54`; fetch it in a fresh checkout with `git fetch origin refs/heads/codex/sidebar-test-fix-20260723`. Focused sidebar/favourites suites pass 18/18. Remaining: run `verify:pr-local`, start the app and inspect desktop/tablet/mobile plus short-height scrolling and keyboard/focus behavior, run `verify:ui`, production build and bundle-budget checks, then open/merge the PR and prove the exact content is on `origin/main`. | remote branch `origin/codex/sidebar-test-fix-20260723`; commit `cd54e68fbf7b07b5dffe3220e36af2caa528da54`; session 2026-07-24 | 2026-07-24 |
| #066 | P2 | task | Land and prove the streamlined six-item sidebar | **Landed/proven on feature branch (not yet on `main`).** PR #1174 tip; current `origin/main` was merged into the feature branch. Six-item rail: Answer, Documents, Services, Medications, Factsheets, Tools (Favourites in Your library). **Remaining:** merge PR #1174 and prove the exact content SHA is on `origin/main`. **Stop:** do not merge without explicit ask; no provider calls. | feature `cursor/sidebar-six-item-land-cfa0`; PR #1174; session 2026-07-25 | 2026-07-24 |
| #067 | P2 | issue | Reconciliation preflight test times out under full-suite load | **Outcome:** the reconciliation preflight subprocess test is deterministic under the repository's serialized heavy-test workflow. During PR #1119 validation, the 30-second test timeout occurred twice under loaded full-suite execution, while the isolated file passed 5/5 and a separate `verify:cheap` full suite passed. **Next:** reproduce with timing around subprocess startup, output and teardown, then fix the smallest proven harness lifecycle cause. **Success:** repeated focused and full-suite runs complete without extending the global timeout. **Stop:** do not hide the cause by raising broad timeouts, adding retries, or bypassing the shared test lock. | `tests/reconciliation-preflight.test.ts`; PR #1119 validation; session 2026-07-24 | 2026-07-24 |
| #051 | P2 | task | Stabilise the live answer-quality canary before more RAG tuning | Diagnostics landed in PR #1095: structured JSON/Markdown artifacts now record the actual checked-out SHA, run identity and latency context, and the offline trend tool separates content, provider-route and latency outcomes. First validating run `30018289898` recorded the expected tree and cost, with 36/36 retrieval green, but one report cannot establish variability; PR #1097 prevents a single failure being mislabeled as repeated. Next: compare the scheduled 2026-07-26 structured report with this run. Do not spend on an immediate retry or reapply the archived lithium guard before that comparison. | PR #1095; run `30018289898`; PR #1097; archive ref `refs/archive/rejected-rag/20260723/monitoring-subject-gate` | 2026-07-23 |
| #001 | P2 | task | Semantic reranking still gated off | `RAG_SEMANTIC_RERANK_ENABLED=false` from PR #901. Do not enable until the provider-backed 36/36 retrieval-quality gate **and** an ambiguity-focused canary are explicitly approved and recorded. | `docs/process-hardening.md` (Semantic reranking rollout debt); PR #901 | 2026-07-21 |
Expand Down
49 changes: 26 additions & 23 deletions src/components/ClinicalDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@ import {
textMuted,
} from "@/components/ui-primitives";
import { useAuthSession } from "@/lib/supabase/client";
import { AccountSetupDialog } from "@/components/clinical-dashboard/account-setup-dialog";
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 * as SidebarDialogs from "@/components/clinical-dashboard/lazy-sidebar-dialogs";
import { useSettingsGuideFlow } from "@/components/clinical-dashboard/use-settings-guide-flow";
import {
deriveSidebarIdentity,
ClinicalDesktopSidebar,
Expand Down Expand Up @@ -209,7 +208,6 @@ import {
maxVisiblePriorTurns,
PriorAnswerTurnSurface,
} from "@/components/clinical-dashboard/answer-thread-turn";

const documentPageSize = 150;
const activeIndexingPollFallbackMs = 5_000;
const indexingWorkDetailsPollMs = 15_000;
Expand Down Expand Up @@ -260,7 +258,6 @@ type IngestionQualityPayload = {
items?: IngestionQualityReviewItem[];
demoMode?: boolean;
};

export const clinicalQueryModeOptions: Array<{ value: ClinicalQueryMode; label: string }> = [
{ value: "auto", label: "Auto" },
{ value: "monitoring_schedule", label: "Monitoring" },
Expand All @@ -270,7 +267,6 @@ export const clinicalQueryModeOptions: Array<{ value: ClinicalQueryMode; label:
{ value: "required_documentation", label: "Documentation" },
{ value: "compare_guidance", label: "Compare" },
];

type SearchResultModePayload =
| {
kind: "documents";
Expand All @@ -288,9 +284,7 @@ type SearchResultModePayload =
query: string;
payload: AnswerPayload;
};

type SourceLibrarySearchMode = Extract<AppModeSearchKind, "documents" | "differentials">;

type LibraryHealthTarget = "documents" | "setup" | "indexing" | "failures";
type IndexingMonitorFilter = "all" | "active" | "failed";
type UploadIndexingTab = "setup" | "upload" | "jobs" | "quality";
Expand Down Expand Up @@ -538,7 +532,6 @@ export function ClinicalDashboard({
const [indexingActive, setIndexingActive] = useState(false);
const [userStartedIngestion, setUserStartedIngestion] = useState(false);
const [nextRefreshDelayMs, setNextRefreshDelayMs] = useState<number | null>(null);
const { theme, toggleTheme } = useTheme();
const auth = useAuthSession();
const {
status: authStatus,
Expand Down Expand Up @@ -665,6 +658,13 @@ export function ClinicalDashboard({
setUploadDrawerOpen,
prefetch: (href) => router.prefetch(href),
});
const settingsGuideFlow = useSettingsGuideFlow({
openGuide,
closeGuide,
openSettings,
openAccountProfile,
setSettingsOpen,
});
const answerThreadOwnerId = auth.session?.user.id ?? (clientDemoMode ? demoRecentQueryOwnerId : null);
const previousAnswerThreadOwnerIdRef = useRef(answerThreadOwnerId);
useEffect(() => {
Expand Down Expand Up @@ -3320,11 +3320,10 @@ export function ClinicalDashboard({
onCollapsedChange={setSidebarCollapsed}
onNewChat={startNewChat}
onPickRecent={pickRecentQuery}
onOpenGuide={openGuide}
onOpenSettings={openSettings}
onOpenAccount={openAccountProfile}
theme={theme}
onToggleTheme={toggleTheme}
onOpenSettings={settingsGuideFlow.openSettingsWithDefaultFocus}
onOpenAccount={settingsGuideFlow.openAccountProfileWithDefaultFocus}
onPrefetchSettings={SidebarDialogs.loadSettingsDialog}
onPrefetchAccount={SidebarDialogs.prefetchAccountDialog}
onPrefetchApplications={prefetchApplications}
showAccountLibrary={favouritesAccessible}
/>
Expand Down Expand Up @@ -4096,15 +4095,20 @@ export function ClinicalDashboard({
hidden
onNavigate={navigateMobileSection}
/>
<GuideDialog open={guideOpen} onClose={closeGuide} />
<SettingsDialog
<GuideDialog open={guideOpen} onClose={settingsGuideFlow.closeGuideWithRestore} />
<SidebarDialogs.SidebarSettingsDialog
open={settingsOpen}
onClose={closeSettings}
identity={sidebarIdentity}
onSignOut={auth.signOut}
onOpenGuide={openGuide}
onOpenGuide={settingsGuideFlow.openGuideFromSettings}
initialFocus={settingsGuideFlow.settingsInitialFocus}
/>
<SidebarDialogs.SidebarAccountSetupDialog
open={accountSetupOpen}
onClose={closeAccountSetup}
intent={accountSetupIntent}
/>
<AccountSetupDialog open={accountSetupOpen} onClose={closeAccountSetup} intent={accountSetupIntent} />
<ClinicalMobileSidebar
open={mobileSidebarOpen}
recentQueries={recentQueries}
Expand All @@ -4113,11 +4117,10 @@ export function ClinicalDashboard({
onOpenChange={setMobileSidebarOpen}
onNewChat={startNewChat}
onPickRecent={pickRecentQuery}
onOpenGuide={openGuide}
onOpenSettings={openSettings}
onOpenAccount={openAccountProfile}
theme={theme}
onToggleTheme={toggleTheme}
onOpenSettings={settingsGuideFlow.openSettingsWithDefaultFocus}
onOpenAccount={settingsGuideFlow.openAccountProfileWithDefaultFocus}
onPrefetchSettings={SidebarDialogs.loadSettingsDialog}
onPrefetchAccount={SidebarDialogs.prefetchAccountDialog}
onPrefetchApplications={prefetchApplications}
showAccountLibrary={favouritesAccessible}
/>
Expand Down
Loading
Loading