From d62e825a1735342baabc0754e8767ce79e8c30ba Mon Sep 17 00:00:00 2001 From: Nick Beckley Date: Tue, 25 Aug 2026 09:00:10 +0000 Subject: [PATCH] Correct premature Story Intelligence safe-close wording --- PlotLine.Tests/Program.cs | 13 +++++++++++++ .../Onboarding/StoryIntelligenceProgress.cshtml | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/PlotLine.Tests/Program.cs b/PlotLine.Tests/Program.cs index 775a6e6..0a7dd5e 100644 --- a/PlotLine.Tests/Program.cs +++ b/PlotLine.Tests/Program.cs @@ -61,6 +61,7 @@ var tests = new (string Name, Action Test)[] ("Story Intelligence evidence extraction prevents observed attribute leakage", StoryIntelligenceEvidenceExtractionPreventsObservedAttributeLeakage), ("Illustration assignment repair enforces explicit evidence groups and strict subtypes", IllustrationAssignmentRepairEnforcesExplicitEvidenceGroupsAndStrictSubtypes), ("Lean import removes replay links while retaining progress", LeanImportRemovesReplayLinksWhileRetainingProgress), + ("Story Intelligence progress does not prematurely report safe close", StoryIntelligenceProgressDoesNotPrematurelyReportSafeClose), ("Phase 21T repairs durable character understanding", Phase21TRepairsDurableCharacterUnderstanding), ("Phase 21U extracts mandatory character appearance fixtures", Phase21UExtractsMandatoryCharacterAppearanceFixtures), ("Character sex hints are conservative and reviewable", CharacterSexHintsAreConservativeAndReviewable), @@ -1318,6 +1319,18 @@ static void LeanImportRemovesReplayLinksWhileRetainingProgress() Assert(program.Contains("app.MapHub", StringComparison.Ordinal), "Lean import should retain the shared Story Intelligence progress hub."); } +static void StoryIntelligenceProgressDoesNotPrematurelyReportSafeClose() +{ + var root = Path.Combine(AppContext.BaseDirectory, "../../../../PlotLine"); + var progressView = File.ReadAllText(Path.Combine(root, "Views/Onboarding/StoryIntelligenceProgress.cshtml")); + + Assert(!progressView.Contains("You can close Word", StringComparison.OrdinalIgnoreCase), "Progress page must not say Word can close before scene markers are synchronised."); + Assert(!progressView.Contains("close this browser tab", StringComparison.OrdinalIgnoreCase), "Progress page must not give a blanket browser safe-close instruction before Word sync acknowledgement exists."); + Assert(!progressView.Contains("safely leave this page", StringComparison.OrdinalIgnoreCase), "Progress page must not infer safe-close from queued/background analysis alone."); + Assert(progressView.Contains("Keep Word and the Companion open", StringComparison.Ordinal), "Progress page should tell the user Word/Companion are still needed for scene marker safety."); + Assert(progressView.Contains("Do not close Word yet", StringComparison.Ordinal), "Progress page should explicitly block premature Word closure."); +} + static void StoryIntelligenceDoesNotRetryExhaustedBillingQuota() { var client = File.ReadAllText(Path.Combine(AppContext.BaseDirectory, "../../../../PlotLine/Services/StoryIntelligenceOpenAIInfrastructure.cs")); diff --git a/PlotLine/Views/Onboarding/StoryIntelligenceProgress.cshtml b/PlotLine/Views/Onboarding/StoryIntelligenceProgress.cshtml index 4210595..f529522 100644 --- a/PlotLine/Views/Onboarding/StoryIntelligenceProgress.cshtml +++ b/PlotLine/Views/Onboarding/StoryIntelligenceProgress.cshtml @@ -17,7 +17,7 @@

Analyse manuscript

Reading your manuscript

-

PlotDirector is analysing your chapters and preparing scenes for review. You can safely leave this page and return later.

+

PlotDirector is analysing your chapters and preparing scenes for review. Keep Word and the Companion open until PlotDirector has finished creating the scene structure you need.

@if (TempData["OnboardingStoryIntelligenceError"] is string error) @@ -30,7 +30,7 @@ }
- PlotDirector will keep analysing your manuscript. You can close Word, close this browser tab, and return later. We’ll show this import on your Projects page while it is running. + PlotDirector will keep analysing your manuscript on the server. Do not close Word yet if you need this manuscript to receive PlotDirector scene markers for the writing workspace.