Conversation
WalkthroughThe update introduces an event listener in the Tab class that listens for the "did-finish-load" event on the webContents object. Upon this event, it sets the visual zoom level limits to a minimum of 1 and a maximum of 5, constraining the zoom range after web content loads. Changes
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/main/browser/tabs/tab.ts (1)
365-368: Add minimal error-handling forsetVisualZoomLevelLimits
webContents.setVisualZoomLevelLimits()returns a Promise.
If (for example) the WebContents is destroyed during navigation the promise rejects, producing an unhandled-rejection warning in the main process. A terse catch keeps the log clean without bloating the code.- webContents.setVisualZoomLevelLimits(1, 5); + webContents + .setVisualZoomLevelLimits(1, 5) + .catch((err) => console.warn("Failed to set zoom limits:", err));[nitpick]
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/main/browser/tabs/tab.ts(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: build (windows-latest)
- GitHub Check: build (macos-latest)
- GitHub Check: build (macos-13)
- GitHub Check: build (ubuntu-24.04-arm)
- GitHub Check: build (ubuntu-latest)
|
Awesome! Didn't know it can be enabled that way. |
Introduces pinch-to-zoom functionality, commonly used on macOS trackpads
It enables webFrame.setVisualZoomLevelLimits to max 500% zoom.
Example:
Screen.Recording.2025-06-16.at.22.41.07.mp4
Summary by CodeRabbit