Skip to content

Update node/electron and implement proper IPC#113

Draft
Pimentoso wants to merge 35 commits into
masterfrom
ipc
Draft

Update node/electron and implement proper IPC#113
Pimentoso wants to merge 35 commits into
masterfrom
ipc

Conversation

@Pimentoso

@Pimentoso Pimentoso commented Feb 8, 2026

Copy link
Copy Markdown
Owner

Modernizes the application from Electron 9 (Node 12) to Electron 37 (Node 22), removing Python 2 dependency and enabling Apple Silicon builds. Refactors renderer-process operations to main process via IPC handlers.

Core Upgrades

  • Electron 9.4.4 → 37.0.0
  • Node.js 12 → 22 (bundled)
  • serialport 9.0.7 → 13.0.0 (required for Node 22)

Architecture Changes

IPC Layer (preload.js)

New preload script exposes secure APIs via window.electronAPI:

Backend Migration (window.js)

Moved 1000+ LOC from renderer to main process

Renderer Refactoring

Removed electron.remote, updated to async patterns, converted to IPC calls and async/await

// Before
const { app } = require('electron').remote;
const racePath = path.join(app.getPath('userData'), 'races');
fs.mkdirSync(racePath);

// After
const racePath = await window.electronAPI.getAppPath('userData');
await window.electronAPI.ensureDir(path.join(racePath, 'races'));

⚠️ Trade-offs

  • Drops Windows 7 support (Windows 10+ required)

Build Changes

  • Updated electron-rebuild scripts for native module compilation
  • Added serialport override in package.json for dependency resolution
  • ESLint rules tightened for async/await patterns

@Pimentoso

Copy link
Copy Markdown
Owner Author

@copilot can you provide a description for this PR.

Copilot AI commented Feb 8, 2026

Copy link
Copy Markdown

@Pimentoso I've opened a new pull request, #114, to work on those changes. Once the pull request is ready, I'll request review from you.

@Pimentoso Pimentoso self-assigned this Feb 9, 2026
@Pimentoso
Pimentoso marked this pull request as draft May 15, 2026 09:34
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