Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

Refactor god-object modules across desktop, TUI, and server

8 months ago

5823a64
Authored
mweinbach2/23/2026, 2:32:19 AM
Split desktop store actions into domain factories and decompose store helpers into runtime, persistence, transcript, control socket, and thread reducer modules while preserving public store APIs.

Extract TUI sync event/model-stream/socket lifecycle modules, split Electron IPC registration by concern with shared trusted invoke helpers, and keep public entrypoints stable.

Refactor SessionDb internals into repository/migrations/legacy import/file hardening layers and split MCP auth/config registry into parser/store/editor/layer modules with compatibility facades and shared config path resolution.

Validated with targeted cross-area suites and full bun test (all passing; remote MCP tests skipped).

Co-authored-by: Codex <noreply@openai.com>

Parentfaaa209

48 files changed
  • apps/TUI/context/socketLifecycle.ts+90−0
  • apps/TUI/context/sync.tsx+217−1019
  • apps/TUI/context/syncEventReducer.ts+352−0
  • apps/TUI/context/syncModelStreamLifecycle.ts+415−0
  • apps/TUI/context/syncTypes.ts+128−0
  • apps/desktop/electron/ipc.ts+22−456
  • apps/desktop/electron/ipc/files.ts+140−0
  • apps/desktop/electron/ipc/invoke.ts
+24
−0
  • apps/desktop/electron/ipc/parse.ts+11−0
  • apps/desktop/electron/ipc/system.ts+61−0
  • apps/desktop/electron/ipc/trustedSender.ts+27−0
  • apps/desktop/electron/ipc/types.ts+34−0
  • apps/desktop/electron/ipc/window.ts+57−0
  • apps/desktop/electron/ipc/workspace.ts+106−0
  • apps/desktop/electron/ipc/workspaceRoots.ts+83−0
  • apps/desktop/src/app/store.actions.ts+17−1445
  • apps/desktop/src/app/store.actions/bootstrap.ts+239−0
  • apps/desktop/src/app/store.actions/explorer.ts+190−0
  • apps/desktop/src/app/store.actions/mcp.ts+236−0
  • apps/desktop/src/app/store.actions/provider.ts+308−0
  • apps/desktop/src/app/store.actions/skills.ts+138−0
  • apps/desktop/src/app/store.actions/thread.ts+373−0
  • apps/desktop/src/app/store.actions/workspace.ts+211−0
  • apps/desktop/src/app/store.actions/workspaceDefaults.ts+184−0
  • apps/desktop/src/app/store.helpers.ts+42−1047
  • apps/desktop/src/app/store.helpers/controlSocket.ts+350−0
  • apps/desktop/src/app/store.helpers/persistence.ts+37−0
  • apps/desktop/src/app/store.helpers/runtimeState.ts+129−0
  • apps/desktop/src/app/store.helpers/threadEventReducer.ts+534−0
  • apps/desktop/src/app/store.helpers/transcriptBuffer.ts+38−0
  • src/mcp/authStore.ts+27−593
  • src/mcp/authStore/editor.ts+155−0
  • src/mcp/authStore/parser.ts+69−0
  • src/mcp/authStore/resolver.ts+187−0
  • src/mcp/authStore/store.ts+145−0
  • src/mcp/authStore/types.ts+68−0
  • src/mcp/configPaths.ts+42−0
  • src/mcp/configRegistry.ts+24−514
  • src/mcp/configRegistry/editor.ts+125−0
  • src/mcp/configRegistry/layers.ts+141−0
  • src/mcp/configRegistry/migration.ts+114−0
  • src/mcp/configRegistry/parser.ts+83−0
  • src/mcp/configRegistry/types.ts+45−0
  • src/server/sessionDb.ts+28−439
  • src/server/sessionDb/fileHardening.ts+31−0
  • src/server/sessionDb/legacyImport.ts+32−0
  • src/server/sessionDb/migrations.ts+39−0
  • src/server/sessionDb/repository.ts+398−0