Skip to content

Split FinOps services and content code-behinds into partial classes#913

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

Split FinOps services and content code-behinds into partial classes#913
erikdarlingdata merged 2 commits intodevfrom
feature/lite-dashboard-finops-splits

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

Services (sub-partials of an existing partial — same pattern as PR #912's DatabaseService.QueryPerformance split):

  • Dashboard/Services/DatabaseService.FinOps.cs: 2,924 → 24 (7 sub-partials)
  • Lite/Services/LocalDataService.FinOps.cs: 2,702 → 525 (7 sub-partials)

Content code-behinds (per-tab partials):

  • Dashboard/Controls/SystemEventsContent.xaml.cs: 2,263 → 363 (10 partials)
  • Dashboard/Controls/ResourceMetricsContent.xaml.cs: 1,881 → 406 (8 partials)
  • Dashboard/Controls/MemoryContent.xaml.cs: 1,356 → 256 (6 partials)

Test plan

  • dotnet build Lite/PerformanceMonitorLite.csproj -c Debug — 0 errors
  • dotnet build Dashboard/Dashboard.csproj -c Debug — 0 errors
  • Lite + Dashboard launched, NOC connectivity passed for all 5 servers (SQL2016/2017/2019/2022/2025)
  • 30-min Lite log watch — 0 error/warn/exception events
  • Lite collection_health snapshot (last 30 min): 18,390 collector runs across 24 collectors, 100% SUCCESS, 0 failures
  • User clicked around both apps; Dashboard FinOps + SystemEvents + ResourceMetrics + Memory tabs verified

🤖 Generated with Claude Code

erikdarlingdata and others added 2 commits April 29, 2026 18:09
Move-only refactor; no behavior changes. Five files split:

Services (partials of partials):
- Dashboard/Services/DatabaseService.FinOps.cs (2924 → 24) into 7 sub-partials:
  Inventory, Workload, Storage, Queries, IndexAnalysis, Recommendations, Models
- Lite/Services/LocalDataService.FinOps.cs (2702 → 525) into 7 sub-partials:
  ServerProperties, Inventory, StorageGrowth, Utilization, Workload,
  IndexAnalysis, Recommendations

Content code-behinds (per-tab partials):
- Dashboard/Controls/SystemEventsContent.xaml.cs (2263 → 363) into 10 partials:
  FilterPopup, SystemHealth, SevereErrors, IOIssues, SchedulerIssues,
  MemoryConditions, CPUTasks, MemoryBroker, MemoryNodeOOM, CopyExport
- Dashboard/Controls/ResourceMetricsContent.xaml.cs (1881 → 406) into 8 partials:
  LatchStats, SpinlockStats, TempdbStats, SessionStats, FileIoLatency,
  PerfmonCounters, WaitStatsDetail, CopyExport
- Dashboard/Controls/MemoryContent.xaml.cs (1356 → 256) into 6 partials:
  MemoryStats, MemoryGrants, MemoryClerks, PlanCache, MemoryPressure,
  CopyExport

Build: 0 errors. Smoke-tested: 30-min Lite watch with 0 error events;
collection_health snapshot 18,390 runs across 24 collectors, 100% SUCCESS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The fix in 562269f added IsTrayToolTipCrash() to OnDispatcherUnhandledException
in both apps, but the same race in Hardcodet.NotifyIcon.Wpf can also escape to
OnUnhandledException (AppDomain) — observed today when exiting via the tray
context menu. The Dispatcher's exception hooks tear down before the tray
library finishes processing late tooltip-hide messages, so the exception
arrives at AppDomain with no suppression and the user sees a Fatal Error
dialog despite the underlying crash being harmless.

Mirror the same IsTrayToolTipCrash() check in OnUnhandledException for both
Lite and Dashboard. Logs a Warn and returns without showing the dialog.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 8bde6fd into dev Apr 29, 2026
3 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/lite-dashboard-finops-splits branch April 29, 2026 22:51
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