Skip to content

v1.2.0 Release#100

Merged
erikdarlingdata merged 14 commits intomainfrom
dev
Mar 17, 2026
Merged

v1.2.0 Release#100
erikdarlingdata merged 14 commits intomainfrom
dev

Conversation

@erikdarlingdata
Copy link
Owner

@erikdarlingdata erikdarlingdata commented Mar 17, 2026

v1.2.0 Release

Query Store Enhancements

Bug Fixes

Code Quality (22 fixes)

  • MCP session leak on plan tab close
  • CancellationTokenSource disposal across all controls
  • TextMate.Installation disposal
  • Consolidated duplicate connection dialog code
  • CLI: credential check, --output flag, input validation, .env support for query-store command
  • Core: async disposal, KeychainCredentialService deadlock fix, ShowPlanParser error handling
  • Removed dead QueryStoreDialog code

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Query Store history window with performance metrics charts and data grid visualization
    • Advanced filtering in Query Store: search by query/plan ID, hash, and module name
    • Clipboard copy options for query details and query store rows
    • View historical query execution data from selected plans
  • Bug Fixes

    • Improved parameter and variable reporting accuracy
    • Enhanced file I/O error handling
  • Documentation

    • Added macOS setup guidance for Performance Studio

erikdarlingdata and others added 14 commits March 10, 2026 11:40
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Node-level: Insert/Update/Delete on table variables now shows Critical
  "forces serial" warning instead of generic "lacks statistics" message
- Statement-level: stats warning only fires when reading from a table
  variable, not modifying it
- Parameters pane: exclude table variable names from local variable
  detection so @t is not misreported as an unresolved local variable

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
PointerWheelChanged was attached with bubble routing, so the ScrollViewer
consumed scroll-down events before the Ctrl+zoom handler could intercept
them. Switch to Tunnel routing via AddHandler so the zoom handler fires
first, matching how the pan handlers are already wired up.

Closes #83

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Add <ApplicationIcon> to csproj so the icon is embedded in the PE
resources. Without this, Windows falls back to the default app icon
when the application is pinned to the taskbar.

Closes #85

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
RetrievedFromCache is an attribute on the StmtSimple XML element,
but the parser was reading it from the child QueryPlan element
where it never exists. Changed to read from stmtEl instead of
queryPlanEl.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…#93)

- Server-side fetch by query_id, plan_id, query_hash, query_plan_hash, module name
- Schema-qualified module names (OBJECT_SCHEMA_NAME + OBJECT_NAME)
- Wildcard support for module filter (dbo.%Order%)
- New columns: Query Hash, Plan Hash, Module with column-level filtering
- Search bar in toolbar with Enter-to-fetch
- Database picker on Query Store tab
- Select All/None toggle button
- Second QS button click shows connection dialog for fresh tab
- CLI: --query-id, --plan-id, --query-hash, --plan-hash, --module options
- MCP: query_id, plan_id, query_hash, plan_hash, module parameters

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Copy Query ID, Plan ID, Query Hash, Plan Hash, Module Name, Query Text
- Copy Row (tab-delimited, all columns)
- Items disabled when no row selected or value is empty

Closes #91

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rebuild connection string from current database selection at execution
time rather than relying on cached _connectionString from SelectionChanged.
Guarantees the picker state is always reflected when running queries.

Closes #92

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Core:
- ServerMetadataService: using → await using for async disposal
- KeychainCredentialService: fix potential deadlock on stdout/stderr
- ShowPlanParser: add ParseError property instead of silent swallow
- EstimatedPlanExecutor: null check on BatchSequence in merge
- ServerConnection: throw when SQL auth credentials missing
- QueryStoreService: fix PlanId filter applied after ROW_NUMBER

CLI:
- AnalyzeCommand: add missing return after credential check failure
- AnalyzeCommand: wrap BuildServerConnection in try/catch
- AnalyzeCommand: respect --output flag in live mode
- Add --top/--hours-back/--timeout validation
- QueryStoreCommand: add .env file support
- Extract shared ConnectionHelper to eliminate duplication

UI:
- Fix MCP session leak: call viewer.Clear() on all tab close paths
- Dispose CancellationTokenSource before creating new instances
- Dispose TextMate.Installation on DetachedFromVisualTree
- Consolidate duplicate Connect_Click / ShowConnectionDialogAsync
- Cancel in-flight fetch on QS database change
- Add try/catch to SavePlan_Click
- Log MCP startup errors to Debug output
- Validate numeric input in QS search (Query ID / Plan ID)
- Remove dead QueryStoreDialog (superseded by QueryStoreGridControl)
- Remove dead _currentPropertySection field

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Enables automatic PR reviews on dev and main branches with
context-aware instructions for Avalonia app, PlanAnalyzer core,
MCP server, and test code paths. Uses chill profile to reduce noise.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Right-click "View History" on any Query Store row opens a history window
- ScottPlot.Avalonia chart shows time-series metrics per plan (separate colored lines)
- 13 selectable metrics: 7 averages + 5 totals + executions
- SQL aggregates across execution_type (Regular/Aborted/Exception) via GROUP BY
- UTC-aware: filters with GETUTCDATE(), displays in local time
- Hover tooltip shows plan, metric value, and timestamp
- Adjustable hours-back with Refresh button
- DataGrid with all metrics below the chart

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5144e35c-c6e8-46ce-9df2-3bd62553373d

📥 Commits

Reviewing files that changed from the base of the PR and between bb25d7f and f4f66ec.

📒 Files selected for processing (30)
  • .coderabbit.yaml
  • README.md
  • src/PlanViewer.App/Controls/PlanViewerControl.axaml.cs
  • src/PlanViewer.App/Controls/QuerySessionControl.axaml.cs
  • src/PlanViewer.App/Controls/QueryStoreGridControl.axaml
  • src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs
  • src/PlanViewer.App/Dialogs/QueryStoreDialog.axaml
  • src/PlanViewer.App/Dialogs/QueryStoreDialog.axaml.cs
  • src/PlanViewer.App/Dialogs/QueryStoreHistoryWindow.axaml
  • src/PlanViewer.App/Dialogs/QueryStoreHistoryWindow.axaml.cs
  • src/PlanViewer.App/MainWindow.axaml.cs
  • src/PlanViewer.App/Mcp/McpHostService.cs
  • src/PlanViewer.App/Mcp/McpQueryStoreTools.cs
  • src/PlanViewer.App/PlanViewer.App.csproj
  • src/PlanViewer.Cli/Commands/AnalyzeCommand.cs
  • src/PlanViewer.Cli/Commands/QueryStoreCommand.cs
  • src/PlanViewer.Cli/ConnectionHelper.cs
  • src/PlanViewer.Cli/PlanViewer.Cli.csproj
  • src/PlanViewer.Core/Models/PlanModels.cs
  • src/PlanViewer.Core/Models/QueryStoreHistoryRow.cs
  • src/PlanViewer.Core/Models/QueryStorePlan.cs
  • src/PlanViewer.Core/Models/ServerConnection.cs
  • src/PlanViewer.Core/PlanViewer.Core.csproj
  • src/PlanViewer.Core/Services/EstimatedPlanExecutor.cs
  • src/PlanViewer.Core/Services/KeychainCredentialService.cs
  • src/PlanViewer.Core/Services/PlanAnalyzer.cs
  • src/PlanViewer.Core/Services/QueryStoreService.cs
  • src/PlanViewer.Core/Services/ServerMetadataService.cs
  • src/PlanViewer.Core/Services/ShowPlanParser.cs
  • src/PlanViewer.Ssms.Installer/PlanViewer.Ssms.Installer.csproj

📝 Walkthrough

Walkthrough

This PR introduces Query Store history visualization with ScottPlot charting, refactors Query Store UI from modal dialog to grid-integrated toolbar components, adds server-side filtering for Query Store analysis via CLI and UI, implements centralized connection management, and enhances core services with additional metadata tracking. Version bumped to 1.2.0 across all projects.

Changes

