-
Notifications
You must be signed in to change notification settings - Fork 30
Render benefit % and actionable fix in all warning surfaces (v1.7.1) #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -187,6 +187,7 @@ .card h3 { | |
| .warn-type { font-size: 0.75rem; font-weight: 600; } | ||
| .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); } | ||
| .warn-msg { font-size: 0.8rem; color: var(--text); flex-basis: 100%; } | ||
| .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; } | ||
|
|
||
| /* Query text */ | ||
| details { margin-bottom: 0.75rem; } | ||
|
|
@@ -459,6 +460,8 @@ private static void WriteWarnings(StringBuilder sb, StatementResult stmt) | |
| if (w.MaxBenefitPercent.HasValue) | ||
| sb.AppendLine($"<span class=\"warn-benefit\">up to {w.MaxBenefitPercent:N0}% benefit</span>"); | ||
| sb.AppendLine($"<span class=\"warn-msg\">{Encode(w.Message)}</span>"); | ||
| if (!string.IsNullOrEmpty(w.ActionableFix)) | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No test coverage added for the new Generated by Claude Code |
||
| sb.AppendLine($"<span class=\"warn-fix\">{Encode(w.ActionableFix)}</span>"); | ||
| sb.AppendLine("</div>"); | ||
| } | ||
| sb.AppendLine("</div>"); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -172,6 +172,8 @@ public static void WriteText(AnalysisResult result, TextWriter writer) | |
| ? $" (up to {w.MaxBenefitPercent:N0}% benefit)" | ||
| : ""; | ||
| writer.WriteLine($" [{w.Severity}] {w.Type}{benefitTag}: {EscapeNewlines(w.Message)}"); | ||
| if (!string.IsNullOrEmpty(w.ActionableFix)) | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No Generated by Claude Code |
||
| writer.WriteLine($" Fix: {EscapeNewlines(w.ActionableFix)}"); | ||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -332,7 +332,10 @@ else | |
| @if (infoCount > 0) { <span class="warn-count-badge info">@infoCount</span> } | ||
| </h4> | ||
| <div class="warnings-list"> | ||
| @foreach (var w in GetAllWarnings(ActiveStmt!)) | ||
| @foreach (var w in GetAllWarnings(ActiveStmt!) | ||
| .OrderByDescending(x => x.MaxBenefitPercent ?? -1) | ||
| .ThenByDescending(x => x.Severity == "Critical" ? 3 : x.Severity == "Warning" ? 2 : 1) | ||
| .ThenBy(x => x.Type)) | ||
| { | ||
| <div class="warning @w.Severity.ToLower()"> | ||
| <span class="severity">@w.Severity</span> | ||
|
|
@@ -341,7 +344,15 @@ else | |
| <span class="warning-op">@w.Operator</span> | ||
| } | ||
| <span class="warning-type">@w.Type</span> | ||
| @if (w.MaxBenefitPercent.HasValue) | ||
| { | ||
| <span class="warn-benefit">up to @w.MaxBenefitPercent.Value.ToString("N0")% benefit</span> | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Class-name nit: the neighboring spans in this strip are Generated by Claude Code |
||
| } | ||
| <span class="warning-msg">@w.Message</span> | ||
| @if (!string.IsNullOrEmpty(w.ActionableFix)) | ||
| { | ||
| <span class="warning-fix">@w.ActionableFix</span> | ||
| } | ||
| </div> | ||
| } | ||
| </div> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -807,6 +807,26 @@ textarea::placeholder { | |
| font-size: 0.75rem; | ||
| } | ||
|
|
||
| .warn-benefit { | ||
| font-size: 0.7rem; | ||
| font-weight: 600; | ||
| color: var(--text-muted); | ||
| padding: 0.05rem 0.35rem; | ||
| border-radius: 3px; | ||
| background: rgba(0, 0, 0, 0.05); | ||
| margin-right: 0.4rem; | ||
| } | ||
|
|
||
| .warning-fix { | ||
| color: var(--text-secondary); | ||
| display: block; | ||
| margin-top: 0.25rem; | ||
| font-size: 0.75rem; | ||
| font-style: italic; | ||
| border-left: 2px solid var(--border); | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Generated by Claude Code |
||
| padding-left: 0.5rem; | ||
| } | ||
|
|
||
| /* === Query Text === */ | ||
| .stmt-text-section { | ||
| margin-bottom: 0.75rem; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed
TooltipFgBrush = #E4E6EB(line 90) — fine on the dark properties-panel surface, well out of the rejected#6B7280/#808080dim range. Left margin (16) matches the message block above, indent reads correctly. No concerns here — leaving this so the inline record matches the summary.Generated by Claude Code