Repository navigation
Split IPC_HANDLERS into per-namespace modules (#1447 pass S) - #1472
Merged
Merged
Conversation
retireAgent, runRetention and resolveThreadRoot are used by more than one upcoming ipc-<namespace>.js module, so they get a single owner that both ipc.js and the namespace modules require. Bodies moved verbatim. Refs #1447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Handlers moved verbatim; ipc.js spreads the module into IPC_HANDLERS at the rows' old position. ipc.js now drops its cached ipc-*.js modules before requiring them. Tests re-require ipc.js after evicting services.js / worktrees.js / the electron stub (ipc-async-guard stubs services on the fresh copy); without the eviction a cached ipc-<namespace>.js keeps calling the first services.js. Refs #1447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Handlers moved verbatim; ipc.js spreads the module into IPC_HANDLERS at the position of the group's first row. Refs #1447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…:* handlers into ipc-insights.js Handlers moved verbatim; ipc.js spreads the module into IPC_HANDLERS at the position of the group's first row. Refs #1447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ers:*, sourceControl:* handlers into ipc-app.js Handlers moved verbatim; ipc.js spreads the module into IPC_HANDLERS at the position of the group's first row. Refs #1447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Handlers moved verbatim; ipc.js spreads the module into IPC_HANDLERS at the position of the group's first row. Refs #1447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Handlers moved verbatim; ipc.js spreads the module into IPC_HANDLERS at the position of the group's first row. Refs #1447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
… ipc-runs.js Handlers moved verbatim; ipc.js spreads the module into IPC_HANDLERS at the position of the group's first row. Refs #1447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lers into ipc-git.js Handlers moved verbatim; ipc.js spreads the module into IPC_HANDLERS at the position of the group's first row. Refs #1447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…c-files.js Handlers moved verbatim; ipc.js spreads the module into IPC_HANDLERS at the position of the group's first row. Refs #1447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ndlers into ipc-devserver.js Handlers moved verbatim; ipc.js spreads the module into IPC_HANDLERS at the position of the group's first row. Refs #1447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r.js Handlers moved verbatim; ipc.js spreads the module into IPC_HANDLERS at the position of the group's first row. Refs #1447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ules Refs #1447 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Closed
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Round 6, pass S of #1447.
IPC_HANDLERSwas one ~2,000-line object literal inelectron/ipc.jsmapping every renderer→main channel to its handler. It's now split into 11 flat namespace modules plusipc-shared.jsfor helpers several namespaces use. ipc.js composes them with spreads, andregisterIpc,makeCtxand the guards stay in ipc.js.ipc-threads.jsipc-git.jsipc-simulator.jsipc-app.jsipc-projects.jsipc-devserver.jsipc-files.jsipc-runs.jsipc-mcp.jsipc-skills.jsipc-insights.jsipc-shared.jsipc.js: 2,476 → 176 lines.Checked
Object.keys(IPC_HANDLERS)gives the identical 262-channel set on main and this branch. Every handler's function source text is byte-identical to main's.IPC_HANDLERShas, so no spread silently overrides another.IPC_HANDLERS(ipc.jsregistration and the web bridge) registers each channel by name, so order doesn't matter.d02841d8) and verified there.npm run typecheckis clean, includingsync-ipc-preload --check.npx vite buildandnpm run test:smoke(real Electron over IPC) pass A–E.🤖 Generated with Claude Code