Skip to content

refactor(ipc): consolidate the desktop bridge - #486

Merged
charleslpan merged 4 commits into
mainfrom
username/consolidate-ipc-bridge
Aug 24, 2026
Merged

refactor(ipc): consolidate the desktop bridge#486
charleslpan merged 4 commits into
mainfrom
username/consolidate-ipc-bridge

Conversation

@charleslpan

@charleslpan charleslpan commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • define every renderer-to-main method, channel, transport, and wire guard in one typed bridge manifest
  • split renderer-safe wire vocabulary into domain modules and derive the preload bridge from the manifest
  • register all main-process handlers through one trusted sender/argument/result boundary and reject direct IPC registrations
  • keep bridge context outside optional domain arguments and make invalid invokes reject explicitly

Verification

  • ./scripts/check.sh
  • ./scripts/verify.sh
  • incremental desktop typechecks after each logical commit

Commit structure

  1. typed bridge manifest and domain wire contracts
  2. renderer imports moved to explicit domain boundaries
  3. centralized main/preload registration and repository enforcement
  4. focused bridge-context and invalid-request regression fix from review

Automated visual evidence

Download the deterministic macOS evidence · workflow run

  • Commit: 8455ab9e9c9535e480bcedad8745b2bfed80ade3
  • Scenario: smoke
  • Physical-notch check: not performed by CI

Split structured-clone vocabulary by domain and derive every renderer-to-main method from one guarded manifest.
Keep the sandbox boundary explicit by replacing the monolithic compatibility barrel with bridge and domain wire imports.
Route main handlers and preload exposure through the typed manifest, validate sender, arguments, and results in one place, and reject direct IPC registrations in repository checks.
@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
luke-web Skipped Skipped Aug 24, 2026 8:00pm

Request Review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d5f0b98. Configure here.

Comment thread apps/desktop/src/main/register-bridge.ts Outdated
Comment thread apps/desktop/src/main/register-bridge.ts
Pass the trusted sender context before guarded bridge arguments so omitted optional values stay omitted, and reject invalid invokes instead of returning a successful undefined result.
@charleslpan
charleslpan added this pull request to the merge queue Aug 24, 2026
Merged via the queue into main with commit b480dd9 Aug 24, 2026
8 checks passed
@charleslpan
charleslpan deleted the username/consolidate-ipc-bridge branch August 24, 2026 20:08
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.

1 participant