refactor(ipc): split lib/ipc.ts into domain modules behind a barrel#700
Merged
Conversation
… behavior unchanged
- Delete src/lib/ipc.ts (1765 lines)
- Create src/lib/ipc/ with 22 domain modules + barrel index.ts
- Barrel re-exports every symbol the old ipc.ts exported (same names, same signatures)
- All existing `import { ... } from '@/lib/ipc'` paths continue to resolve identically
- No logic changes, no signature changes, no renames
- Mock state mutation (mockSettings, mockStylePacks) centralised in mock-data.ts
via exported helpers (mockSetSettings, mockSetDefaultPolishMode, etc.) to avoid
ES module read-only binding violations
- TypeScript: zero errors (npx tsc --noEmit)
- Build: clean (npm run build)
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
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.
User description
Summary
First of the #697 god-file splits. Pure, behavior-preserving reorganization of
src/lib/ipc.ts(1765 lines, ~118 public exports) into asrc/lib/ipc/folder of 22 domain modules behind a barrelindex.ts.import … from '…/lib/ipc'resolves unchanged (0 consumer edits; 33 import sites verified).invokeOrMock/Tauri helpers, mock-data, utils.lib/ipc.Verification
npx tsc --noEmit: clean.npm run build: clean.Part of #697 (split oversized modules). Frontend-only; no Rust/cfg changes.
🤖 Generated with Claude Code
PR Type
Enhancement
Description
Split monolithic
src/lib/ipc.tsinto 22 domain modules behind a barrelAll exports preserved; zero consumer edits required
Mock state mutation helpers centralized to avoid ES module binding issues
Diagram Walkthrough
File Walkthrough
19 files
barrel re-exporting all public symbolscore Tauri detection and invokeOrMockstyle pack CRUD and polish modevocabulary and correction rulesdictation history and audio recordinghotkey status, capability, and bindingsmarketplace listing and installationuser preferences retrieval and updatestart/stop/cancel dictationcredential management and provider listingmicrophone and accessibility permissionsnetwork check and microphone devicesapp update channel and version checksQA window controls and hotkeyLess Computer window dismiss and approveremote input status and local IPsGitHub OAuth device flowlocalStorage cache for marketplace dataClaude coding agent detection and test1 files
centralized mock state and helpers3 files