From 9cc20ea266fc48db8bdc30f6dcdedab8b8fdec73 Mon Sep 17 00:00:00 2001 From: Nick Beckley Date: Sun, 14 Jun 2026 19:56:33 +0100 Subject: [PATCH] Phase 12D: Continuity Explorer Scene Navigation Integration. --- PlotLine/Services/CoreServices.cs | 2 + PlotLine/ViewModels/CoreViewModels.cs | 2 + .../Views/ContinuityExplorer/Index.cshtml | 62 ++++++++++++++++--- 3 files changed, 59 insertions(+), 7 deletions(-) diff --git a/PlotLine/Services/CoreServices.cs b/PlotLine/Services/CoreServices.cs index 7ca8589..cc2a1b5 100644 --- a/PlotLine/Services/CoreServices.cs +++ b/PlotLine/Services/CoreServices.cs @@ -2638,6 +2638,7 @@ public sealed class StoryStateService( LocationID = latest.LocationID, CurrentLocation = latest.LocationPath ?? latest.LocationName ?? "Unknown", State = latest.SceneID == currentSceneId ? "Explicit" : "Inferred", + LastConfirmedSceneID = latest.SceneID, LastConfirmed = SceneLabel(latest.SceneNumber, latest.SceneTitle) }; }) @@ -2684,6 +2685,7 @@ public sealed class StoryStateService( LocationID = latest.LocationID, CurrentHolderOrLocation = latest.Label, State = latest.SceneID == currentSceneId ? "Explicit" : "Inferred", + LastConfirmedSceneID = latest.SceneID, LastConfirmed = scenesById.TryGetValue(latest.SceneID, out var scene) ? SceneLabel(scene.SceneNumber, scene.SceneTitle) : "Unknown" diff --git a/PlotLine/ViewModels/CoreViewModels.cs b/PlotLine/ViewModels/CoreViewModels.cs index acac4bb..7e7d3c1 100644 --- a/PlotLine/ViewModels/CoreViewModels.cs +++ b/PlotLine/ViewModels/CoreViewModels.cs @@ -251,6 +251,7 @@ public sealed class CharacterStoryStateViewModel public int? LocationID { get; set; } public string CurrentLocation { get; set; } = "Unknown"; public string State { get; set; } = "Unknown"; + public int? LastConfirmedSceneID { get; set; } public string LastConfirmed { get; set; } = "Never"; } @@ -261,6 +262,7 @@ public sealed class AssetStoryStateViewModel public int? LocationID { get; set; } public string CurrentHolderOrLocation { get; set; } = "Unknown"; public string State { get; set; } = "Unknown"; + public int? LastConfirmedSceneID { get; set; } public string LastConfirmed { get; set; } = "Never"; } diff --git a/PlotLine/Views/ContinuityExplorer/Index.cshtml b/PlotLine/Views/ContinuityExplorer/Index.cshtml index f88715d..59d82b7 100644 --- a/PlotLine/Views/ContinuityExplorer/Index.cshtml +++ b/PlotLine/Views/ContinuityExplorer/Index.cshtml @@ -181,7 +181,21 @@ @foreach (var row in Model.StoryState.Characters) { - @row.CharacterName@row.CurrentLocation@row.State@row.LastConfirmed + + @row.CharacterName + @row.CurrentLocation + @row.State + + @if (row.LastConfirmedSceneID.HasValue) + { + @row.LastConfirmed + } + else + { + @row.LastConfirmed + } + + } @@ -197,7 +211,21 @@ @foreach (var row in Model.StoryState.Assets) { - @row.AssetName@row.CurrentHolderOrLocation@row.State@row.LastConfirmed + + @row.AssetName + @row.CurrentHolderOrLocation + @row.State + + @if (row.LastConfirmedSceneID.HasValue) + { + @row.LastConfirmed + } + else + { + @row.LastConfirmed + } + + } @@ -271,7 +299,7 @@ else if (Model.Filter.DisplayMode == "Journey") { @row.ChapterDisplayName } - @row.SceneDisplayName + @row.SceneDisplayName @row.Location } @@ -311,7 +339,7 @@ else if (Model.Filter.DisplayMode == "Journey") { @row.ChapterDisplayName } - @row.SceneDisplayName + @row.SceneDisplayName @row.HolderOrLocation } @@ -363,7 +391,7 @@ else { @row.ChapterDisplayName } - @row.SceneDisplayName + @row.SceneDisplayName @if (!row.Characters.Any()) { @@ -379,7 +407,17 @@ else @character.StateType @if (!string.IsNullOrWhiteSpace(character.LastConfirmedSceneDisplayName)) { - Last confirmed: @character.LastConfirmedSceneDisplayName + + Last confirmed: + @if (character.LastConfirmedSceneID.HasValue) + { + @character.LastConfirmedSceneDisplayName + } + else + { + @character.LastConfirmedSceneDisplayName + } + } } @@ -405,7 +443,17 @@ else } @if (!string.IsNullOrWhiteSpace(asset.LastConfirmedSceneDisplayName)) { - Last confirmed: @asset.LastConfirmedSceneDisplayName + + Last confirmed: + @if (asset.LastConfirmedSceneID.HasValue) + { + @asset.LastConfirmedSceneDisplayName + } + else + { + @asset.LastConfirmedSceneDisplayName + } + } }