Repository navigation
fix: workspace home icon alignment in title bar when already fullscreen - #7967
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAppTitleBar now synchronizes fullscreen state by invoking a new main-process IPC handler ( ChangesFullscreen State Initialization via IPC
Sequence DiagramsequenceDiagram
participant AppTitleBar as AppTitleBar<br/>(Renderer)
participant IPC as IPC Channel
participant MainProcess as Main Process
AppTitleBar->>MainProcess: invoke('renderer:window-is-fullscreen')
MainProcess->>MainProcess: check mainWindow.isFullScreen()
MainProcess-->>AppTitleBar: return boolean state
AppTitleBar->>AppTitleBar: setIsFullScreen(state)
MainProcess->>AppTitleBar: emit('main:enter-full-screen')
AppTitleBar->>AppTitleBar: setIsFullScreen(true)
MainProcess->>AppTitleBar: emit('main:leave-full-screen')
AppTitleBar->>AppTitleBar: setIsFullScreen(false)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/bruno-app/src/components/AppTitleBar/index.spec.js`:
- Around line 85-87: The test currently uses a broad assertion
expect(window.ipcRenderer.invoke).toHaveBeenCalled() which can give false
positives; change it to assert the specific fullscreen IPC channel by using
expect(window.ipcRenderer.invoke).toHaveBeenCalledWith('<FULLSCREEN_CHANNEL>',
...expectedArgs) (or use expect.stringMatching(/fullscreen/) if the exact string
is not certain) for the invocation in the waitFor block, and make the same
replacement for the other occurrences around the test (the assertions against
window.ipcRenderer.invoke in this spec) so the test verifies the fullscreen
channel call explicitly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e3729938-e76e-470c-9cbe-8cc30029abb7
📒 Files selected for processing (3)
packages/bruno-app/src/components/AppTitleBar/index.jspackages/bruno-app/src/components/AppTitleBar/index.spec.jspackages/bruno-electron/src/index.js
Description
Fixes inconsistent alignment of the workspace home control ( on macOS ) when the window is already in native fullscreen when the UI loads. React previously defaulted isFullScreen to false until enter-full-screen / leave-full-screen fired, so title bar padding still assumed traffic lights were present.
Tracked in: BRU
Changes
ipcRenderer.invoke('renderer:window-is-fullscreen')and setisFullScreenfrom the result (same pattern as maximized state).ipcMain.handle('renderer:window-is-fullscreen')returningmainWindow.isFullScreen().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.
Packages changed
Cross-package interactions
Tests & Coverage
Notes