Skip to content

Commit 5f588fc

Browse files
Remove unused ExpandRowRecursive after #305 (#306)
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) <noreply@anthropic.com>
1 parent df1d95f commit 5f588fc

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
using System.Linq;
66
using System.Runtime.CompilerServices;
77
using System.Threading;
8-
using Avalonia;
98
using Avalonia.Controls;
109
using Avalonia.Controls.Primitives;
1110
using Avalonia.Interactivity;
1211
using Avalonia.Media;
13-
using Microsoft.Data.SqlClient;
1412
using PlanViewer.Core.Interfaces;
1513
using PlanViewer.Core.Models;
1614
using PlanViewer.App.Dialogs;
@@ -312,8 +310,6 @@ private async System.Threading.Tasks.Task FetchGroupedPlansAsync(
312310
LoadButton.IsEnabled = true;
313311
SelectToggleButton.Content = "Select All";
314312

315-
316-
317313
UpdateStatusText();
318314
UpdateBarRatios();
319315

@@ -322,29 +318,6 @@ private async System.Threading.Tasks.Task FetchGroupedPlansAsync(
322318
_ = FetchGroupedWaitStatsAsync(_slicerStartUtc.Value, _slicerEndUtc.Value, ct);
323319
}
324320

325-
/// <summary>
326-
/// Recursively expands a row and all its children, inserting them into _filteredRows.
327-
/// </summary>
328-
private void ExpandRowRecursive(QueryStoreRow row)
329-
{
330-
if (!row.HasChildren) return;
331-
row.IsExpanded = true;
332-
333-
var idx = _filteredRows.IndexOf(row);
334-
if (idx < 0) return;
335-
336-
var insertAt = idx + 1;
337-
foreach (var child in row.Children)
338-
{
339-
_filteredRows.Insert(insertAt, child);
340-
insertAt++;
341-
}
342-
343-
// Recurse into each child that has children
344-
foreach (var child in row.Children)
345-
ExpandRowRecursive(child);
346-
}
347-
348321
/// <summary>
349322
/// Fetches per-plan wait stats for all real plan IDs found in the grouped hierarchy,
350323
/// assigns them to leaf rows, then consolidates upward to intermediate and root rows.

0 commit comments

Comments
 (0)