Extract inline MCP handler methods into standalone functions#777
Merged
Merged
Conversation
Each inline method in the 694-line createMcpHandlers() closure is now a standalone named function. The registration function drops to ~100 lines of thin delegation, matching the activity.ts extraction pattern from #773. Co-Authored-By: Claude Opus 4.6 <[email protected]>
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.
Summary
createMcpHandlers()closure inapps/server/src/server/mcp-handlers.tsinto standalone named functionscreateMcpHandlers()drops from ~560 lines of inline logic to ~100 lines of thin delegationWhat qualifies as tech debt
The original
createMcpHandlers()was a 694-line function with 17 inline methods, all sharing a closure over dependencies. Each handler is now a top-level named function that receivesdepsexplicitly — easier to read, test, and navigate individually.Next up
Extract route handlers from the 713-line
registerReleaseRoutes()inapps/server/src/routes/release.ts(top of the backlog).🤖 Generated with Claude Code