[Bug] Menu bar panel border is half-clipped at the window edge on macOS 26+
Category
Check all that apply:
- [ ] Keystroke / Input (Tab not working, keystrokes swallowed, input blocked)
- [ ] App Compatibility (bug only in a specific app: Word, Outlook, Mail, browser, etc.)
- [ ] Performance / Crash (slow response, hang, or crash)
None of these apply. This is a cosmetic issue in the menu bar panel (area:ui).
Summary
On macOS 26+, the menu bar panel's 1pt border is drawn with .stroke, which centers the line on the shape's edge. The shape reaches the edge of the host window, so the window clips the outer half of the line and only 0.5pt of the border is visible.
Code: https://github.com/FuJacob/cotabby/blob/e87d04c1d5a56d242205d9272d168ee2fc7806b7/Cotabby/UI/MenuBar/MenuBarView.swift#L526-L530
.overlay {
RoundedRectangle(cornerRadius: Self.macOS26PopoverCornerRadius, style: .continuous)
.stroke(Color(nsColor: .separatorColor).opacity(0.7), lineWidth: 1)
.ignoresSafeArea()
}
Environment
- macOS version: 26.6.2 (measured). macOS 27 too: since #846 the shape fills the window through the safe area, so it ends at the window edge there as well.
- Host app: n/a (Cotabby's own menu bar panel)
- Cotabby engine: any
- Model name (if Open Source): n/a
- Accessibility / Input Monitoring / Screen Recording permission granted: not relevant
Steps to reproduce
- On macOS 26 or later, open the Cotabby menu bar panel.
- Zoom in on the panel's edge, or capture the window at 2x.
Expected behavior
The full 1pt separator border is visible around the panel.
Actual behavior
Only the inner half of the line is drawn. On macOS 26.6.2 the host window is exactly the size of the SwiftUI root (no safe-area insets), so the line sits on the window edge. In a 2x capture the border is a single pixel wide.
This happened on 26 before #846. On 27 it started with #846, which added .ignoresSafeArea() to stretch the shape to the window edges.
Suggested fix
RoundedRectangle is an InsettableShape, so swap .stroke for .strokeBorder. That insets the path by half the line width, which keeps the whole line inside the panel:
.strokeBorder(Color(nsColor: .separatorColor).opacity(0.7), lineWidth: 1)
Before merging, check visually in both light and dark mode on macOS 26 (and on 27 if possible). Since #846 the native window shadow is back on. In dark mode it adds a dark hairline just outside the panel and a light rim on its edge, so a full-width separator line must not end up reading as a second outline (#646 / #704).
Notes
Found while reviewing #846; see the approving review there for the macOS 26 measurements.