@model WarningDashboardViewModel @{ ViewData["DesktopLayout"] = "management"; ViewData["Title"] = "Continuity Warnings"; ViewData["ProjectSection"] = "Warnings"; } @functions { private static string SeverityBadgeClass(string severity) => severity switch { "Critical" or "Error" => "bg-danger", "Warning" => "bg-warning text-dark", _ => "bg-info text-dark" }; }

Continuity

@Model.Project.ProjectName

@if (Model.BookID.HasValue) {
}
@if (Model.LastValidationSummary is not null) {
Validation complete. @Model.LastValidationSummary.ErrorCount errors @Model.LastValidationSummary.WarningCount warnings @Model.LastValidationSummary.InfoCount info
}

By severity

@foreach (var count in Model.CountsBySeverity) {
@count.Key @count.Value
}

By type

@foreach (var count in Model.CountsByType.Take(8)) {
@count.Key @count.Value
}

Warnings

Grouped by warning type and known entity. Related evidence may have different causes. Detection dates do not prove that the latest prose was rechecked; investigate before deciding.

@if (!Model.ProjectWarnings.Any()) {

@(Model.HasAnyWarnings ? "No warnings match the current filters." : "No project warnings detected.")

} else {
@foreach (var group in Model.WarningGroups) { var groupId = $"warning-group-{group.Severity.ToLowerInvariant().Replace(" ", "-")}";

@foreach(var cluster in WarningTriage.Group(group.Warnings)){
@cluster.Title · @cluster.Active need attention · @cluster.Warnings.Count warnings · @cluster.Scenes affected scenes
@foreach (var warning in cluster.Warnings) { }
Severity Category Warning Type Message Scene Status Actions
@warning.Severity @warning.Category @warning.WarningTypeDisplayName
@warning.Message
Detected @warning.LastDetectedDate.ToString("u") @if (!string.IsNullOrWhiteSpace(warning.Details)) { @warning.Details } @if (!string.IsNullOrWhiteSpace(warning.PreviousKnowledgeState) && !string.IsNullOrWhiteSpace(warning.CurrentKnowledgeState)) { @warning.PreviousKnowledgeState → @warning.CurrentKnowledgeState } @if (warning.IsAcknowledged && !string.IsNullOrWhiteSpace(warning.AcknowledgementNotes)) { Note: @warning.AcknowledgementNotes }
@if (warning.PreviousSceneId.HasValue || warning.CurrentSceneId.HasValue) { @if (warning.PreviousSceneId.HasValue) { Previous @warning.PreviousContextSceneDisplayName } @if (warning.CurrentSceneId.HasValue) { Current @warning.CurrentContextSceneDisplayName } } else if (warning.SceneID.HasValue) { @warning.ContextSceneDisplayName } else { Project-wide } @if (warning.IsDismissed) { Dismissed } else if (warning.IsIntentional || warning.IsAcknowledged) { Acknowledged } else { Active }
@if (warning.CanInvestigate) { Investigate } @if (warning.Source == "Persisted" && warning.ContinuityWarningID.HasValue) { @if (warning.IsDismissed || warning.IsIntentional) {
} else {
} } else if (warning.IsAcknowledged) { Acknowledged
} else {
}
}
}
}
@section Scripts {}