Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces layout and styling adjustments specifically for the Electron application running on macOS. Key changes include the addition of CSS safe-area variables, a new electron-macos body class for conditional styling, and UI refinements in the Header, Sidebar, and DashboardLayout components to accommodate macOS-specific desktop environments. Feedback focuses on simplifying the isMacElectron detection logic by removing redundant window checks and suggesting the centralization of this logic into a shared hook to improve maintainability.
| const isMacElectron = | ||
| isElectron && typeof window !== "undefined" && window.electronAPI?.platform === "darwin"; |
There was a problem hiding this comment.
The typeof window !== "undefined" check is redundant here because isElectron (derived from useIsElectron) already ensures the code is running in a client-side environment where window and window.electronAPI are available. Additionally, consider centralizing this isMacElectron logic in the useElectron hook to avoid duplication across components.
| const isMacElectron = | |
| isElectron && typeof window !== "undefined" && window.electronAPI?.platform === "darwin"; | |
| const isMacElectron = isElectron && window.electronAPI?.platform === "darwin"; |
| const isMacElectron = | ||
| isElectron && typeof window !== "undefined" && window.electronAPI?.platform === "darwin"; |
There was a problem hiding this comment.
The typeof window !== "undefined" check is redundant as isElectron already implies a browser environment. This logic is also duplicated in Header.tsx; moving it to a shared hook or utility would improve maintainability.
| const isMacElectron = | |
| isElectron && typeof window !== "undefined" && window.electronAPI?.platform === "darwin"; | |
| const isMacElectron = isElectron && window.electronAPI?.platform === "darwin"; |
|
|
Thanks @mercs2910 for this great contribution! 🎉 The PR has been integrated into the release/v3.5.5 branch and will be part of the next release. We appreciate your effort! |
|
Thanks @mercs2910 for this great contribution! 🎉 The PR has been manually merged and integrated into the release/v3.5.5 branch. |



Summary
Why
These changes address visible layout issues in the packaged macOS app, especially in the desktop sidebar where native window controls and localized labels can overlap or overflow.
Reproduction
Test plan