Skip to content

Split QuerySessionControl.axaml.cs into partial classes#328

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

Split QuerySessionControl.axaml.cs into partial classes#328
erikdarlingdata merged 1 commit into
devfrom
feature/split-querysessioncontrol

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

Move-only refactor of the second-largest file. Splits QuerySessionControl.axaml.cs (2,096 lines) into 8 topical partial-class files.

File sizes

File Lines Contents
QuerySessionControl.axaml.cs (main) 177 Usings, ctor (TextMate + key/wheel/completion wiring), fields, schema-menu state
.Editor.cs 286 Syntax highlighting, context menu, key/wheel handlers, zoom, batch helpers
.Schema.cs 355 ShowSchemaInfoAsync, AddSchemaTab, Format{Indexes,Columns}, BuildWithOptions
.Connection.cs 120 Connect_Click, PopulateDatabases, Fetch{Server,Database}Metadata*
.Execution.cs 477 Execute_Click / ExecuteEstimated_Click, CaptureAndShowPlan, GetActualPlan_Click
.Plans.cs 368 Plan tab add/close/rename/context-menu + compare-picker dialog
.QueryStore.cs 114 QueryStore_Click + plan-list handoff
.Advice.cs 24 Human/Robot advice click + ShowAdviceWindow
.Format.cs 124 Format_Click, FormatOptions_Click, CopyRepro_Click

Behavior

  • Move-only. No method bodies were modified.
  • All AXAML-bound event handlers retain their exact names.

Test plan

  • dotnet build PlanViewer.sln — 0 errors
  • Connect to a server, select a database — server metadata populates
  • Execute a query (actual + estimated plan paths) — plan tab opens
  • Right-click an identifier in editor — schema lookup works (indexes / table def)
  • Format SQL via toolbar; open Format Options dialog
  • Open Query Store dialog, pick plans, send to compare
  • Copy Repro, Human/Robot advice from a loaded plan

🤖 Generated with Claude Code

@erikdarlingdata erikdarlingdata changed the base branch from main to dev May 13, 2026 03:16
Move-only refactor; no behavior changes. QuerySessionControl.axaml.cs
(2,251 lines) split into 8 partials:

  Editor       (286) - syntax highlighting, context menu, key/wheel, zoom
  Schema       (355) - ShowSchemaInfoAsync + Format{Indexes,Columns} + BuildWithOptions
  Connection   (120) - Connect_Click + Populate/Fetch* metadata
  Execution    (477) - Execute/EstimatedPlan/GetActualPlan + CaptureAndShowPlan
  Plans        (368) - plan tab add/close/rename/context-menu + Compare picker
  QueryStore   (267) - QueryStore_Click + Overview + OpenQueryStoreForDatabaseAsync
  Advice       ( 24) - Human/Robot advice click + ShowAdviceWindow
  Format       (124) - Format_Click + FormatOptions + CopyRepro

Main file now 177 lines — usings, ctor, fields, AXAML wiring.

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-querysessioncontrol branch from 0810860 to c0d3225 Compare May 13, 2026 03:19
@erikdarlingdata erikdarlingdata merged commit aa02254 into dev May 13, 2026
2 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/split-querysessioncontrol branch May 13, 2026 03:29
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