Skip to content

fix(electron): register missing getGitHubStars IPC handler and guard window teardown - #91

Merged
ExtraBinoss merged 3 commits into
BeamRecorder:masterfrom
abdulrahman532:fix/electron-lifecycle-handlers
Oct 4, 2026
Merged

ExtraBinoss merged 3 commits into
BeamRecorder:masterfrom
abdulrahman532:fix/electron-lifecycle-handlers

Conversation

@abdulrahman532

@abdulrahman532 abdulrahman532 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Addresses runtime uncaught IPC exceptions during UI initialization, prevents race conditions during window teardown, and fixes a Node 22+ test assertion failure.


Problem

  1. Missing IPC Handler: The frontend invokes getGitHubStars via ipcRenderer.invoke(), but no matching handler was registered in electron/main.cjs.
  2. Window Teardown Race Condition: In electron/lifecycle/fatal-events.cjs, accessing BrowserWindow instances during fatal error handling throws an exception if the window has already been destroyed.
  3. Node 22+ Symlink Cleanup Failure: In test/screenshot-images.test.cjs, running fs.rmSync on a symlinked directory fails with EISDIR on Node 22+.

Solution

  • IPC Registration: Registered ipcMain.handle('community:get-github-stars') in electron/main.cjs.
  • Teardown Guard: Added a check in electron/lifecycle/fatal-events.cjs to ignore benign Object has been destroyed rejections during teardown.
  • Vite Config: Configured server.strictPort: true in vite.config.ts.
  • Test Fix: Added { recursive: true } to fs.rmSync when removing the symlinked directory in test/screenshot-images.test.cjs.

Verification

  • bun run typecheck (0 errors)
  • bun run test (770/770 passed)

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: acf3dd14-4ba7-42d8-a3b0-efe536a38d45
📥 Commits

Reviewing files that changed from the base of the PR and between c9fb21b and fbeefdc.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • apps/desktop/electron/community-links.cjs
  • apps/desktop/electron/lifecycle/fatal-events.cjs
  • test/community-links.test.cjs
  • test/fatal-lifecycle.test.cjs
  • test/screenshot-images.test.cjs
  • vite.config.ts
 ____________________________________________________________________
< Sometimes, I feel like a code reviewer in a world of copy-pasters. >
 --------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ExtraBinoss
ExtraBinoss merged commit df70042 into BeamRecorder:master Oct 4, 2026
1 check was pending
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