Skip to content

Fix FinOps severity sort order in Dashboard (#872)#875

Merged
erikdarlingdata merged 1 commit intodevfrom
fix/872-dashboard-finops-severity-order
Apr 21, 2026
Merged

Fix FinOps severity sort order in Dashboard (#872)#875
erikdarlingdata merged 1 commit intodevfrom
fix/872-dashboard-finops-severity-order

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

  • Ports the Lite fix from PR Fix FinOps recommendation severity sort order (#872) #874 to Dashboard.
  • Sort FinOps recommendations by severity rank (High=1, Medium=2, Low=3) instead of alphabetically.
  • Adds SeveritySort to FinOpsRecommendation and wires SortMemberPath="SeveritySort" on the Severity column so header-click sort matches.
  • Display strings unchanged.

Follow-up to #872 / #874 — same bug existed in Dashboard, caught during post-merge review.

Test plan

  • Dashboard builds clean (0 errors)
  • Eyeball FinOps tab — severity now orders High → Medium → Low

🤖 Generated with Claude Code

Severity column was sorting alphabetically (High, Low, Medium) instead
of by severity ranking. Added SeveritySort computed property on
FinOpsRecommendation, ordered results by it, and wired the DataGrid
column's SortMemberPath so click-sort matches the default order.

Mirrors the Lite fix in PR #874.
@erikdarlingdata erikdarlingdata merged commit 12d4e34 into dev Apr 21, 2026
3 checks passed
@erikdarlingdata erikdarlingdata deleted the fix/872-dashboard-finops-severity-order branch April 21, 2026 17:34
Copy link
Copy Markdown
Owner Author

Review summary

What it does: Ports the Lite fix from #874 to Dashboard. Adds SeveritySort computed property (High=1/Medium=2/Low=3/other=4) on FinOpsRecommendation, applies OrderBy(r => r.SeveritySort) to the returned list in DatabaseService.FinOps.cs:2473, and wires SortMemberPath="SeveritySort" on the Severity column in FinOpsContent.xaml:93.

What's good:

  • Targets dev
  • Lite-first ordering respected — this is the second-step port, not Lite-after-Dashboard.
  • Implementation is byte-for-byte equivalent to the Lite version (Lite/Services/LocalDataService.FinOps.cs:2179, 2581–2587, Lite/Controls/FinOpsTab.xaml:85), so the two UIs will now sort identically.
  • System.Linq already imported in DatabaseService.FinOps.cs:11, so OrderBy compiles.
  • Display strings untouched; only sort key changes — no user-visible surprise beyond the bug fix.

What needs attention:

  • Nothing blocking. A few minor notes:
    • Pre-existing naming divergence: the Lite model is RecommendationRow (LocalDataService.FinOps.cs:2572) while Dashboard's is FinOpsRecommendation (DatabaseService.FinOps.cs:2867). Not introduced here, but worth a future cleanup since the two are otherwise identical.
    • Test plan's "Eyeball FinOps tab" checkbox is unchecked. Worth a quick visual confirmation that header-click sort on Severity now goes High → Medium → Low before considering this fully verified.
    • No tests added — consistent with the Lite PR, but a trivial unit test on SeveritySort mapping would guard against future enum/string drift.

Checks not applicable: No PlanAnalyzer changes, no schema/install/upgrade scripts, no .github/workflows/build.yml edits, no .sql changes.


Generated by Claude Code

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