Sweep all .cshtml files for encoding corruption; add pre-commit guard

Replace all corruption variants with HTML entities across 226 view files:
- 3-char UTF-8-as-Win1252 sequences (ae-corruption)
- Standalone smart/curly quotes that break C# Razor expressions
- Partially re-corrupted variants where the 3rd byte was normalised to ASCII

tools/Fix-Encoding.ps1: re-runnable sweep; uses [char] code points so the
script itself never contains a literal non-ASCII character; supports -DryRun

.githooks/pre-commit: blocks commits containing the ae-corruption byte
signature (xc3xa2xe2x82xac); git core.hooksPath = .githooks so the
hook is repo-committed and active for all future work on this machine.

Build clean; 225 unit tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 21:37:10 -04:00
parent 21b39161a3
commit a0bdd2b5b4
252 changed files with 1785 additions and 1633 deletions
@@ -40,7 +40,7 @@
</div>
<div>
<div class="fs-3 fw-bold">@Model.TotalCallsLast30Days.ToString("N0")</div>
<div class="text-muted small">AI Calls Last 30 Days</div>
<div class="text-muted small">AI Calls &mdash; Last 30 Days</div>
</div>
</div>
</div>
@@ -96,11 +96,11 @@
<!-- Tier Legend -->
<div class="d-flex flex-wrap gap-2 mb-3 align-items-center">
<span class="text-muted small fw-semibold me-1">Usage Tier (last 30 days):</span>
<span class="badge bg-secondary">Inactive 0 calls</span>
<span class="badge bg-success">Light — 110</span>
<span class="badge bg-primary">Regular — 1150</span>
<span class="badge bg-warning text-dark">Heavy — 51200</span>
<span class="badge bg-danger">Power User 200+</span>
<span class="badge bg-secondary">Inactive &mdash; 0 calls</span>
<span class="badge bg-success">Light &mdash; 1&ndash;10</span>
<span class="badge bg-primary">Regular &mdash; 11&ndash;50</span>
<span class="badge bg-warning text-dark">Heavy &mdash; 51&ndash;200</span>
<span class="badge bg-danger">Power User &mdash; 200+</span>
</div>
<!-- Main Table -->
@@ -207,16 +207,16 @@
</span>
</td>
<td class="text-center @(row.Today > 0 ? "fw-semibold" : "text-muted")">
@(row.Today > 0 ? row.Today.ToString("N0") : "")
@(row.Today > 0 ? row.Today.ToString("N0") : "&mdash;")
</td>
<td class="text-center @(row.Last7Days > 0 ? "fw-semibold" : "text-muted")">
@(row.Last7Days > 0 ? row.Last7Days.ToString("N0") : "")
@(row.Last7Days > 0 ? row.Last7Days.ToString("N0") : "&mdash;")
</td>
<td class="text-center @(row.Last30Days > 0 ? "fw-semibold" : "text-muted")">
@(row.Last30Days > 0 ? row.Last30Days.ToString("N0") : "")
@(row.Last30Days > 0 ? row.Last30Days.ToString("N0") : "&mdash;")
</td>
<td class="text-center @(row.AllTime > 0 ? "" : "text-muted")">
@(row.AllTime > 0 ? row.AllTime.ToString("N0") : "")
@(row.AllTime > 0 ? row.AllTime.ToString("N0") : "&mdash;")
</td>
<td class="text-center @(row.PhotoCount > 0 ? "" : "text-muted")">
@if (row.PhotoCount > 0)
@@ -225,7 +225,7 @@
}
else
{
<span></span>
<span>&mdash;</span>
}
</td>
<td>
@@ -244,7 +244,7 @@
}
else
{
<span class="text-muted"></span>
<span class="text-muted">&mdash;</span>
}
</td>
<td class="text-center">