Fix main after the phone menu: break the menu import cycle and update four browser tests
User description
Before: main has been red since #3466. The unit suite's architecture test found an import cycle (side menu → work-frame lazy module → two-pane menu → side menu), and four browser tests still expected the Tools menu entry that #3466 removed on purpose, or a single Medication link in the phone menu.
After: the side menu loads its alerts counts reader straight from its own file, so the cycle is gone. The browser tests now match the agreed menu: Psychiatry sits where Tools was in the tablet rail and mode menu checks, and the phone test taps the pinned Medication shortcut (the menu also lists Medication under its group, by design).
How: one import change in ClinicalSidebar.tsx; expectation updates in tests/ui-smoke.spec.ts and tests/ui-tools.spec.ts. No behaviour change beyond removing the cycle. work-frame/ files untouched.
RAG impact: no retrieval behaviour change — menu wiring and browser tests only.
Local proof: architecture-boundaries test passes (6/6), eslint and prettier clean. The four browser tests are left to CI.
🤖 Generated with Claude Code
https://claude.ai/code/session_01N5U9yjzHumprWGGZ4R3hBj
Generated by Claude Code
Summary by cubic
Fixes the broken build on main after the phone menu rework by removing the side menu's import cycle and updating four browser tests to match the new menu.
- The side menu now loads its alerts counts reader directly from its own file instead of through the work-frame lazy module, which pulled in the two-pane menu and created an import cycle.
- Browser tests now expect Psychiatry where Tools used to be in the tablet rail and mode menu, and the phone test taps the pinned Medication shortcut (the menu lists Medication twice by design).
No behavior change beyond removing the cycle; work-frame/ files are untouched. The branch is synced with the latest main.
CodeAnt-AI Description
Keep sidebar loading clean and align navigation checks with the current menu
What Changed
- Sidebar alert counts load without the import cycle that was failing architecture checks.
- Browser checks now match the current menu: Psychiatry replaces Tools, and the mobile Medication test selects the pinned shortcut.
Impact
✅ Sidebar passes import-cycle checks
✅ Navigation checks reflect the current menu
💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
@codeant-ai ask: Your question here
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
@codeant-ai ask: Can you suggest a safer alternative to storing this secret?
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
@codeant-ai: Your feedback here
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
@codeant-ai: Do not flag unused imports.
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
@codeant-ai: review
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.