Skip to content

Commit 341678f

Browse files
Merge pull request #248 from erikdarlingdata/dev
Release v1.7.1 — render benefit % and actionable fix
2 parents ef7690c + 3d717e7 commit 341678f

7 files changed

Lines changed: 53 additions & 11 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,17 @@ jobs:
4646
gh release create "v${{ steps.version.outputs.VERSION }}" --title "v${{ steps.version.outputs.VERSION }}" --generate-notes --target main
4747
4848
- name: Setup .NET 8.0
49-
if: steps.check.outputs.EXISTS == 'false'
5049
uses: actions/setup-dotnet@v4
5150
with:
5251
dotnet-version: 8.0.x
5352

5453
- name: Build and test
55-
if: steps.check.outputs.EXISTS == 'false'
5654
run: |
5755
dotnet restore
5856
dotnet build -c Release
5957
dotnet test tests/PlanViewer.Core.Tests/PlanViewer.Core.Tests.csproj -c Release --no-build --verbosity normal
6058
6159
- name: Publish App (all platforms)
62-
if: steps.check.outputs.EXISTS == 'false'
6360
run: |
6461
dotnet publish src/PlanViewer.App/PlanViewer.App.csproj -c Release -r win-x64 --self-contained -o publish/win-x64
6562
dotnet publish src/PlanViewer.App/PlanViewer.App.csproj -c Release -r linux-x64 --self-contained -o publish/linux-x64
@@ -68,7 +65,6 @@ jobs:
6865
6966
# ── SignPath code signing (Windows only, skipped if secret not configured) ──
7067
- name: Check if signing is configured
71-
if: steps.check.outputs.EXISTS == 'false'
7268
id: signing
7369
shell: bash
7470
run: |
@@ -80,15 +76,15 @@ jobs:
8076
fi
8177
8278
- name: Upload Windows build for signing
83-
if: steps.check.outputs.EXISTS == 'false' && steps.signing.outputs.ENABLED == 'true'
79+
if: steps.signing.outputs.ENABLED == 'true'
8480
id: upload-unsigned
8581
uses: actions/upload-artifact@v4
8682
with:
8783
name: App-unsigned
8884
path: publish/win-x64/
8985

9086
- name: Sign Windows build
91-
if: steps.check.outputs.EXISTS == 'false' && steps.signing.outputs.ENABLED == 'true'
87+
if: steps.signing.outputs.ENABLED == 'true'
9288
uses: signpath/github-action-submit-signing-request@v1
9389
with:
9490
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
@@ -101,15 +97,14 @@ jobs:
10197
output-artifact-directory: 'signed/win-x64'
10298

10399
- name: Replace unsigned Windows build with signed
104-
if: steps.check.outputs.EXISTS == 'false' && steps.signing.outputs.ENABLED == 'true'
100+
if: steps.signing.outputs.ENABLED == 'true'
105101
shell: pwsh
106102
run: |
107103
Remove-Item -Recurse -Force publish/win-x64
108104
Copy-Item -Recurse signed/win-x64 publish/win-x64
109105
110106
# ── Velopack (uses signed Windows binaries) ───────────────────────
111107
- name: Create Velopack release (Windows)
112-
if: steps.check.outputs.EXISTS == 'false'
113108
shell: pwsh
114109
env:
115110
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -126,7 +121,6 @@ jobs:
126121
127122
# ── Package and upload ────────────────────────────────────────────
128123
- name: Package and upload
129-
if: steps.check.outputs.EXISTS == 'false'
130124
shell: pwsh
131125
env:
132126
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

src/PlanViewer.App/Controls/PlanViewerControl.axaml.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,6 +1754,18 @@ private void ShowPropertiesPanel(PlanNode node)
17541754
TextWrapping = TextWrapping.Wrap,
17551755
Margin = new Thickness(16, 0, 0, 0)
17561756
});
1757+
if (!string.IsNullOrEmpty(w.ActionableFix))
1758+
{
1759+
warnPanel.Children.Add(new TextBlock
1760+
{
1761+
Text = w.ActionableFix,
1762+
FontSize = 11,
1763+
FontStyle = FontStyle.Italic,
1764+
Foreground = TooltipFgBrush,
1765+
TextWrapping = TextWrapping.Wrap,
1766+
Margin = new Thickness(16, 2, 0, 0)
1767+
});
1768+
}
17571769
planWarningsPanel.Children.Add(warnPanel);
17581770
}
17591771

