Skip to content

fix(desktop-ui): improve macOS sidebar layout - #1001

Closed
mercs2910 wants to merge 1 commit into
cheaper-inference:release/v3.5.4from
mercs2910:codex/macos-desktop-layout
Closed

mercs2910 wants to merge 1 commit into
cheaper-inference:release/v3.5.4from
mercs2910:codex/macos-desktop-layout

Conversation

@mercs2910

@mercs2910 mercs2910 commented Apr 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • fix layout overlap around native macOS traffic lights in the desktop sidebar/header area
  • improve sidebar spacing and scroll containment in the dashboard layout
  • avoid lower action button overflow for longer localized labels

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

  • Launch the macOS desktop app.
  • Observe the top-left window controls overlapping sidebar content.
  • In localized UI, observe lower sidebar action buttons overflowing the available width.

Test plan

  • launch the macOS desktop app
  • verify top-left traffic lights do not overlap the sidebar content
  • verify lower sidebar action buttons render without overflow in localized UI

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +127 to +128
const isMacElectron =
isElectron && typeof window !== "undefined" && window.electronAPI?.platform === "darwin";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
const isMacElectron =
isElectron && typeof window !== "undefined" && window.electronAPI?.platform === "darwin";
const isMacElectron = isElectron && window.electronAPI?.platform === "darwin";

Comment on lines +25 to +26
const isMacElectron =
isElectron && typeof window !== "undefined" && window.electronAPI?.platform === "darwin";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
const isMacElectron =
isElectron && typeof window !== "undefined" && window.electronAPI?.platform === "darwin";
const isMacElectron = isElectron && window.electronAPI?.platform === "darwin";

@sonarqubecloud

sonarqubecloud Bot commented Apr 5, 2026

Copy link
Copy Markdown

@diegosouzapw
diegosouzapw marked this pull request as ready for review April 7, 2026 20:27
@diegosouzapw
diegosouzapw self-requested a review as a code owner April 7, 2026 20:27
@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.5.4 April 7, 2026 21:34
@diegosouzapw

Copy link
Copy Markdown
Collaborator

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!

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks @mercs2910 for this great contribution! 🎉 The PR has been manually merged and integrated into the release/v3.5.5 branch.

@diegosouzapw diegosouzapw mentioned this pull request Apr 22, 2026
This was referenced Apr 30, 2026
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants