Repository navigation
Give the Plan Insights strip one card system instead of per-card tints - #4599
Merged
Merged
Conversation
Ports PerformanceStudio dev's insights-strip card system (erikdarlingdata/PerformanceStudio@87bad14) to the shared plan viewer used by both the Darling Viewer and Lite. All three cards (Runtime Summary, Missing Indexes, Wait Stats) now sit on the same neutral BackgroundLightBrush surface with a 3px per-card accent edge (InsightIndexBrush, InsightWaitsBrush) instead of a full-bleed tinted background. Runtime Summary keeps a blank edge as the neutral centre. A card with nothing to report now goes quiet: its header drops to the muted foreground and its accent edge dims to 0.35, via a shared SetInsightQuiet helper whose quiet/non-quiet values live in the new pure PerformanceMonitor.PlanAnalysis.InsightCardStyle so they are testable outside WPF. No inline hex is left in the insight-card markup or code.
# Conflicts: # PerformanceMonitor.Ui/PlanViewerControl.xaml
erikdarlingdata
marked this pull request as ready for review
September 28, 2026 16:14
This was referenced Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4573. Part of #4511, plan viewer parity with PerformanceStudio.
Why
PerformanceStudio dev (
erikdarlingdata/PerformanceStudio@87bad14) replaced five differently-tinted insight cards with one neutral surface and a per-card accent edge, and added a "quiet" empty state so a panel with nothing to report no longer reads as an alert. PM's plan viewer (shared by the Darling Viewer and Lite) still used full-bleed tinted backgrounds for its Missing Indexes and Wait Stats cards, and an empty Missing Indexes panel kept its full tint. Users now see the same neutral-surface, accent-edge, quiet-empty-state system PerformanceStudio uses.Card inventory (PS vs PM)
ServerMetadatasurface wired to the viewer yet. Not in this PR.PlanStatement.Parameters), but no panel renders it. Not in this PR — would need a new card, in scope for a follow-up issue, not this card-system port.This PR is the card system applied to PM's three existing cards; it does not add the Server Context or Parameters cards PS has. They're filed as #4597 (Server Context) and #4598 (Parameters).
What changes
PerformanceMonitor.Ui/PlanViewerControl.xaml: the three insight cards (Runtime Summary, Missing Indexes, Wait Stats) now share oneBackgroundLightBrushsurface andBorderBrushseparator, with a 3px accent-edgeBorderper card (RuntimeSummaryAccentblank,MissingIndexAccent→InsightIndexBrush,WaitStatsAccent→InsightWaitsBrush).InsightIndexBrush/InsightWaitsBrushreplace the oldPlanMissingIndexBgBrush/PlanMissingIndexBorderBrush/PlanMissingIndexHeaderBrush/PlanWaitStatsBgBrush/PlanWaitStatsHeaderBrushin all three themes (Dark/Light/CoolBreeze) for both Lite and the Darling Viewer.PerformanceMonitor.Ui/PlanViewerControl.xaml.cs: a newSetInsightQuiet(header, accentBrush, accentEdge, isEmpty)helper (mirrors PS's), plusIndexAccentBrush/WaitsAccentBrushtheme-token lookups.PerformanceMonitor.Ui/PlanViewerControl.Properties.cs:ShowMissingIndexes,ShowWaitStatsandShowRuntimeSummarynow callSetInsightQuietso an empty card's header and accent edge go quiet.PerformanceMonitor.PlanAnalysis/InsightCardStyle.cs: the quiet/non-quiet accent-opacity and header-colour decision, testable outside WPF (AccentOpacity,HeaderUsesMutedForeground, matching PS's 0.35 dimmed-edge value).Lite: gets this too (shared control).
PM-ahead
PM has three themes (Dark/Light/CoolBreeze); PS has one (dark only). The Light/CoolBreeze
InsightIndexBrush/InsightWaitsBrushvalues are carried over unchanged from the old per-card header colours (#E65100/#1565C0for Light,#BF4700/#0D47A1for CoolBreeze) — a choice made here, since PS supplies no light-theme reference for these tokens.Not in this PR
Test plan
Build (0 warnings, 0 errors on each):
dotnet build Darling/Darling.Tests/Darling.Tests.csproj -c Release -p:EnableWindowsTargeting=truedotnet build Lite.Tests/Lite.Tests.csproj -c Release -p:EnableWindowsTargeting=truedotnet build Darling/PerformanceMonitor.Darling.Viewer/PerformanceMonitor.Darling.Viewer.csproj -c Release -p:EnableWindowsTargeting=trueNew pins:
Darling/Darling.Tests/Viewer4573Tests.cs(4 tests) —Total: 4, Failed: 0.AccentOpacity_MatchesPerformanceStudios0Point35QuietValue/HeaderUsesMutedForeground_IsTrueOnlyWhenEmpty/QuietAndNormalAccentOpacity_AreMutuallyExclusiveExtremes: compile-only RED against dev (InsightCardStyledoesn't exist there) — labelled as such, since this is an all-new helper.InsightCardMarkup_CarriesNoInlineHexColour: runtime RED confirmed against dev'sPlanViewerControl.xaml(worktree at461d5030e, dev tip) — the old code'sPlanMissingIndexBgBrush/etc. definitions are literal hex; GREEN on this branch. Verified viagit worktree add --detach, built and ran in-process, then removed the worktree.Also ran (0 failed beyond pre-existing live-Postgres connection failures, no rig running on this machine):
ShowPlanParserCondAndMultiplePlanTests,ActualPlanRequestTests,ActualPlanDispatchTests,ActualPlanResultParseTests,QueryModificationDetectorTests,ActualPlanCaptureLoopTests,ActualPlanGatingTests,ReproScriptBuilderHardeningTests,DarlingAnalysisPipelineTests(11 failures, allNpgsql...Connection refused— no local Postgres rig),TsqlConventionGuardTests,DocCommentHygieneTests,CommentFilterAdoptionTests,McpPayloadContractCensusTests,MigrationDataMovingRungCensusPins,McpServiceParameterDiSeatCensusTests,DailyDeadlockWindowCensusTests,EntraProviderPackageCensusTests,FileGrowthRiseUnitCensusTests,MeasurementContractCensusTests,SameStatementPileupSourceCensusTests,StoreSessionTimeZonePinCensusTests(1 failure, live-Postgres connection refused),WebExceptionTextCensusTests(38 failures, all live-Postgres connection refused).Not run:
Lite.Tests.dll(discovery dies on WindowsBase on macOS per the repo convention) — build-only, 0 warnings/errors.PerformanceMonitor.Darling.Viewer-hosted WPFViewer*classes that needPresentationFramework— skipped for the same reason; CI decides these.Screenshot plan (Darling Viewer and Lite, both light/dark/CoolBreeze themes, per card):
CHANGELOG
SECTION: Changed
ENTRY: - Plan viewer: one neutral card design for the insights strip ([#4599]) - Runtime Summary, Missing Index Suggestions, and Wait Stats now share one neutral surface with a thin per-card accent edge instead of a full-color tinted background, and an empty card (for example, no missing index suggestions) shows a dimmed, muted state instead of a loud tinted block.
REF: [#4599]: #4599