Conversation
WalkthroughLinux platform support is added to Bruno's window management system. Changes include a new Linux OS detection utility, CSS styling rules for Linux titlebar chrome, extended window control IPC handlers for Linux, and frameless window creation on Linux matching Windows behavior. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/bruno-app/src/components/AppTitleBar/StyledWrapper.js (1)
204-211: LGTM - Linux styling mirrors Windows as intended.The Linux-specific styles correctly replicate the Windows adjustments for frameless window chrome. Minor observation: these rules are identical to lines 195-202 (Windows). You could consolidate them with a combined selector if desired:
Optional: Combined selector
- /* Windows-specific styles */ - &.os-windows .titlebar-content { + /* Windows and Linux-specific styles */ + &.os-windows .titlebar-content, + &.os-linux .titlebar-content { padding-right: 0px; padding-left: 0px; } - &.os-windows .titlebar-left { + &.os-windows .titlebar-left, + &.os-linux .titlebar-left { margin-left: 6px; } - - &.os-linux .titlebar-content { - padding-right: 0px; - padding-left: 0px; - } - - &.os-linux .titlebar-left { - margin-left: 6px; - }packages/bruno-app/src/utils/common/platform.js (1)
36-41: Works correctly, but consider extracting distro list for maintainability.The function follows the established pattern. The long condition on line 40 is hard to scan and extend. Consider:
Optional: Extract distro list
export const isLinuxOS = () => { const os = platform.os; const osFamily = os.family.toLowerCase(); - - return osFamily.includes('linux') || osFamily.includes('ubuntu') || osFamily.includes('debian') || osFamily.includes('fedora') || osFamily.includes('centos') || osFamily.includes('arch'); + const linuxFamilies = ['linux', 'ubuntu', 'debian', 'fedora', 'centos', 'arch']; + return linuxFamilies.some((family) => osFamily.includes(family)); };
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
packages/bruno-app/src/components/AppTitleBar/StyledWrapper.jspackages/bruno-app/src/components/AppTitleBar/index.jspackages/bruno-app/src/utils/common/platform.jspackages/bruno-electron/src/index.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions.() => {}is good
No space between function name and parentheses.func()notfunc ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly
Files:
packages/bruno-electron/src/index.jspackages/bruno-app/src/utils/common/platform.jspackages/bruno-app/src/components/AppTitleBar/index.jspackages/bruno-app/src/components/AppTitleBar/StyledWrapper.js
🧠 Learnings (3)
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.
Applied to files:
packages/bruno-electron/src/index.jspackages/bruno-app/src/utils/common/platform.jspackages/bruno-app/src/components/AppTitleBar/index.jspackages/bruno-app/src/components/AppTitleBar/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Components are used as wrappers to define both self and children components style; Tailwind classes are used specifically for layout based styles
Applied to files:
packages/bruno-app/src/components/AppTitleBar/index.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Component CSS might also change layout but Tailwind classes shouldn't define colors
Applied to files:
packages/bruno-app/src/components/AppTitleBar/StyledWrapper.js
🧬 Code graph analysis (1)
packages/bruno-app/src/utils/common/platform.js (1)
packages/bruno-app/src/utils/common/path.js (2)
os(5-5)osFamily(6-6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: CLI Tests
- GitHub Check: SSL Tests - Linux
- GitHub Check: Unit Tests
- GitHub Check: Playwright E2E Tests
- GitHub Check: SSL Tests - Windows
- GitHub Check: SSL Tests - macOS
🔇 Additional comments (8)
packages/bruno-app/src/components/AppTitleBar/index.js (5)
23-23: LGTM - Clean import addition.
28-29: LGTM - OS class detection extended correctly.
38-39: Good abstraction withshowWindowControls.Clean DRY improvement - consolidates the Windows/Linux check into a single boolean for reuse throughout the component.
60-85: LGTM - Effect guard and dependency array correctly updated.The
showWindowControlsguard at line 61 and its inclusion in the dependency array at line 85 ensures the effect only runs on Windows/Linux and re-evaluates if the condition changes.
302-326: LGTM - Window controls rendering guard updated.The
showWindowControlscondition correctly enables window control buttons for both Windows and Linux platforms.packages/bruno-electron/src/index.js (3)
88-88: LGTM - Linux platform constant added.
171-193: LGTM - IPC handlers correctly extended for Linux.All four window control IPC handlers (minimize, maximize, close, is-maximized) now properly gate on
isWindows || isLinux. The guards are consistent and allow Linux to share the same IPC control path as Windows.
159-161: Approve—window frame configuration correct; consider style improvement.The logic correctly sets
frame: falseonly for Linux sincetitleBarStyle: 'hidden'has no effect there. The current implementation properly handles each platform:titleBarStyle: 'hiddenInset'for macOS,'hidden'for Windows, andundefinedfor Linux withframe: false.Minor suggestion: Simplify
isLinux ? false : trueto!isLinuxfor brevity.
Description
Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.