Repository navigation
Side menu Reminders asks before leaving an unsaved safety plan - #3469
Conversation
The work side menu and the two-pane strip went to My Day with router.push, which skipped the shell leave guard the safety plan registers. They now call confirmShellNavigation() first. The side counts loader lives in one leaf module instead of two copies. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KHkbt7EPd1iS6ryTjtnzq2
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
There was a problem hiding this comment.
BigSimmo has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
PR Summary by QodoGuard Reminders shortcuts against leaving an unsaved safety plan
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
🏁 CodeAnt Quality Gate ResultsCommit: ✅ Overall Status: PASSEDQuality Gate Details
|
Merging this PR will not alter performance
|
Code Review by Qodo
No findings for this group No findings for this group No findings for this group Resolved findings 1.
|
|
CodSpeed Performance Analysis is red on 39c879c, but the slowed benchmarks (medication entity matching, catalogue ranking, chunking) are in code this PR does not touch; it only changes two side-menu navigation handlers and moves a lazy loader. CodSpeed itself reports the comparison ran across different runtime environments and that these benchmarks spend significant time in system calls, so this reads as measurement noise rather than a regression from this diff. No fix to port; I can't re-run the check from here. Leaving the PR watched until the remaining checks finish. Generated by Claude Code |
|
Re Qodo's low finding (declining the leave prompt closes the menu): staying as is. A reader who chooses to stay is returned to the page they were protecting, which is the intended outcome; the menu can be reopened in one tap, and keeping it open would mean threading a result back through both menu components for little gain. Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39c879ca60
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KHkbt7EPd1iS6ryTjtnzq2
CodeAnt Nitpicks1 code suggestion1.
|
CodeAnt PR Risk: Low Risk
Assessed commit: |
Code Review ✅ Approved🟡 Medium risk · Adding leave confirmation to Reminders shortcuts could block navigation when the guard incorrectly reports unsaved work; the change affects only two entry points. Reminders shortcuts in the work side menu and two-pane strip now run the shell leave check before navigating to My Day, so an unsaved safety plan is no longer lost silently. No issues found.
Review coverage🤖 Auto-approval Approved 📋 Rules No rules evaluated 🧪 Functional validation Not enabled · Set up OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|
Code review by qodo was updated up to the latest commit 040a7b3 |
User description
Summary
Before: in the work side menu and the two-pane strip, the Reminders shortcut went straight to My Day. It skipped the leave check that PR #3463 added for the safety plan, so a safety plan in progress could be lost from that shortcut.
After: both shortcuts ask the same "leave this page?" question first, and they stay on the page if the reader says stay. The side alerts counts loader now lives in one small file instead of two copies, which was the follow-up from #3468.
How:
confirmShellNavigation()runs beforerouter.push("/my-day")inwork-side-menu.tsxandtwo-pane-side-strip.tsx. The newwork-frame/lazy-work-side-counts.tsxis a leaf module that both the clinical sidebar andlazy-work-side-navimport, so it adds no import cycle.Verification
npx vitest runon the architecture boundaries test plus the side menu, sidebar and work-frame tests: "Test Files 17 passed (17), Tests 2971 passed (2971)".tests/side-menu-leave-guard.dom.test.tsx: "Tests 2 passed (2)"..nextroute-types entry for the moved safety-plan page, unrelated to this change.Risk and rollout
Notes
RAG impact: no retrieval behaviour change. Menu navigation only.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KHkbt7EPd1iS6ryTjtnzq2
Generated by Claude Code
Summary by cubic
The Reminders shortcut in the work side menu and the two-pane strip now runs the shell leave check before going to My Day, so an in-progress safety plan isn't silently lost from either shortcut.
confirmShellNavigation()beforerouter.push("/my-day"); choosing stay keeps the reader where they are and leaves the open menu open.lazy-work-side-counts.tsx) instead of two copies, avoiding an import cycle with the clinical sidebar.tests/side-menu-leave-guard.dom.test.tsxcovering the stay and leave paths of the guard.Written for commit 040a7b3. Summary will update on new commits.
CodeAnt-AI Description
Keep unsaved work when opening Reminders
What Changed
Impact
✅ Fewer lost safety plan changes✅ Clearer navigation when opening Reminders💡 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:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
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:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
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.