refactor(electron): implement robust IPC error handling and full test coverage#3378
refactor(electron): implement robust IPC error handling and full test coverage#3378Shevilll wants to merge 2 commits into
Conversation
isInsideSomeScreen required the window to be fully contained within a single display, so a window left at a screen edge or spanning two monitors failed the check and applyRootWindowState re-centered it on the primary display on the next launch. Treat a window as on-screen when it overlaps any display (the standard window-within-bounds heuristic) instead of requiring full containment, so the saved bounds are preserved. This also fixes the same re-centering for the video call window, which reuses this helper. Closes RocketChat#2714
|
Warning Review limit reached
More reviews will be available in 35 minutes and 16 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
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 |
Summary
This pull request implements robust IPC error handling, prevents potential memory leaks in the main process, and introduces full unit test coverage for the IPC modules.
Changes
Main Process IPC (src/ipc/main.ts)
Renderer Process IPC (src/ipc/renderer.ts)
Unit Tests Coverage
Verification
All existing and new test suites compile and pass successfully under the Electron simulation runner: