Collapse sidebar More modes into a sheet popup - #1763
Conversation
Replace the six-item More modes list in the Clinical Guide sidebar and collapsed rail with one control that opens a Sheet listing the same specialist mode homes. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe PR replaces inline specialist-mode sidebar links with a reusable Sheet-based ChangesSidebar More Modes
Branch Review Ledger
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant MoreModesMenu
participant Sheet
participant ClinicalSidebar
User->>MoreModesMenu: Activate More modes
MoreModesMenu->>Sheet: Open specialist mode links
User->>Sheet: Select a specialist mode
Sheet->>ClinicalSidebar: Invoke navigation callback
ClinicalSidebar-->>MoreModesMenu: Close menu and restore trigger focus
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
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>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
tests/ui-smoke.spec.ts (1)
1245-1254: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTest mode selection in the mobile drawer.
This block tests only the tablet rail and Sheet opening. Add a Playwright phone-viewport case that selects a More modes link, verifies the destination route, and verifies that the Clinical Guide drawer closes.
As per coding guidelines, “Use Playwright for end-to-end tests and run the appropriate Chromium UI gate, starting the project with npm run ensure rather than assuming a port.”
🤖 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/ui-smoke.spec.ts` around lines 1245 - 1254, Add a Playwright phone-viewport test alongside the existing sidebar More modes coverage that opens the mobile More modes drawer, clicks a mode link, verifies navigation to the expected destination route, and confirms the Clinical Guide drawer is closed. Keep the tablet rail assertions unchanged and follow the existing Chromium UI setup using npm run ensure.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 `@docs/branch-review-ledger.md`:
- Line 707: Move the ledger row identified by commit
2a8881afad230880166de60a533e17588d9920ec to its chronological position among the
surrounding dated records, preserving the row content. Use the repository’s
supported ledger workflow to make the change rather than editing the file
directly.
- Around line 770-771: Append superseding ledger records for both listed heads
using `npm run ledger:append -- --supersede`, including every gate result,
`verify:ui:not-run`, and an explicit statement that no provider-backed checks
ran. Then run `ledger:lookup` and `check:branch-review-ledger` to validate the
updated records.
In `@src/components/clinical-dashboard/ClinicalSidebar.tsx`:
- Line 188: Replace the hardcoded 0.5rem inset in the ClinicalSidebar
contentClassName viewport calculation with a semantic spacing token defined in
src/app/globals.css using Tailwind 4 `@theme` syntax, then reference that token in
the max-h utility while preserving the existing responsive max-width behavior.
---
Nitpick comments:
In `@tests/ui-smoke.spec.ts`:
- Around line 1245-1254: Add a Playwright phone-viewport test alongside the
existing sidebar More modes coverage that opens the mobile More modes drawer,
clicks a mode link, verifies navigation to the expected destination route, and
confirms the Clinical Guide drawer is closed. Keep the tablet rail assertions
unchanged and follow the existing Chromium UI setup using npm run ensure.
🪄 Autofix
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
Run ID: 578c7a49-6798-403e-b198-cf9cb168d82b
📒 Files selected for processing (4)
docs/branch-review-ledger.mdsrc/components/clinical-dashboard/ClinicalSidebar.tsxtests/ui-smoke.spec.tstests/ui-tools.spec.ts
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Summary
Sheetlisting Forms, Differentials, DSM-5 Diagnosis, Specifiers, Formulation, and Therapy.onNavigatepath.Verification
npm run format:changed— All matched files use Prettier code stylenpm run test:focused -- --files src/components/clinical-dashboard/ClinicalSidebar.tsx—Tests 11 passednpx vitest run tests/favourites-auth-gate.test.ts tests/therapy-compass-mode-wiring.test.ts—Tests 19 passednpm run ensurethennpm run test:e2e -- tests/ui-smoke.spec.ts --project=chromium -g "tablet shows icon rail"—1 passed (2.1s)npm run verify:pr-localstages through unit suite (Test Files 529 passed,Tests 5713 passed | 4 skipped); initial build blocked by ensure-started dev server, thennpm run buildafter stop —Client bundle secret surface check passednpm run check:rag:fixtures—Offline RAG fixture and manifest validation passed (36 golden cases, 23 suites)npm run verify:ui— not run; focused Chromium smoke covers the changed More modes rail journey; full UI gate left for CIRisk and rollout
Clinical Governance Preflight
Not applicable — UI navigation chrome only; no ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output changes.
Notes
cursor/more-modes-popup-2f4bSummary by CodeRabbit
New Features
Documentation
Tests