#17920: macOS: fix WebChat panel corner clipping
app: macos
stale
size: XS
Cluster:
macOS Notification and Menu Fixes
Fixes #12294
## Summary
- fix bottom-corner rendering artifacts in the macOS WebChat panel
- use `.withinWindow` blending for panel mode to avoid material bleed at rounded edges
- enforce continuous corner clipping on the effect, hosting, and container views
## Verification
- built and ran mac app via documented flow (`scripts/restart-mac.sh --no-sign`)
- manually confirmed the bottom-corner UI glitch is resolved in WebChat panel
## Before
<img width="494" height="36" alt="Screenshot 2026-02-16 at 10 31 38" src="https://github.com/user-attachments/assets/51d8251b-2341-46fe-9cb6-11218ad3d4b3" />
## After
<img width="483" height="45" alt="Screenshot 2026-02-16 at 10 26 05" src="https://github.com/user-attachments/assets/aad42cc1-53d6-418a-b507-24d6db7cef40" />
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Fixes bottom-corner rendering artifacts in the macOS WebChat panel by switching `NSVisualEffectView` blending mode from `.behindWindow` to `.withinWindow` in panel mode, adding continuous corner clipping to the hosting view, and setting a clear background color on the effect view layer.
- Conditionally sets `blendingMode` based on presentation (`.withinWindow` for panel, `.behindWindow` for window) to prevent material bleed at rounded edges
- Applies matching `cornerCurve`, `cornerRadius`, and `masksToBounds` to the `NSHostingController` view so the SwiftUI content also clips to the rounded corners
- Adds explicit `NSColor.clear.cgColor` background to the effect view layer
- Removes dead code that was setting layer properties on `controller.view` before it was overwritten by `controller.view = rootView`
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge — it makes a focused, low-risk UI fix with no behavioral or API changes.
- The changes are limited to a single file, touch only view layer properties for corner clipping, and follow existing patterns in the codebase. The blending mode change is presentation-specific and preserves existing window-mode behavior. The dead code removal is correct and was identified in prior review. No logic, security, or regression concerns.
- No files require special attention.
<sub>Last reviewed commit: cc9f099</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#22458: Codex/macos chat corner clip
by apethree · 2026-02-21
90.6%
#10898: fix(mac): adopt canonical session key and add reset triggers
by Nachx639 · 2026-02-07
73.3%
#3474: fix(macos): menu bar activity badge not showing during agent work
by elektricM · 2026-01-28
73.2%
#9122: fix(webchat): constrain .chat-new-messages to button size
by ridermw · 2026-02-04
72.6%
#15909: Guard notifications on macOS; fix focus issue and build fixes
by jasonkneen · 2026-02-14
72.1%
#20347: fix(webchat): resolve streaming scroll race condition
by ndaemy · 2026-02-18
71.8%
#7522: fix(webchat): auto-scroll when message queue changes
by alsoknownasfoo · 2026-02-02
71.8%
#9175: Fix: Constrain webchat 'New messages' icon size to prevent massive ...
by vishaltandale00 · 2026-02-04
71.5%
#16742: fix: prevent iOS Safari zoom on input focus and fix outer shell scr...
by alewcock · 2026-02-15
71.1%
#22798: feat(webchat): ChatGPT-style multi-chat threads with generated titles
by opnsec · 2026-02-21
70.9%