Skip to content

Split Lite + Dashboard god-class files into partial classes#912

Merged
erikdarlingdata merged 2 commits intodevfrom
feature/dashboard-file-splits
Apr 29, 2026
Merged

Split Lite + Dashboard god-class files into partial classes#912
erikdarlingdata merged 2 commits intodevfrom
feature/dashboard-file-splits

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

  • Move-only refactor: split eight god-class files in Lite/ and Dashboard/ into focused partial-class siblings (Refresh / Charts / Plans / Filters / etc.). No behavior or signature changes.
  • Lite/Controls/ServerTab.xaml.cs: 5,824 → 1,571 (8 partials)
  • Lite/Controls/PlanViewerControl.xaml.cs: 2,376 → 209 (4 partials)
  • Lite/MainWindow.xaml.cs: 2,352 → 1,967 (1 partial)
  • Dashboard/Services/DatabaseService.QueryPerformance.cs: 4,941 → 1,198 (6 sub-partials)
  • Dashboard/ServerTab.xaml.cs: 3,871 → 533 (9 partials)
  • Dashboard/Controls/QueryPerformanceContent.xaml.cs: 2,869 → 1,279 (6 partials)
  • Dashboard/Controls/PlanViewerControl.xaml.cs: 2,539 → 368 (4 partials)
  • Dashboard/MainWindow.xaml.cs: 2,523 → 2,112 (1 partial)

Test plan

  • dotnet build Lite/PerformanceMonitorLite.csproj -c Debug — 0 errors
  • dotnet build Dashboard/Dashboard.csproj -c Debug — 0 errors, 0 warnings
  • Lite launched, 20-min log monitor — 0 errors, 0 exceptions, 0 warns
  • Lite collection_health snapshot (last 30 min): 10,376 collector runs, all SUCCESS
  • Dashboard launched, NOC connectivity passed for all 5 servers (SQL2016/2017/2019/2022/2025), MCP server up on :5150
  • User confirmed clicking around both apps behaves as expected

🤖 Generated with Claude Code

erikdarlingdata and others added 2 commits April 29, 2026 09:28
Move-only refactor; no behavior changes. Three files split:
- Controls/ServerTab.xaml.cs (5824 → 1571) into 8 partials:
  Refresh, Charts, Pickers, Plans, DrillDown, Comparison, CopyExport, Filters
- MainWindow.xaml.cs (2352 → 1967): plan viewer extracted to MainWindow.PlanViewer.cs
- Controls/PlanViewerControl.xaml.cs (2376 → 209) into 4 partials:
  Rendering, Properties, Tooltips, Interaction

Build clean: 0 errors, 186 warnings (all pre-existing CA1873).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Move-only refactor; no behavior changes. Five files split:
- Services/DatabaseService.QueryPerformance.cs (4941 → 1198) into 6 sub-partials:
  Snapshots, Stats, Blocking, History, Trends, Mcp
- ServerTab.xaml.cs (3871 → 533) into 9 partials:
  Refresh, Charts, Plans, TimeRange, Filters, DrillDown, Slicers, CopyExport, Alerts
- Controls/QueryPerformanceContent.xaml.cs (2869 → 1279) into 6 partials:
  Filters, Plans, Slicers, Comparison, Heatmap, CopyExport
- Controls/PlanViewerControl.xaml.cs (2539 → 368) into 4 partials:
  Rendering, Properties, Tooltips, Interaction
- MainWindow.xaml.cs (2523 → 2112): plan viewer extracted to MainWindow.PlanViewer.cs

Build clean: 0 errors, 0 warnings (pre-existing CA1806 warnings now
attached to ServerTab.Plans.cs since those methods moved there).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@erikdarlingdata erikdarlingdata merged commit 95fc881 into dev Apr 29, 2026
3 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/dashboard-file-splits branch April 29, 2026 18:50
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