Skip to content

refactor: split handlers.ts into commands/, repl/ modules#537

Merged
magnus-madsen merged 1 commit into
masterfrom
refactor/split-handlers
Mar 28, 2026
Merged

refactor: split handlers.ts into commands/, repl/ modules#537
magnus-madsen merged 1 commit into
masterfrom
refactor/split-handlers

Conversation

@magnus-madsen
Copy link
Copy Markdown
Member

@magnus-madsen magnus-madsen commented Mar 28, 2026

Summary

  • Split monolithic handlers/handlers.ts (394 lines) into focused modules:
    • commands/replCommands.ts — REPL-based command handlers (init, build, test, etc.)
    • commands/lspCommands.ts — LSP-based commands (showAst, simulateDisconnect)
    • repl/manager.ts — REPL lifecycle management (launch, ensure exists, shared instance)
    • repl/jvm.ts — JVM/Flix argument construction
  • Inline the small handleChangeEditor function into extension.ts
  • Delete handlers/ directory (including the barrel index.ts)

Test plan

  • tsc --noEmit passes (client)
  • npm run build passes (esbuild bundle)
  • prettier --check passes
  • Existing integration tests pass (npm test)
  • Manual smoke test: commands work, REPL launches

🤖 Generated with Claude Code

Break the monolithic handlers.ts (394 lines) into focused modules:
- commands/replCommands.ts — REPL-based command handlers (init, build, test, etc.)
- commands/lspCommands.ts — LSP-based commands (showAst, simulateDisconnect)
- repl/manager.ts — REPL lifecycle (launch, ensure exists, shared instance)
- repl/jvm.ts — JVM/Flix argument construction

Inline the small handleChangeEditor function into extension.ts.
Delete handlers/ directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@magnus-madsen magnus-madsen merged commit 6b6228c into master Mar 28, 2026
20 of 27 checks passed
@magnus-madsen magnus-madsen deleted the refactor/split-handlers branch March 28, 2026 06:56
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