Cohort / File(s) Summary
Configuration & Project Setup
.coderabbit.yaml, README.md, src/PlanViewer.App/PlanViewer.App.csproj, src/PlanViewer.Cli/PlanViewer.Cli.csproj, src/PlanViewer.Core/PlanViewer.Core.csproj, src/PlanViewer.Ssms.Installer/PlanViewer.Ssms.Installer.csproj
Added CodeRabbit configuration with path filters and review preferences. Updated README with macOS signing guidance. Bumped all project versions to 1.2.0. Added ScottPlot.Avalonia 5.1.57 dependency and EDD.ico application icon.
Query Store History Feature
src/PlanViewer.App/Dialogs/QueryStoreHistoryWindow.axaml, src/PlanViewer.App/Dialogs/QueryStoreHistoryWindow.axaml.cs, src/PlanViewer.Core/Models/QueryStoreHistoryRow.cs, src/PlanViewer.Core/Services/QueryStoreService.cs
Introduced new QueryStoreHistoryWindow with dark-themed ScottPlot charting, metric selection dropdown, hover tooltips, and configurable time windows. Added QueryStoreHistoryRow model with computed local time properties. Extended QueryStoreService with FetchHistoryAsync for time-series aggregation.
Query Store Dialog Removal
src/PlanViewer.App/Dialogs/QueryStoreDialog.axaml, src/PlanViewer.App/Dialogs/QueryStoreDialog.axaml.cs
Removed legacy modal dialog UI and code-behind; functionality migrated to QueryStoreGridControl toolbar integration.
Query Store Grid UI & Logic
src/PlanViewer.App/Controls/QueryStoreGridControl.axaml, src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs
Refactored UI: consolidated buttons into database-focused toolbar with QsDatabaseBox, added SearchTypeBox/SearchValueBox with ClearSearchButton, introduced context menu with View History and clipboard copy operations. Extended data model with QueryHash, QueryPlanHash, ModuleName properties. Updated constructor to accept ServerConnection and ICredentialService; added DatabaseChanged event and database runtime switching with validation.
Connection & Credential Management
src/PlanViewer.Cli/ConnectionHelper.cs, src/PlanViewer.Core/Models/ServerConnection.cs, src/PlanViewer.Core/Services/KeychainCredentialService.cs
Added new ConnectionHelper utility with BuildConnectionString (supports MARS toggle) and LoadEnvFile methods. Modified ServerConnection to throw InvalidOperationException when credentials missing for SQL Server branch. Converted KeychainCredentialService to async stdout reading.
Core Models & Data Filtering
src/PlanViewer.Core/Models/PlanModels.cs, src/PlanViewer.Core/Models/QueryStorePlan.cs
Added ParseError property to ParsedPlan. Introduced QueryStoreFilter class with nullable fields for QueryId, PlanId, QueryHash, QueryPlanHash, ModuleName. Extended QueryStorePlan with new string properties for QueryHash, QueryPlanHash, ModuleName.
Query Store Service Enhancements
src/PlanViewer.Core/Services/QueryStoreService.cs
Extended FetchTopPlansAsync with optional QueryStoreFilter parameter, added parameterized filtering by query_id, plan_id, query_hash (wildcard), query_plan_hash, module_name. Updated SELECT and reader mapping to populate new metadata fields. Implemented FetchHistoryAsync with aggregation across execution intervals.
Plan Analysis & Parsing
src/PlanViewer.Core/Services/ShowPlanParser.cs, src/PlanViewer.Core/Services/PlanAnalyzer.cs, src/PlanViewer.Core/Services/EstimatedPlanExecutor.cs
Enhanced ShowPlanParser error handling to capture parse exceptions in ParseError field and correct RetrievedFromCache source to statement level. Refined PlanAnalyzer Rule 22 to differentiate table variable warnings: Critical severity for modifications (forces serial), Warning for reads. Fixed EstimatedPlanExecutor to handle missing BatchSequence gracefully.
CLI Commands & Filtering
src/PlanViewer.Cli/Commands/AnalyzeCommand.cs, src/PlanViewer.Cli/Commands/QueryStoreCommand.cs
Refactored AnalyzeCommand to use ConnectionHelper.LoadEnvFile, enforce timeout >= 0, harden credential retrieval with exception handling, consolidate output formatting by outputFormat flag. Extended QueryStoreCommand with CLI options --query-id, --plan-id, --query-hash, --plan-hash, --module; added environment variable parsing (PLANVIEW_LOGIN, PLANVIEW_PASSWORD, PLANVIEW_TRUST_CERT); integrated QueryStoreFilter throughout data flow; enhanced output with Query Hash and Module metadata.
App UI Controls
src/PlanViewer.App/Controls/PlanViewerControl.axaml.cs, src/PlanViewer.App/Controls/QuerySessionControl.axaml.cs, src/PlanViewer.App/MainWindow.axaml.cs
PlanViewerControl: replaced PointerWheelChanged with tunnel-routing handler for Ctrl+Wheel zoom, introduced rootNode-aware FindUnresolvedVariables filtering to exclude table variables from plan tree, added try-catch around file I/O for save robustness. QuerySessionControl: added ShowConnectionDialogAsync, PopulateDatabases, HasQueryStoreTab helper methods; improved disposal of CTS and TextMate installation. MainWindow: centralized advice display logic via delegates, replaced inline copy-repro lambda.
Utility Services
src/PlanViewer.Core/Services/ServerMetadataService.cs, src/PlanViewer.App/Mcp/McpHostService.cs, src/PlanViewer.App/Mcp/McpQueryStoreTools.cs
Converted ServerMetadataService to async disposal (await using). Enhanced McpQueryStoreTools.GetQueryStoreTop with optional filter parameters (query_id, plan_id, query_hash, plan_hash, module); added query_hash, query_plan_hash, module_name to output payload. Improved McpHostService exception logging.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@erikdarlingdata erikdarlingdata merged commit ed5b000 into main Mar 17, 2026
3 of 4 checks passed
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.

2 participants