Split MainWindow.axaml.cs into partial classes#333
Merged
Conversation
Move-only refactor; no behavior changes. MainWindow.axaml.cs (1,380
lines) split into 4 partials:
FileOps (260) - File open/paste/drag-drop, LoadSqlFile,
LoadPlanFile, ValidatePlanXml, Save/RestoreOpenPlans
Tabs (209) - CreateTab, Close/Context menu, StartRename,
GetTabFilePath/Label, GetQueryTextFromPlan
PlanViewer (468) - CreatePlanTabContent, ShowAdviceWindow,
ShowCompareDialog, GetActualPlanFromFile,
ExtractDatabaseFromPlanXml
RecentPlans ( 78) - TrackRecentPlan, RebuildRecentPlansMenu,
RecentPlanItem_Click, ClearRecentPlans_Click
Main file now 342 lines — fields, ctor (drag-drop wiring, hotkeys,
command-line args, MCP start), StartPipeServer/StartMcpServer, OnClosed,
Exit_Click, About_Click, UpdateEmptyOverlay, ShowError,
CheckForUpdatesOnStartupAsync.
Build clean: 0 errors on PlanViewer.App (existing pre-existing CS0618
on DragEventArgs.Data is unchanged).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
440c224 to
c44a675
Compare
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
Move-only refactor of
MainWindow.axaml.cs(1,352 lines) into 4 partial-class files.File sizes
MainWindow.axaml.cs(main)StartPipeServer,StartMcpServer,OnClosed,Exit_Click,About_Click,UpdateEmptyOverlay,ShowError,CheckForUpdatesOnStartupAsync.FileOps.csLoadSqlFile,LoadPlanFile,ValidatePlanXml,Save/RestoreOpenPlans.Tabs.csCreateTab, close/context menu,StartRename,GetTabFilePath/Label,GetQueryTextFromPlan.PlanViewer.csCreatePlanTabContent,ShowAdviceWindow,ShowCompareDialog,GetActualPlanFromFile,ExtractDatabaseFromPlanXml.RecentPlans.csTrackRecentPlan,RebuildRecentPlansMenu,RecentPlanItem_Click,ClearRecentPlans_ClickBehavior
Test plan
dotnet build PlanViewer.sln— 0 errors🤖 Generated with Claude Code