Skip to content

Remove sync app info IPC shims#277

Open
kilbot wants to merge 1 commit into
nextfrom
refactor/remove-sync-ipc-shims
Open

Remove sync app info IPC shims#277
kilbot wants to merge 1 commit into
nextfrom
refactor/remove-sync-ipc-shims

Conversation

@kilbot

@kilbot kilbot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removed the getBasePathSync and getAppVersionSync synchronous IPC registration modules and their side-effect imports.
  • Computes window.electron.basePath directly in the preload from process.resourcesPath, preserving the existing file://.../dist string shape with no trailing slash.
  • Passes app.getVersion() once through webPreferences.additionalArguments and parses it from process.argv in the preload, preserving window.electron.version as a string without any IPC round-trip.
  • Updated the preload bridge test to fail on any unexpected sendSync and assert the exposed basePath and version values.

Design decisions (preserve through rebases)

  • Duplicated APP_VERSION_ARG_PREFIX in window.ts and preload.ts — keeps the deletion focused without introducing a shared module for one string.
  • basePath remains file:// + path.join(process.resourcesPath, 'dist') with no trailing slash — the Expo bundle expects split asset paths to start with their own slash.
  • version is sourced only from app.getVersion() in the main process — Electron's app object is not available inside the preload.

Test plan

  • pnpm ts:check
  • pnpm lint (exited 0; reported warnings, no errors)
  • pnpm test
  • pnpm run test:preload prints preload bridge assertions passed as part of pnpm test
  • Confirmed no getBasePathSync / getAppVersionSync references remain under src/
  • Confirmed deleted shim files are absent and window.ts imports app

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@kilbot, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 14 minutes and 4 seconds. Learn how PR review limits work.

To continue reviewing without waiting, enable usage-based billing in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 refill rate.

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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: wcpos/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 02664d57-4bcc-4525-9459-60f2b5adf63d

📥 Commits

Reviewing files that changed from the base of the PR and between 5851f72 and e75121b.

📒 Files selected for processing (6)
  • src/index.ts
  • src/main/appVersion.ts
  • src/main/basePath.ts
  • src/main/window.ts
  • src/preload.test.ts
  • src/preload.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/remove-sync-ipc-shims

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

@kilbot kilbot changed the base branch from main to next June 17, 2026 22:02
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