Reposition and clip context bar - #724
Conversation
|
Warning Review limit reached
Next review available in: 42 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 Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe floating block toolbar now repositions on canvas resize, calculates the toolbox boundary, clips itself when overlapping the toolbox, and refreshes keyboard shortcut badges after repositioning. ChangesFloating toolbar positioning
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 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 `@ui/contextmenu.js`:
- Around line 931-938: The toolbox overlap handling currently clips only
blockToolbar while renderBadges positions badgeOverlay from unclipped button
rectangles. Update renderBadges and its keyboard-mode call site to receive and
apply the computed toolboxRight visible boundary, filtering or clipping badges
so those belonging to hidden button areas do not render over the toolbox;
preserve normal badge placement when no overlap exists.
- Around line 856-859: Defer the positionBlockToolbar() call in the
flock:canvas-resize listener until after main/view.js completes its scheduled
Blockly.svgResize(workspace) layout update. Use a post-layout dispatch or
coalesced callback ordered after that resize callback; do not rely on a single
requestAnimationFrame from this listener, since it would execute too early.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Summary
When the canvas resizes, move the block context bar with the block, don't just leave it stranded.
If the context bar overlaps the toolbox (or anything to the left of it) clip it on the left edge.
AI usage
Claude Sonnet 5 used throughout. Plan implemented by me (which was a lot simpler than Claude's plan)
Summary by CodeRabbit