Skip to content

Split AdviceContentBuilder.cs into partial classes#334

Merged
erikdarlingdata merged 37 commits into
devfrom
feature/split-advicecontentbuilder
May 13, 2026
Merged

Split AdviceContentBuilder.cs into partial classes#334
erikdarlingdata merged 37 commits into
devfrom
feature/split-advicecontentbuilder

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

Move-only refactor of PlanViewer.App/Services/AdviceContentBuilder.cs (1,227 lines) into 4 partial-class files.

File sizes

File Lines Contents
AdviceContentBuilder.cs (main) 444 Brushes/fonts, PhysicalOperators & SqlKeywords sets, regex constants, the 3 Build() overloads (entry points), IsSubSectionLabel helper
.NodeLinks.cs 243 MakeNodeRefsClickable, ProcessInlines, AddRunsWithNodeLinks, WireNodeClickHandler
.Operators.cs 251 CreateOperatorLine, CreateOperatorGroup, CreateOperatorTimingLine, CreateWarningBlock
.WaitStats.cs 242 CreateWaitStatLine, CreateMissingIndexImpactLine, ParseWaitMs, GetWaitCategoryBrush, CreateTriageSummaryCard
.Sql.cs 36 BuildSqlHighlightedLine

Behavior

  • Move-only. No method bodies were modified.
  • Class made internal static partial.

Test plan

  • dotnet build PlanViewer.sln — 0 errors
  • Open Human Advice on a plan — sections render with correct styling, wait bars, triage card, operator badges
  • Click a Node N reference in advice text — navigates the plan viewer to that node
  • Missing index suggestion line shows with bar
  • SQL statement highlighting in advice (keywords colored)

🤖 Generated with Claude Code

erikdarlingdata and others added 30 commits April 7, 2026 11:43
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Uses the Darling Data barbell logo as hero image when shared on
social media. Also adds meta description for SEO.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Open Graph meta tags for social sharing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merge dev: HTML export for plan analysis (#182)
This reason means something in the query blocks parallelism (scalar UDFs,
table variable inserts, etc.) — that's worth a Warning, not Info.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix Rule 3: CouldNotGenerateValidParallelPlan stays Warning
Adds human-readable messages for all 25 known reasons. Severity:
- Warning: actionable reasons (UDFs, cursors, table variables, remote
  queries, trace flags, hints, DML OUTPUT, writeback variables)
- Info: passive/environmental (cost below threshold, edition limits,
  memory-optimized tables, upgrade mode, index build edge cases)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Expand Rule 3 to cover all NonParallelPlanReason values
Merge dev: plan sharing and export (#182)
Merge dev to main (v1.4.3 + logo fix)
Merge dev: HTTPS plan sharing API
Release: issue #178 round 3 feedback (items 17-25)
Release v1.5.0 — maximum benefit scoring
Release: analytics for Plan Analyzer web app
Merge dev to main — Joe #215 feedback through b1/b7
Release v1.7.0 — wait stats as warnings
Release v1.7.1 — render benefit % and actionable fix
Release v1.7.2 — operator self-time fix + decimal benefit %
Release v1.7.3 — visible web viewer version
Release v1.7.4 — external-wait formula + CPU:Elapsed adjustment
erikdarlingdata and others added 7 commits April 22, 2026 13:21
Release v1.7.6 — C1 memory color + C4 compile time + C8 expensive-op + C9 columnstore
Release v1.7.7 — D3 content strip + legacy marker + drop Rule 21
Release v1.7.8 — batch-mode pipelined self-time (#215 D1)
Release v1.8.0 — Joe feedback E1-E12 batch
Move-only refactor; no behavior changes. AdviceContentBuilder.cs (1,227
lines) split into 4 partials:

  NodeLinks  (243) - MakeNodeRefsClickable + ProcessInlines +
                     AddRunsWithNodeLinks + WireNodeClickHandler
  Operators  (251) - CreateOperatorLine/Group/TimingLine +
                     CreateWarningBlock
  WaitStats  (242) - CreateWaitStatLine + CreateMissingIndexImpactLine +
                     ParseWaitMs + GetWaitCategoryBrush +
                     CreateTriageSummaryCard
  Sql        ( 36) - BuildSqlHighlightedLine

Main file now 444 lines — brushes/fonts, PhysicalOperators &
SqlKeywords sets, regex constants, the 3 Build() overloads (entry
points), IsSubSectionLabel helper.

Class made `internal static partial`.

Build clean: 0 errors on PlanViewer.App.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata changed the base branch from main to dev May 13, 2026 03:17
@erikdarlingdata erikdarlingdata merged commit 0a435d9 into dev May 13, 2026
3 of 4 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/split-advicecontentbuilder branch May 13, 2026 03:31
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