Add keyboard shortcut badges to block context menu#692
Conversation
|
Warning Review limit reached
Next review available in: 58 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 (2)
📝 WalkthroughWalkthroughAdds ChangesComment Block Keyboard Shortcuts
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@main/blocklyinit.js`:
- Around line 1610-1655: Resolve `scope.focusedNode` to its owning source block
before falling back to `skippableFieldBlock()`: `commentTargetBlock()` currently
only returns the node when it already has `getCommentText`, so focused fields
inside a block are missed and the `comment_block`/`delete_comment_block`
shortcuts stay disabled. Update `commentTargetBlock()` to unwrap normal field
nodes to their parent/source block first, then keep the existing skippable-field
fallback, and ensure `commentEditable()` continues to gate the same block-like
target.
In `@ui/contextmenu.js`:
- Around line 201-212: The context menu comment action in item.callback
currently starts and immediately ends the Blockly event group before
toggleCommentBubble finishes, so the bubble open/focus work runs outside the
intended group. Update this handler to preserve and restore the previous group
state like the other registrations in contextmenu.js, and make the group span
the full toggleCommentBubble flow if you want its async bubble operations to
stay grouped with the comment creation. Use the item.callback wrapper and
Blockly.Events.setGroup handling 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: 256d000d-c0e1-4b75-80c7-02eede3af732
📒 Files selected for processing (13)
accessibility/keyboardui.jslocale/de.jslocale/en.jslocale/es.jslocale/fr.jslocale/it.jslocale/pl.jslocale/pt.jslocale/sv.jsmain/blocklyinit.jsstyle.cssui/blocklyutil.jsui/contextmenu.js
Summary
Ctrl + Ggizmo badges) to the block context menu ONLY while using keyboard navigationK/Shift + Kkeyboard shortcut to allow keyboard users to add a commentAI usage
Claude Opus 4.8 used throughout and wrote all code. All changes audited and accepted individually by a human.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation