Release vv1.5.4
Summary
Critical bug fix release that finally resolves the Ctrl+I sidebar toggle functionality with the correct contextBridge callback pattern.
This is the fourth attempt at fixing the sidebar toggle (v1.5.1, v1.5.2 skipped fix, v1.5.3, v1.5.4), and this one finally gets it right by understanding how Electron's context isolation actually works.
Root Cause
With Electron's contextIsolation: true, there are TWO completely separate JavaScript contexts:
- Preload context - Has access to Node.js and Electron APIs
- Page context - The renderer/React application
Why Previous Approaches Failed
| Version | Approach | Why It Failed |
|---|---|---|
| v1.5.1 | Callback-based IPC | Timing issues, callbacks not properly stored |
| v1.5.2 | Technical debt focus | Sidebar fix not addressed |
| v1.5.3 | CustomEvent in preload | preload's window is NOT the page's window |
| v1.5.4 | contextBridge callback | Works! Electron creates a proxy |
Technical Solution
The correct pattern uses contextBridge callbacks which CAN be proxied across the isolation boundary:
Main Process (Ctrl+I detected via globalShortcut)
|
v
IPC "sidebar-toggle" message sent to webContents
|
v
Preload receives IPC (ipcRenderer.on listener set up on load)
|
v
Preload invokes stored callback (registered via contextBridge)
|
v
Callback executes in page context (Electron proxies the call)
|
v
React state updates, sidebar toggles
Files Changed
src/electron/preload.ts- IPC listener + callback storage patternsrc/overlay/index.tsx- Callback registration via electronAPI.onSidebarToggle()CHANGELOG.md- v1.5.4 release notes with detailed technical explanationREADME.md- Updated latest release sectionpackage.json- Version bump to 1.5.4VERSION- Version bump to 1.5.4
Quality Checks
- TypeScript: 0 errors
- ESLint: 0 warnings
- Build: Successful
- Tests: 8/8 passing
Testing Instructions
- Install the update
- Launch GeForce Infinity
- Press
Ctrl+Ito toggle the sidebar - The sidebar should appear and disappear reliably
Technical Notes for Electron Developers
This fix demonstrates the ONLY correct pattern for main-to-renderer communication in Electron with context isolation:
- Main -> Preload: Use
webContents.send()andipcRenderer.on() - Preload -> Page: Use callback functions registered via
contextBridge - NEVER rely on: Shared window object, CustomEvent, or direct DOM manipulation across contexts
Full Changelog
See CHANGELOG.md for complete release notes.
Generated with Claude Opus 4.5