fix(palette): clip the panel to its own rounded corners - #415
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes the command palette/picker panel so its content is clipped to the same rounded rectangle that is already drawn as the panel’s background and outline, preventing selected-row fills from squaring off the bottom corners (Fix #409).
Changes:
- Add a
.clipShape(RoundedRectangle(cornerRadius: 12))to the palette panel modifier chain between the background and stroke/shadow. - Document why the clip is required and why it must appear before
.shadowin the modifier order.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
umputun
force-pushed
the
fix/palette-corner-clip
branch
from
August 9, 2026 18:35
c32b320 to
1b4363c
Compare
Deploying agterm with
|
| Latest commit: |
7c03e40
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6aecdc81.agterm.pages.dev |
| Branch Preview URL: | https://fix-palette-corner-clip.agterm.pages.dev |
The panel drew a radius-12 background and a radius-12 stroke but never clipped to either, so a selected bottom row filled its full square bounds and painted over the corner arc. The same panel backs every palette mode and every caller-supplied picker, where an unmatched --allow-custom query leaves one synthetic row that is always both selected and last. Uses the chain already shared by the quick terminal, the overlay panel, and the dashboard cells: background, clip, stroke, shadow. Fix #409
umputun
force-pushed
the
fix/palette-corner-clip
branch
from
August 9, 2026 18:42
1b4363c to
7c03e40
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the palette panel drew a
RoundedRectangle(cornerRadius: 12)background and a radius-12 stroked overlay but never clipped to either, so a selected row was free to fill its full square bounds. When the selection sat on the bottom row,Color.accentColor.opacity(0.25)painted straight over the corner arc and squared it off.resultsis the panel VStack's last child with no bottom padding, and its.frame(maxHeight:)always fills, so the scroll bottom edge is the panel bottom edge. Thepickfree-text path shows it every time: when nothing matches,filteredbecomes one synthetic row that is always both selected and last.fix is the chain the rest of the app already uses - background, clip, stroke, shadow - as at
WindowContentView.swift:568,WindowContentView+Detail.swift:218andDashboardView.swift:128.Palette.swiftwas that chain with the clip line missing. It covers both mount points, the command palette and caller-supplied pickers, and any future filled content that reaches a corner.Rounding the row background instead would not fix it. A radius-6 row corner still sits outside a radius-12 panel arc unless the panel also gains padding, which is what
SessionSwitcherdoes with its 6pt inset - a different look, not a fix for this.one accepted side effect: the overlay scroller's bottom tip is now shaved by the corner radius. That is what clipping does.
not verified visually - SwiftUI views do not render in hosted tests and there are no snapshot tests, so this rests on the modifier chain and the three sites it copies. Worth an eyeball on key-repeat scrolling under translucency, since
Palette.swift:281-283records an earlier compositing flash in this view (its cause, an animated center-anchoredscrollTo, was removed).Fix #409