Close add menu when Ctrl + G pressed#694
Conversation
|
Warning Review limit reached
Next review available in: 48 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: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughGizmoMenuManager gains a ChangesGizmo Overlay Close Hooks
Estimated code review effort: 1 (Trivial) | ~5 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant GizmoMenuManager
participant AddMenu
User->>GizmoMenuManager: Ctrl+G (toggle overlay open)
GizmoMenuManager->>GizmoMenuManager: _closeHooks.forEach(fn)
GizmoMenuManager->>AddMenu: invoke registered close hook
AddMenu->>AddMenu: hide shapes-dropdown
AddMenu->>AddMenu: remove keyboard navigation state
AddMenu->>AddMenu: cancelPlacement()
GizmoMenuManager->>GizmoMenuManager: continue opening overlay
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@accessibility/keyboardui.js`:
- Around line 247-254: The close-hook execution in toggle(show) can abort the
overlay-open flow if any registered hook throws, so isolate failures in
KeyboardUI.toggle and keep the rest of the open sequence running. Update the
_closeHooks.forEach invocation to catch errors per hook (and optionally log
them) so one bad hook does not prevent renderBadges, watcher setup, or focus
management from completing; use the registerCloseHook and toggle methods to
locate the fix.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: f0120850-626b-4083-9d93-f463894d54fd
📒 Files selected for processing (2)
accessibility/keyboardui.jsui/addmenu.js
Summary
Closes the add shape menu when Ctrl + G pressed so that you can see the gizmos you are selecting
Old behaviour:

AI usage
Claude Sonnet 4.6 wrote all of the code. Not a difficult fix.
Summary by CodeRabbit