Skip to content

Wait-category colours: a laid-out, contrast-checked palette - #4583

Merged
erikdarlingdata merged 1 commit into
devfrom
viewer/4578-wait-palette
Sep 28, 2026
Merged

erikdarlingdata merged 1 commit into
devfrom
viewer/4578-wait-palette

Conversation

@erikdarlingdata

@erikdarlingdata erikdarlingdata commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Fixes #4578. Part of #4511.

Why

erikdarlingdata/PerformanceStudio@161785f replaced 23 individually-picked wait-category colours with a laid-out palette: hue carries the family (green = compute, blue = storage/network, warm = contention, grey = "no information"), lightness climbs within a family so neighbours stay apart under simulated colour-vision deficiency, and every colour clears a 3:1 contrast floor against the chart background. Three of the old colours failed that floor (Buffer IO measured 2.00), and two pairs shared a hue outright.

What changes

PerformanceMonitor.Common/ChartPalette.cs's WaitCategoryColors table now holds PerformanceStudio dev's hex values, copied verbatim from its current DarkTheme.axaml (unchanged since 161785f through PS dev 85492a1).

WaitCategoryColorsLight (PM's own light-background override, which PS's Avalonia app has no equivalent for) is kept as a mechanism, but re-checked against the new hexes: SQL CLR and Full Text Search still need a darker override on light backgrounds and got new values computed against their new base colours; Replication's new hue reads fine unmodified on a light background, so its entry was dropped.

Batch Mode is a PM-only category with no counterpart in PS's diff (PM classifies batch-mode hash/bitmap-filter waits separately; PS folds them elsewhere); its colour is untouched — PM-ahead, not part of this port.

ChartPalette.WaitColor is shared code (PerformanceMonitor.Common), consumed by both the Darling Viewer's plan viewer and Lite's wait charts through the same call path, so both get the new palette with this one change.

Test plan

New file Darling/Darling.Tests/Viewer4578Tests.cs:

  • a golden pin: every one of the 23 ported categories' WaitColor(category, lightBackground: false) matches PS dev's hex, byte for byte;
  • a WCAG 2.x contrast pin: every one of those 23 colours clears 3:1 against PS's dark chart background (#1A1D23, BackgroundBrush in PS's DarkTheme.axaml), the same floor PS's commit measured against.

Built clean, 0 warnings / 0 errors, on Darling.Tests.csproj -c Release -p:EnableWindowsTargeting=true.

Ran in-process on macOS (dotnet Darling.Tests.dll -class Darling.Tests.Viewer4578Tests): Total: 46, Errors: 0, Failed: 0, Skipped: 0.

RED confirmed against pre-fix dev (130bc6a, a disposable worktree, same test file copied in, built and run the same way): Total: 46, Errors: 0, Failed: 26. The 26 failures are the 23 golden-hex mismatches plus 3 contrast failures (Buffer IO, Mirroring, Others — the categories whose old colours sat under or near the 3:1 floor).

Lite: gets this too, since it renders wait charts through the same shared ChartPalette.WaitColor. No Lite-specific code changed; not separately pinned because the helper it calls is the one pinned above.

CHANGELOG

SECTION: Changed
ENTRY: - Wait-category colours use PerformanceStudio's contrast-checked palette ([#4583]) - Wait-category chart colours in the plan viewer and Lite's wait charts now use a laid-out, contrast-checked palette instead of individually picked colours, and three colours that fell short of readable contrast against the dark chart background are fixed.
REF: [#4583]: #4583

Port PerformanceStudio dev's contrast-checked wait-category palette
(erikdarlingdata/PerformanceStudio@161785f) into the shared
ChartPalette.WaitColor table consumed by the Darling Viewer's plan
viewer and Lite's wait charts. Hue carries the family, lightness
climbs within a family, and every colour now clears a 3:1 contrast
floor against the chart background; three previously did not.

Re-checked the light-background override table against the new
hexes: kept SQL CLR and Full Text Search with recomputed overrides,
dropped Replication's (its new hue reads fine unmodified).
@erikdarlingdata
erikdarlingdata marked this pull request as ready for review September 28, 2026 14:22
@erikdarlingdata
erikdarlingdata merged commit 49c5b6a into dev Sep 28, 2026
20 of 22 checks passed
@erikdarlingdata
erikdarlingdata deleted the viewer/4578-wait-palette branch September 28, 2026 14:22
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