Skip to content

Split QueryStoreGridControl.axaml.cs into partial classes#330

Merged
erikdarlingdata merged 1 commit into
devfrom
feature/split-querystoregridcontrol
May 13, 2026
Merged

Split QueryStoreGridControl.axaml.cs into partial classes#330
erikdarlingdata merged 1 commit into
devfrom
feature/split-querystoregridcontrol

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

Move-only refactor of QueryStoreGridControl.axaml.cs (1,900 lines) into 7 partial-class files.

File sizes

File Lines Contents
QueryStoreGridControl.axaml.cs (main) 451 Fields, ctor, public SetInitialTimeRange, DB picker (PopulateDatabaseBox, QsDatabase_SelectionChanged), static accessor/column dicts; plus the unrelated QueryStoreRow class at the bottom
.Fetch.cs 450 Fetch_Click, FetchPlansForRangeAsync, flat/grouped fetch, grouping helpers (BuildGroupedRows, AggregateGroupedRows)
.Filters.cs 229 Search filter + column filter popup + ApplyFilters + Match{Text,Numeric}
.GroupBy.cs 148 GroupBy_SelectionChanged, column reordering, row expand/collapse
.Sort.cs 245 Sorting, ApplySortAndFilters{,Grouped}, UpdateBarRatios, GetSortKey, status text
.Selection.cs 134 Select/Load/ViewHistory, context menu, copy menu
.WaitStats.cs 182 Wait stats fetch + category click + mode toggle
.TimeRange.cs 33 OnTimeRangeChanged

Behavior

  • Move-only. No method bodies were modified.
  • All AXAML-bound event handlers retain their exact names.
  • The standalone QueryStoreRow class at the bottom of the file is untouched.

Test plan

  • dotnet build PlanViewer.sln — 0 errors
  • Open Query Store dialog — DB picker populates, time slicer initializes
  • Fetch top plans (flat + grouped by query hash + grouped by module)
  • Toggle wait stats mode, click a category to highlight
  • Sort by a column, expand a grouped row, filter by a column
  • Select rows, View History, Copy menu items work

🤖 Generated with Claude Code

@erikdarlingdata erikdarlingdata changed the base branch from main to dev May 13, 2026 03:17
Move-only refactor; no behavior changes. QueryStoreGridControl.axaml.cs
(1,959 lines) split into 7 partials:

  Fetch       (452) - Fetch_Click + FetchPlans/WaitStats + grouping
  Filters     (256) - search type/value + column filter popup + ApplyFilters
  GroupBy     (161) - GroupBy + ReorderColumns + row expand/collapse
                      + ResultsGrid_DoubleTapped + ToggleRowExpansion
  Sort        (245) - sorting + UpdateBarRatios + GetSortKey + status
  Selection   (134) - select/load/ViewHistory/context menu + copy
  WaitStats   (182) - wait fetch + category click + mode toggle
  TimeRange   ( 33) - OnTimeRangeChanged

Main file now 465 lines — fields, ctor, public API
(SetInitialTimeRange), DB picker, and static accessor dictionaries.

The standalone QueryStoreRow class at the bottom of the file is
untouched.

Build clean: 0 errors, 0 warnings on PlanViewer.App.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata force-pushed the feature/split-querystoregridcontrol branch from ae53535 to caa98d0 Compare May 13, 2026 03:21
@erikdarlingdata erikdarlingdata merged commit a1665ad into dev May 13, 2026
2 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/split-querystoregridcontrol branch May 13, 2026 03:30
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