Land streamlined six-item sidebar (#066)#1174
Conversation
…ructure-b2bf # Conflicts: # src/components/clinical-dashboard/ClinicalSidebar.tsx
Land the six-item sidebar (Answer, Documents, Services, Medications, Factsheets, Tools) plus settings-guide flow and lazy sidebar dialogs on current main. Keep main's clinical-dashboard-lazy barrel and phone shell classes; replace main's Forms/Therapy rail composition with #66's set. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Assert the canonical sidebarToolItems list (Medications/Factsheets) instead of main's retired primarySidebarToolIds Forms/Therapy filter. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Warning Review limit reached
Next review available in: 15 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThe clinical sidebar now presents six canonical navigation links, removes theme and sidebar guide controls, and prefetches account dialogs. Settings and account dialogs are lazy-loaded, while guide transitions restore settings focus. Tests and review documentation were updated accordingly. ChangesClinical sidebar and dialog flow
Review status documentation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant ClinicalSidebar
participant ClinicalDashboard
participant useSettingsGuideFlow
participant SidebarDialogs
ClinicalSidebar->>ClinicalDashboard: open settings or account profile
ClinicalDashboard->>useSettingsGuideFlow: set dialog state and initial focus
ClinicalDashboard->>SidebarDialogs: render lazy settings or account dialog
SidebarDialogs->>ClinicalDashboard: close dialog or open guide
ClinicalDashboard->>useSettingsGuideFlow: restore settings focus after guide close
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…em-land-cfa0 Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #5368 (success). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
Tighten mobile menu assertions so Close Clinical Guide menu is not treated as a Guide affordance, and make openGuide reuse an already-open Settings dialog (tablet rail + restore path) instead of clicking through an overlay. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…0' into cursor/sidebar-six-item-land-cfa0 Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Record feature-branch proof on PR #1174 (focused suites, verify:pr-local, ensure spot-check, verify:ui). Remaining work is merge to main. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Cite d97c11e as the content-proof commit for the six-item sidebar land so later ledger-only tip moves do not churn the issue row. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…em-land-cfa0 Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/components/clinical-dashboard/global-search-shell.tsx (1)
611-623: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winSidebar collapse/expand no longer animates in the standalone shell.
The
motion-safe:transition-[grid-template-columns]...class was dropped from this shell's grid container, butClinicalDashboard.tsx's equivalent container (its main wrapperclassName) still keeps it. Result: collapsing/expanding the sidebar animates smoothly on/but snaps instantly on every standalone route (services, documents, differentials, etc.) that share the sameClinicalDesktopSidebar.🎞️ Restore the transition class for consistency
className={cn( "sm:min-h-dvh max-sm:fixed max-sm:inset-0 max-sm:overflow-hidden bg-[color:var(--background)] text-[color:var(--text)]", shouldShowDesktopSidebar && "md:grid md:grid-cols-[5.25rem_minmax(0,1fr)]", shouldShowDesktopSidebar && (effectiveSidebarCollapsed ? "lg:grid-cols-[5.25rem_minmax(0,1fr)]" : "lg:grid-cols-[20rem_minmax(0,1fr)]"), + "motion-safe:transition-[grid-template-columns] motion-safe:duration-200 motion-safe:ease-out", )}🤖 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/components/clinical-dashboard/global-search-shell.tsx` around lines 611 - 623, Restore the motion-safe grid-template-columns transition class on the shell’s outer grid container in the component containing this return block, matching the transition behavior used by ClinicalDashboard.tsx. Keep the existing sidebar-dependent grid column classes unchanged so collapse and expansion animate consistently across standalone routes.
🤖 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 `@docs/branch-review-ledger.md`:
- Line 795: Update the ledger entry identified by commit
c44a5c536e43f300feb1b88892d0b2a8ca2c4feb so its completion date is not
future-dated: use the actual execution date if the sweep has occurred, or mark
the action as pending if it has not. Preserve the existing evidence details only
when they correspond to the recorded date.
- Line 789: Clarify synchronization versus product merge in both ledger entries:
in docs/branch-review-ledger.md lines 789-789, change the “from cd54e68f onto
main” wording to state that the feature branch was synchronized with
origin/main; in docs/outstanding-issues.md lines 104-104, replace “merged onto
current main” with wording that current origin/main was merged into the feature
branch.
In `@src/components/clinical-dashboard/lazy-sidebar-dialogs.tsx`:
- Around line 1-13: Add the "use client" directive at the top of the lazy
sidebar dialogs module before its imports so the SettingsDialog and
AccountSetupDialog dynamic components can use ssr: false.
---
Outside diff comments:
In `@src/components/clinical-dashboard/global-search-shell.tsx`:
- Around line 611-623: Restore the motion-safe grid-template-columns transition
class on the shell’s outer grid container in the component containing this
return block, matching the transition behavior used by ClinicalDashboard.tsx.
Keep the existing sidebar-dependent grid column classes unchanged so collapse
and expansion animate consistently across standalone routes.
🪄 Autofix (Beta)
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: f9423dc3-7e93-4b12-a61d-d8db6b5c5f6f
📒 Files selected for processing (12)
docs/branch-review-ledger.mddocs/outstanding-issues.mdsrc/components/ClinicalDashboard.tsxsrc/components/clinical-dashboard/ClinicalSidebar.tsxsrc/components/clinical-dashboard/global-search-shell.tsxsrc/components/clinical-dashboard/lazy-sidebar-dialogs.tsxsrc/components/clinical-dashboard/settings-dialog.tsxsrc/components/clinical-dashboard/use-settings-guide-flow.tstests/favourites-auth-gate.dom.test.tsxtests/favourites-auth-gate.test.tstests/therapy-compass-mode-wiring.test.tstests/ui-smoke.spec.ts
Resolve outstanding-issues (#66 progress), therapy/ui-smoke six-item sidebar assertions, add use client for lazy sidebar dialogs, and append ledger CORRECTION for sync-vs-merge wording. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid ByRoleOptions exact overload mismatch in favourites-auth-gate DOM test. Co-authored-by: Cursor <cursoragent@cursor.com>
Use exact name + first() so rail and breadcrumb links do not trip strict mode. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs(issues): close stale #66/#67 after main landings #66 is on origin/main via PR #1174; #67 was fixed in PR #1191 by running the preflight JSON contract in-process. Also drop already- resolved #30/#75 from the recommended queue and renumber. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * docs: pin branch-review ledger SHA for #66/#67 closeout Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Summary
fields=index, differentials abort/debounce, universal documents typeahead soft-timeout (750ms), shared(search-app)shell to avoid composer remount, and Answer rate-limit in-memory fallback outside production./services→/dsm) syncssearchModeduring render (no stale-mode paint) even when the query string is unchanged; extracted ClinicalDashboard lazy imports to stay under the maintainability budget.RAG impact: no retrieval behaviour change — typeahead documents domain timeout and shell URL sync only; ranking formulas and full
/api/searchretrieval path unchanged.Verification
npm run verify:pr-local— focused Vitest on touched sources (362) plus api-rate-limit / search-shell / universal / route / site-map suites green;docs:check-indexOKverify:uinot required for this pass; mode-home smoke vianpm run ensurereturned HTTP 200 for/,/services,/dsm,/documents/search,/therapy-compass,/?mode=prescribing, and/api/answer/streamreturned 200 after the rate-limit fallback fixeval:retrieval:latency/ soak / live OpenAI canary — approval-gated provider work; not needed for timeout-only typeahead changeRisk and rollout
GlobalSearchShelllayouts and prior timeout/fallback behaviourClinical Governance Preflight
[REDACTED]([REDACTED])Notes
fields=indexremains for identity-only consumers (cross-mode links).Summary by CodeRabbit
New Features
Bug Fixes
Tests