fix(gui): prevent custom select dropdown from overflowing viewport when placed on right - #1581
Conversation
…en placed on right
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. This PR stays in draft until every box above is ticked. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughSelect menus now derive alignment from trigger position when no alignment is provided. Dashboard selectors explicitly request right alignment. Right-aligned menus enforce viewport padding above and below their triggers. ChangesSelect alignment
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to This localized change keeps right-aligned select menus within the visible viewport, with no actionable merge-blocking risk remaining after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 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 |
Summary
<Select />dropdown popovers overflowing past the right edge of the card container and viewport when rendered in right-aligned control sections (such as Subagent Delegation model settings).computeSelectMenuStylewhen the trigger button sits in the right half of the viewport (trigger.right > vw / 2) and no explicitalignprop is passed.align="right"to right-aligned Select controls inSubagentDelegationSectionanddashboard-overview-sections.Verification
cd gui && bun test tests/select-position.test.ts(added unit test for auto right-alignment)cd gui && bun test tests(all 611 GUI tests passing)bun run typecheck(strict TypeScript check passing)bun run lint:gui(ESLint passing)Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit