Add typed Electron IPC channel registry#617
Conversation
|
Warning Review limit reached
More reviews will be available in 52 minutes and 2 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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
📊 Test Coverage Report
Coverage Legend
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 572d844a1e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export interface AuthPromptParams { | ||
| authUrl: string; | ||
| redirectUri: string; | ||
| } |
There was a problem hiding this comment.
Add state to the auth prompt request type
The existing Electron auth caller sends state in the auth:prompt payload for CSRF validation (packages/core/src/hooks/use-wcpos-auth/index.electron.ts:72-75), but this new source-of-truth request type only permits authUrl and redirectUri. When the registry is used to type this channel, the current payload is rejected by excess-property checks or typed code is forced to omit state, which can break auth flows that rely on main-process state validation.
Useful? React with 👍 / 👎.
🚀 Deployment Summary
🔗 Quick Links🤖 Updated by GitHub Actions |
Summary
@wcpos/printer/ipc-channelsregistry for Stage 1 Electron IPC channel names and request/response types.TypedIpcRendererso wrong Stage 1 channel names or payload shapes fail at compile time.rxStorageinvoke channel from the typed/preload invoke set while preserving the dynamic RxDB channel prefix path.Design decisions (preserve through rebases)
.ctsso preload can import runtime constants from@wcpos/printer/ipc-channelsunder the existing plaints-nodepreload test.packages/printer/ipc-channels.d.tskeeps Node10-style TypeScript resolution working for packages that import the new subpath directly.rxStorageremoved intentionally — the live RxDB bridge uses dynamicrxdb-ipc-renderer-storage|<key>channels, and the onlyrxStoragehandler is in an uncompiled.bakfile.Companion PRs / cross-repo
Test plan
pnpm --filter @wcpos/app-electron ts:checkfrom this monorepo worktree.pnpm --filter @wcpos/app-electron lintand confirm there are 0 errors (warnings are pre-existing require/no-unused warnings).pnpm --filter @wcpos/app-electron test.test:preload,test:printer-discovery,test:serial-printer,test:winspool-printer.pnpm --filter @wcpos/printer exec tsc --noEmit -p tsconfig.json.pnpm --filter @wcpos/printer exec vitest run.print-raw-usbZZ), confirm printertsc --noEmitfails, then revert before merging.Known blockers
🤖 Generated with Claude Code