Repository navigation
fix: center Monaco find widget expand/collapse toggle chevron - #6683
Conversation
The generic `.button` height override was collapsing the expand/collapse chevron to 20px, pinning it to the top instead of centering it vertically. Switch to targeting `.button.toggle` and restore `height: 100%` so Monaco's own layout centers the chevron over the find row.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe CSS override for the Monaco editor find widget is updated in 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Jinwoo-H
left a comment
There was a problem hiding this comment.
Thanks! Confirmed against the bundled Monaco source and validated live with Cmd+F — the toggle now fills the row and centers like stock Monaco. Other find toggles untouched, lint passes. Merging.
The generic `.button` height override was collapsing the expand/collapse chevron to 20px, pinning it to the top instead of centering it vertically. Switch to targeting `.button.toggle` and restore `height: 100%` so Monaco's own layout centers the chevron over the find row.
Summary
The expand/collapse toggle (the chevron
>on the far left of the editor'sFind widget, Ctrl/Cmd+F) was not vertically centered — it rode high against the
top of the find row instead of sitting centered like the stock Monaco / VS Code
find widget.
Root cause was in Orca's find-widget overrides in
src/renderer/src/assets/main.css:.monaco-editor .find-widget .buttonrule forcedheight: 20px !important, which overrode Monaco's defaultheight: 100%onthe toggle button. Because the toggle is
position: absolute; top: 0, a fixed20px height pinned the chevron to the top of the ~33px row.
.button.expand) targeted a class that doesnot exist — Monaco renders the toggle as
button codicon toggle left, so theoverride was dead code and never applied.
The fix replaces the dead
.button.expandrule with a.button.togglerulethat restores Monaco's defaults (
width: 18px,height: 100%,top: 0). Thechevron is then centered by the
align-items/justify-content: centeralreadyapplied by the generic button rule — matching the stock find widget.
Screenshots
Before: chevron sits high / not vertically centered.


After: chevron centered to match the default Monaco find widget.


Testing
AI Review Report
Reviewed with an AI coding agent. Scope is a single CSS rule in
src/renderer/src/assets/main.css.labels, paths, or shell behavior touched. Monaco renders the find widget
identically across platforms; the rule only adjusts CSS sizing/positioning.
assumptions; behaves identically regardless of where the workspace lives.
provider logic involved.
in hot paths or runtime work.
centering holds in both find-only and find+replace modes. Should be checked in
both light and dark themes.
git diffconfirms the change is limited to thesingle intended hunk.
Security Audit
No security-relevant surface touched. No input handling, command execution, path
handling, auth, secrets, dependency changes, or IPC involved — the change is a
single presentational CSS rule. No follow-up needed.