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
@@ -1,4 +1,4 @@
@model IEnumerable<PowderCoating.Application.DTOs.Job.JobDailyPriorityDto>
@model IEnumerable<PowderCoating.Application.DTOs.Job.JobDailyPriorityDto>
@using PowderCoating.Application.DTOs.Job
@using PowderCoating.Core.Entities
@using PowderCoating.Core.Enums
@@ -51,7 +51,7 @@
</div>
</div>
@* ── Carried-Over (Overdue) Jobs ──────────────────────────────────────── *@
@* -- Carried-Over (Overdue) Jobs ---------------------------------------- *@
@if (overdueJobs.Any())
{
<div class="card border-danger mb-4">
@@ -59,7 +59,7 @@
<div class="d-flex align-items-center justify-content-between">
<div class="d-flex align-items-center gap-2">
<i class="bi bi-exclamation-triangle-fill me-2"></i>
<strong>Carried Over — Not Yet Completed</strong>
<strong>Carried Over &mdash; Not Yet Completed</strong>
<a tabindex="0" class="help-icon text-white opacity-75" role="button"
data-bs-toggle="popover" data-bs-placement="right" data-bs-trigger="focus"
data-bs-title="Carried Over Jobs"
@@ -238,7 +238,7 @@
<a tabindex="0" class="help-icon text-white opacity-75" role="button"
data-bs-toggle="popover" data-bs-placement="right" data-bs-trigger="focus"
data-bs-title="Reorder &amp; Quick Edit"
data-bs-content="Drag the ⠿ grip on the left of any row to change processing order — saved automatically. Click a Priority badge to change priority. Click the Worker cell to reassign. Click Scheduled Date or Due Date to update dates inline without navigating away.">
data-bs-content="Drag the â ¿ grip on the left of any row to change processing order &mdash; saved automatically. Click a Priority badge to change priority. Click the Worker cell to reassign. Click Scheduled Date or Due Date to update dates inline without navigating away.">
<i class="bi bi-question-circle"></i>
</a>
</div>
@@ -441,7 +441,7 @@
</div>
}
@* ── Scheduled Maintenance for the Day ──────────────────────────────── *@
@* -- Scheduled Maintenance for the Day -------------------------------- *@
<div class="mt-4">
<div class="card">
<div class="card-header bg-warning text-dark">
@@ -561,7 +561,7 @@
<tr onclick="window.location='@Url.Action("Details", "Maintenance", new { id = item.Id })'"
style="cursor: pointer;">
<td>
<strong>@(item.Equipment?.EquipmentName ?? "—")</strong>
<strong>@(item.Equipment?.EquipmentName ?? "&mdash;")</strong>
@if (!string.IsNullOrEmpty(item.Equipment?.Location))
{
<br /><small class="text-muted"><i class="bi bi-geo-alt me-1"></i>@item.Equipment.Location</small>
@@ -1110,14 +1110,14 @@
</script>
<script>
// SignalR — real-time status updates from shop display
// SignalR &mdash; real-time status updates from shop display
(function () {
const connection = new signalR.HubConnectionBuilder()
.withUrl('/hubs/shop')
.withAutomaticReconnect()
.build();
// A worker advanced a job status on the shop display — update badge in place
// A worker advanced a job status on the shop display &mdash; update badge in place
connection.on('JobStatusChanged', function (data) {
const badge = document.getElementById(`status-badge-${data.jobId}`);
if (badge) {
@@ -1126,7 +1126,7 @@
}
});
// Order/priority/worker changed by another Daily Board session — reload
// Order/priority/worker changed by another Daily Board session &mdash; reload
connection.on('DailyBoardUpdated', function () {
// Only reload if this tab didn't trigger it (we can't easily tell, so just reload)
location.reload();