From 15625205c807d6c90ceb0f00292310ac4f6f6100 Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Sun, 3 May 2026 09:21:16 -0400 Subject: [PATCH] Remove unused ExpandRowRecursive after #305 PR #305 dropped the only caller of ExpandRowRecursive in FetchGroupedPlansAsync. Delete the now-unreachable method (only its self-recursion remained) plus stale Avalonia/SqlClient usings in the same file. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Controls/QueryStoreGridControl.axaml.cs | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs index 9911142..77ff44a 100644 --- a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs +++ b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs @@ -5,12 +5,10 @@ using System.Linq; using System.Runtime.CompilerServices; using System.Threading; -using Avalonia; using Avalonia.Controls; using Avalonia.Controls.Primitives; using Avalonia.Interactivity; using Avalonia.Media; -using Microsoft.Data.SqlClient; using PlanViewer.Core.Interfaces; using PlanViewer.Core.Models; using PlanViewer.App.Dialogs; @@ -312,8 +310,6 @@ private async System.Threading.Tasks.Task FetchGroupedPlansAsync( LoadButton.IsEnabled = true; SelectToggleButton.Content = "Select All"; - - UpdateStatusText(); UpdateBarRatios(); @@ -322,29 +318,6 @@ private async System.Threading.Tasks.Task FetchGroupedPlansAsync( _ = FetchGroupedWaitStatsAsync(_slicerStartUtc.Value, _slicerEndUtc.Value, ct); } - /// - /// Recursively expands a row and all its children, inserting them into _filteredRows. - /// - private void ExpandRowRecursive(QueryStoreRow row) - { - if (!row.HasChildren) return; - row.IsExpanded = true; - - var idx = _filteredRows.IndexOf(row); - if (idx < 0) return; - - var insertAt = idx + 1; - foreach (var child in row.Children) - { - _filteredRows.Insert(insertAt, child); - insertAt++; - } - - // Recurse into each child that has children - foreach (var child in row.Children) - ExpandRowRecursive(child); - } - /// /// Fetches per-plan wait stats for all real plan IDs found in the grouped hierarchy, /// assigns them to leaf rows, then consolidates upward to intermediate and root rows.