refactor: split 5 large files into smaller modules#141
Conversation
- executor.go: core types, lifecycle, cache tracking - executor_dispatch.go: statement routing (executeInner switch) - executor_query.go: query dispatchers (execShow, execDescribe) - executor_connect.go: connection management (connect, reconnect, disconnect, status)
- init.go: command definition, global vars, findMprFile(), init() - init_claudemd.go: generateClaudeMD(), yamlSingleQuote(), wrapSkillContent(), extractSkillDescription() - init_vscode.go: installVSCodeExtension(), findCodeCLI()
- app.go: core types, NewApp, watcher/agent setup, tab management, Init, session restore - app_update.go: Update() message dispatcher - app_keys.go: handleBrowserAppKeys(), dispatchPaletteKey() - app_view.go: View(), rendering helpers, agent state/change parsing, BSON helpers
- cmd_entities.go: CRUD operations (create, alter, drop) - cmd_entities_describe.go: display and describe (show, describe, microflow resolution) - cmd_entities_access.go: access control (GRANT output, member access resolution)
ako
left a comment
There was a problem hiding this comment.
Pure file reorganization — verified no logic changes. The 5 modified files only have deletions (plus 2 added section-header comments). The +115 line surplus is file headers on 13 new files.
Splits are sensible:
executor.go→ dispatch, query, connect (clear separation of concerns)tui/app.go→ update, keys, view (MVC-ish split)widget_engine.go→ operations, defaults, templates (by responsibility)cmd_entities.go→ describe, access (by command type)init.go→ claudemd, vscode (by output target)
LGTM.
…e-files # Conflicts: # mdl/executor/cmd_entities.go # mdl/executor/executor.go
AI Code ReviewWhat Looks GoodThis PR is a pure file reorganization effort that splits 5 large files into smaller, focused modules without changing any logic or APIs. The changes are clean and follow good software engineering practices:
The CLAUDE.md generation code was appropriately moved from RecommendationApprove the PR. This is a valuable refactoring that improves code readability and maintainability without introducing any functional changes. The two unchecked items in the test plan (import cycles and function signature verification) are low-risk for this type of reorganization, but the reviewer should still verify them if possible before merging. Given that all files stay in their original packages and no imports were added/removed, import cycles are unlikely to have been introduced. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
Summary
Files split
mdl/executor/executor.goexecutor.go,executor_dispatch.go,executor_query.go,executor_connect.gocmd/mxcli/tui/app.goapp.go,app_update.go,app_keys.go,app_view.gomdl/executor/widget_engine.gowidget_engine.go,widget_operations.go,widget_defaults.go,widget_templates.gomdl/executor/cmd_entities.gocmd_entities.go,cmd_entities_describe.go,cmd_entities_access.gocmd/mxcli/init.goinit.go,init_claudemd.go,init_vscode.go18 files changed, 3833 insertions(+), 3718 deletions(-)
Test plan
make buildpassesmake testpasses