src/PlanViewer.App/PlanViewer.App.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<ApplicationManifest>app.manifest</ApplicationManifest>
77
<ApplicationIcon>EDD.ico</ApplicationIcon>
88
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
9-
<Version>1.7.0</Version>
9+
<Version>1.7.1</Version>
1010
<Authors>Erik Darling</Authors>
1111
<Company>Darling Data LLC</Company>
1212
<Product>Performance Studio</Product>

src/PlanViewer.Core/Output/HtmlExporter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ .card h3 {
187187
.warn-type { font-size: 0.75rem; font-weight: 600; }
188188
.warn-benefit { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); padding: 0.05rem 0.3rem; border-radius: 3px; background: rgba(0,0,0,0.04); }
189189
.warn-msg { font-size: 0.8rem; color: var(--text); flex-basis: 100%; }
190+
.warn-fix { font-size: 0.75rem; color: var(--text-secondary); font-style: italic; flex-basis: 100%; border-left: 2px solid var(--border); padding-left: 0.5rem; margin-top: 0.15rem; }
190191
191192
/* Query text */
192193
details { margin-bottom: 0.75rem; }
@@ -459,6 +460,8 @@ private static void WriteWarnings(StringBuilder sb, StatementResult stmt)
459460
if (w.MaxBenefitPercent.HasValue)
460461
sb.AppendLine($"<span class=\"warn-benefit\">up to {w.MaxBenefitPercent:N0}% benefit</span>");
461462
sb.AppendLine($"<span class=\"warn-msg\">{Encode(w.Message)}</span>");
463+
if (!string.IsNullOrEmpty(w.ActionableFix))
464+
sb.AppendLine($"<span class=\"warn-fix\">{Encode(w.ActionableFix)}</span>");
462465
sb.AppendLine("</div>");
463466
}
464467
sb.AppendLine("</div>");

src/PlanViewer.Core/Output/TextFormatter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ public static void WriteText(AnalysisResult result, TextWriter writer)
172172
? $" (up to {w.MaxBenefitPercent:N0}% benefit)"
173173
: "";
174174
writer.WriteLine($" [{w.Severity}] {w.Type}{benefitTag}: {EscapeNewlines(w.Message)}");
175+
if (!string.IsNullOrEmpty(w.ActionableFix))
176+
writer.WriteLine($" Fix: {EscapeNewlines(w.ActionableFix)}");
175177
}
176178
}
177179

src/PlanViewer.Web/Pages/Index.razor

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,10 @@ else
332332
@if (infoCount > 0) { <span class="warn-count-badge info">@infoCount</span> }
333333
</h4>
334334
<div class="warnings-list">
335-
@foreach (var w in GetAllWarnings(ActiveStmt!))
335+
@foreach (var w in GetAllWarnings(ActiveStmt!)
336+
.OrderByDescending(x => x.MaxBenefitPercent ?? -1)
337+
.ThenByDescending(x => x.Severity == "Critical" ? 3 : x.Severity == "Warning" ? 2 : 1)
338+
.ThenBy(x => x.Type))
336339
{
337340
<div class="warning @w.Severity.ToLower()">
338341
<span class="severity">@w.Severity</span>
@@ -341,7 +344,15 @@ else
341344
<span class="warning-op">@w.Operator</span>
342345
}
343346
<span class="warning-type">@w.Type</span>
347+
@if (w.MaxBenefitPercent.HasValue)
348+
{
349+
<span class="warn-benefit">up to @w.MaxBenefitPercent.Value.ToString("N0")% benefit</span>
350+
}
344351
<span class="warning-msg">@w.Message</span>
352+
@if (!string.IsNullOrEmpty(w.ActionableFix))
353+
{
354+
<span class="warning-fix">@w.ActionableFix</span>
355+
}
345356
</div>
346357
}
347358
</div>

src/PlanViewer.Web/wwwroot/css/app.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,26 @@ textarea::placeholder {
807807
font-size: 0.75rem;
808808
}
809809

810+
.warn-benefit {
811+
font-size: 0.7rem;
812+
font-weight: 600;
813+
color: var(--text-muted);
814+
padding: 0.05rem 0.35rem;
815+
border-radius: 3px;
816+
background: rgba(0, 0, 0, 0.05);
817+
margin-right: 0.4rem;
818+
}
819+
820+
.warning-fix {
821+
color: var(--text-secondary);
822+
display: block;
823+
margin-top: 0.25rem;
824+
font-size: 0.75rem;
825+
font-style: italic;
826+
border-left: 2px solid var(--border);
827+
padding-left: 0.5rem;
828+
}
829+
810830
/* === Query Text === */
811831
.stmt-text-section {
812832
margin-bottom: 0.75rem;

0 commit comments

Comments
 (0)