Skip to content

refactor: split CLI, Desktop, and account store module boundaries#18

Merged
Dikevin merged 6 commits intomasterfrom
refactor/core-module-boundaries
Apr 13, 2026
Merged

refactor: split CLI, Desktop, and account store module boundaries#18
Dikevin merged 6 commits intomasterfrom
refactor/core-module-boundaries

Conversation

@Dikevin
Copy link
Copy Markdown
Collaborator

@Dikevin Dikevin commented Apr 13, 2026

Summary

This PR is a structural refactor only. It does not intentionally change CLI or runtime semantics.

No Semantic Changes

  • no new user-facing features
  • no intended behavior changes in account switching, Desktop launch/watch flows, or runtime reads
  • changes are focused on extracting modules, clarifying boundaries, and organizing code into shallow subsystem directories

What Was Refactored

  • extracted CLI desktop/watch orchestration out of src/main.ts into focused modules such as src/commands/desktop.ts, src/switching.ts, src/watch/session.ts, src/watch/output.ts, and src/desktop/managed-state.ts
  • split src/codex-desktop-launch.ts internals into helper modules for devtools access, runtime expression/normalization, process helpers, shared constants/utilities, managed state parsing, and shared types
  • split account-store helpers into dedicated modules for repository access, config snapshot handling, storage utilities, and shared account-store types
  • grouped the account-store, desktop, and watch implementations into shallow subsystem directories under src/ and updated the codebase to import the directory-backed modules directly
  • tightened and stabilized runner/watcher tests to make the refactor easier to verify

Verification

  • pnpm typecheck
  • pnpm test

@Dikevin Dikevin force-pushed the refactor/core-module-boundaries branch from 299094e to 61b3bd5 Compare April 13, 2026 12:23
@Dikevin Dikevin force-pushed the refactor/core-module-boundaries branch from 35c7d33 to 1d110ea Compare April 13, 2026 12:40
@Dikevin Dikevin merged commit 2c3561a into master Apr 13, 2026
2 checks passed
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