diff --git a/Docs/WordCompanion/2026-11-08-import-progress-navigation.md b/Docs/WordCompanion/2026-11-08-import-progress-navigation.md new file mode 100644 index 00000000..c2e6a38a --- /dev/null +++ b/Docs/WordCompanion/2026-11-08-import-progress-navigation.md @@ -0,0 +1,43 @@ +# Existing import progress and resume regression — 8 November 2026 + +## Today's actual import (read-only investigation) + +Project **8174**, book **10152**, **The Alpha Flame**. All times below are London/GMT. + +The Development access log records: + +- 18:10:15 — start import; writing software/project selected; book saved at 18:11:00. +- **18:39:06 — Word capture POST returned HTTP 403**, followed immediately by the existing client's request-cleanup DELETE, which returned 200. +- 18:49:25 and 18:56:10 — the normal `POST /onboarding/start-import` action was used again. The old implementation cleared scan state and software selection instead of resuming. +- 18:56:13–14 — Back actions left the saved wizard at **Welcome**. + +Before any changes/deployment, the database had **zero accepted captures, zero manuscript builds and no Story Intelligence jobs/runs**. Book 10152 has not completed import or scene detection. The prior transfer **failed**, rather than continuing in the background. Its intermediate reading/chapter-discovery progress is not recoverable from an accepted server snapshot. The source Word document was not changed by this investigation. No scan, import or analysis was restarted, cancelled, reset or duplicated by Atlas. + +The precise 403 validation reason was not logged. The existing native capture request has a fixed 20-minute lifetime; elapsed time from book selection to submission was approximately 28 minutes, making expiry a plausible cause, not a proven diagnosis. User/project/document/session/grant checks can also reject submission. This navigation correction does not weaken those checks, claim to recover the rejected payload or silently retry it. + +## Why the bar disappeared + +The strip with the right-hand **Book** button still existed in `_Layout.cshtml`, `StoryIntelligenceGlobalProgressService` and `story-intelligence-global-progress.js`. Its discovery/visibility logic queried only active Story Intelligence run summaries. Word scanning and core chapter/scene review do not create those run records, so the strip was hidden during that earlier phase. Recent migrations **242/243 did not remove it**; today's onboarding completion timestamp was null. The former long-running analysis strip and the early Word capture stage were different states in the existing flow. + +A second confirmed navigation defect made the failure look like nothing had started: the Projects/ribbon **Import a manuscript** action called `StartManuscriptImportSetupAsync`, which unconditionally cleared the existing scan and reset setup. Access history confirms that reset action was invoked after the failed submission. + +## Correction — existing components only + +- The existing global progress model/service now also projects the current authorised unfinished wizard, scan and build state. No new session store, import engine, hub, database table or parallel progress strip. +- The same strip and button area show Word reading, chapter review, scene detection, location/character review, failure or saved setup as appropriate. Both the strip text and action link navigate to the existing matching wizard route/preview. Pending setup is not labelled as running analysis. +- Core capture completion alone does not remove the strip: it remains through mandatory review, and disappears when persistent core completion is recorded. Optional Story Intelligence continues to use its existing counts, events and **Book** action independently. +- Existing in-memory scene-build progress has a read-only getter and is hydrated on wizard reload. The existing scene-detection button stays disabled while that build is running; re-entry does not launch another build. +- While core work exists, the existing authoritative SignalR watcher refreshes its snapshot every 15 seconds on a visible page and on return/reconnect. No extra connection or scanning request is created. +- The normal Import action resumes an unfinished selected-book setup without clearing capture/session/preferences. Explicit creation of a new setup after completed onboarding remains available through the existing flow. + +## Returning to today's book + +`https://dev.plotdirector.com/onboarding` opens the existing saved setup. **For this attempt it is Welcome**, not the lost scan progress screen. There is no accepted capture to link to chapter review. The change prevents another navigation reset and restores visibility/resume for future in-flight stages; it does not manufacture missing progress or automatically restart the failed transfer. Project/book selection is retained. + +## Verification + +Focused managed regressions use the real existing scan store and durable-capture interface: navigation/refresh retain the same ScanID; Import never invokes Clear; accepted capture reload restores its exact review preview; running scene detection and required location/character review remain discoverable; genuine core completion removes core progress; optional analysis retains the original Book link; revoked permission hides stale book information. + +Browser regression exercises the actual shared progress script with its existing SignalR watcher, recreated-page restore, correct links and core-to-optional transition, and asserts that no Start/Scan/Build request is invoked by progress navigation. Existing native import connectivity tests are retained. + +Deployment evidence is appended after rollout. The failed transfer was already cleaned up before this task; service replacement is permitted only after checking that no new import or running job has started. diff --git a/PlotLine.Tests/Browser/import-progress-navigation.cjs b/PlotLine.Tests/Browser/import-progress-navigation.cjs new file mode 100644 index 00000000..0c07f60b --- /dev/null +++ b/PlotLine.Tests/Browser/import-progress-navigation.cjs @@ -0,0 +1,9 @@ +const {chromium}=require('playwright'),fs=require('node:fs'),path=require('node:path'),assert=require('node:assert/strict'); +(async()=>{const browser=await chromium.launch();try{const page=await browser.newPage();const core={BookID:10,BookTitle:'Fixture',Stage:'Scanning Word',Message:'Reading paragraphs',PercentComplete:42,ResumeUrl:'/onboarding'}; +async function boot(seed){await page.goto('about:blank');await page.setContent(``);await page.evaluate(seed=>{const strip=document.querySelector('[data-story-intelligence-global-strip]');strip.dataset.coreImport=JSON.stringify(seed);window.snapshot={coreImport:seed,books:[]};window.calls=[];window.handlers={};window.signalR={HubConnectionBuilder:class{withUrl(){return this;}withAutomaticReconnect(){return this;}build(){return{state:'Connected',on(n,f){handlers[n]=f;},onreconnected(){},onclose(){},start:async()=>{},invoke:async n=>{calls.push(n);return snapshot;}}}}};},seed);await page.addScriptTag({content:fs.readFileSync(path.join(__dirname,'../../PlotLine/wwwroot/js/story-intelligence-global-progress.js'),'utf8')});await page.waitForFunction(()=>calls.includes('WatchGlobalStoryIntelligenceProgress'));} +await boot(core);const strip=page.locator('[data-story-intelligence-global-strip]'),link=page.locator('[data-story-intelligence-global-action]');await page.waitForTimeout(50);assert.equal(await strip.isVisible(),true);assert.match(await strip.innerText(),/Scanning Word/);assert.equal(await link.getAttribute('href'),'/onboarding');assert.equal(await link.innerText(),'Return to import');assert.match(await page.locator('[data-story-intelligence-global-bar]').getAttribute('style'),/42%/); +await boot(core);assert.equal(await strip.isVisible(),true);assert.equal(await link.getAttribute('href'),'/onboarding'); +await page.evaluate(()=>handlers.StoryIntelligenceGlobalProgressChanged({coreImport:{bookTitle:'Fixture',stage:'Review chapters',message:'Capture saved',resumeUrl:'/onboarding/scan-review?previewId=123'},books:[]}));assert.match(await link.getAttribute('href'),/scan-review\?previewId=123/);assert.match(await strip.innerText(),/Review chapters/); +await page.evaluate(()=>handlers.StoryIntelligenceGlobalProgressChanged({coreImport:null,books:[]}));assert.equal(await strip.isVisible(),false); +await page.evaluate(()=>handlers.StoryIntelligenceGlobalProgressChanged({coreImport:null,books:[{bookID:10,projectID:9,bookTitle:'Fixture',status:'Pending',pendingRunCount:1,hasActiveRuns:true,totalExpectedScenes:4,completedScenes:0,updatedUtc:new Date().toISOString()}],hasActiveWork:true,activeBookCount:1,status:'Running',totalExpectedScenes:4,completedScenes:0}));assert.equal(await strip.isVisible(),true);assert.equal(await link.getAttribute('href'),'/Books/Details/10');assert.equal(await link.innerText(),'Book'); +assert.equal(await page.evaluate(()=>calls.some(n=>/Start|Scan|Build/.test(n))),false);console.log('PASS existing global strip: Word scan visibility, recreated-page restore, exact review navigation, core completion hiding, independent optional AI Book link, and watch-only requests');}finally{await browser.close();}})().catch(e=>{console.error(e);process.exit(1);}); diff --git a/PlotLine.Tests/ImportProgressNavigationTests.cs b/PlotLine.Tests/ImportProgressNavigationTests.cs new file mode 100644 index 00000000..35c337a7 --- /dev/null +++ b/PlotLine.Tests/ImportProgressNavigationTests.cs @@ -0,0 +1,56 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging.Abstractions; +using PlotLine.Data; +using PlotLine.Models; +using PlotLine.Services; +internal static class ImportProgressNavigationTests +{ + private sealed class Capture : IManuscriptCaptureRepository + { + public ManuscriptScanPreview? Saved;public int Clears; + public Task Save(ManuscriptScanPreview p){Saved=p;return Task.CompletedTask;} + public Task Get(int user,Guid? preview=null,int? onboarding=null)=>Task.FromResult(Saved?.UserID==user&&(!preview.HasValue||Saved.PreviewID==preview)&&(!onboarding.HasValue||Saved.OnboardingID==onboarding)?Saved:null); + public Task Clear(int user,int onboarding){Clears++;throw new Exception("Navigation must not clear a capture");} + public Task CompleteBuild(int user,Guid preview)=>Task.CompletedTask; + public Task GetAnalysis(int user,Guid preview,string hash)=>Task.FromResult(null); + public Task SaveAnalysis(int user,Guid preview,string hash,string result)=>Task.CompletedTask; + } + public static async Task Run() + { + var state=new UserOnboardingState{UserID=7,UserOnboardingStateID=8,ProjectID=9,BookID=10,WritingJourney=WritingJourneyValues.ManuscriptMostlyComplete,WritingSoftware=WritingSoftwareValues.MicrosoftWord,CurrentStep=OnboardingSteps.NextPathPreview}; + var calls=new List();var onboarding=NativeWorkflowTests.Proxy((n,a)=>{calls.Add(n);return n=="GetAsync"?Task.FromResult(state):throw new Exception("Unexpected onboarding mutation: "+n);}); + var user=NativeWorkflowTests.Proxy((n,a)=>n=="get_UserId"?(int?)7:throw new Exception(n)); + bool optional=false,locationsDone=false,owner=true; + var runs=NativeWorkflowTests.Proxy((n,a)=>n switch{ + "ListActiveBookRunSummariesForUserAsync"=>(object)Task.FromResult>(optional?[new(){UserID=7,ProjectID=9,BookID=10,BookTitle="Fixture",PendingRunCount=1,Status="Pending"}]:[]), + "ListRunsByBookForUserAsync"=>Task.FromResult>([]),_=>throw new Exception(n)}); + var books=NativeWorkflowTests.Proxy((n,a)=>Task.FromResult(new(){BookID=10,ProjectID=9,BookTitle="Fixture"})); + var projects=NativeWorkflowTests.Proxy((n,a)=>Task.FromResult(owner?new(){ProjectID=9,AccessRole="Owner"}:null)); + OnboardingManuscriptBuildResult? built=null; + var builds=NativeWorkflowTests.Proxy((n,a)=>Task.FromResult(built)); + var locations=NativeWorkflowTests.Proxy((n,a)=>Task.FromResult(locationsDone)); + var capture=new Capture();using var provider=new ServiceCollection().AddSingleton(capture).BuildServiceProvider(); + ManuscriptScanPreviewStore Store()=>new(provider.GetRequiredService(),NullLogger.Instance); + var scans=Store();StoryIntelligenceGlobalProgressService Progress()=>new(user,runs,onboarding,scans,builds,books,locations,projects); + var started=await scans.StartAsync(7,8,9,10);await scans.ProgressAsync(7,new(){OnboardingID=8,Message="Reading paragraphs",PercentComplete=42}); + var first=await Progress().GetForCurrentUserAsync();var second=await Progress().GetForCurrentUserAsync(); + Check(first.HasActiveWork&&first.CoreImport?.Stage=="Scanning Word"&&second.CoreImport?.PercentComplete==42&&(await scans.GetStateAsync(7,8)).ScanID==started.ScanID,"navigation away and refresh keep the same running Word scan and expose it through existing global progress"); + var ctor=typeof(OnboardingService).GetConstructors().Single();var deps=new Dictionary{{typeof(IOnboardingRepository),onboarding},{typeof(ICurrentUserService),user},{typeof(IManuscriptScanPreviewStore),scans}}; + var service=(OnboardingService)ctor.Invoke(ctor.GetParameters().Select(p=>deps.GetValueOrDefault(p.ParameterType)).ToArray()); + await service.StartManuscriptImportSetupAsync();Check(calls.All(c=>c=="GetAsync")&&capture.Clears==0&&(await scans.GetStateAsync(7,8)).ScanID==started.ScanID,"existing Import action resumes unfinished book without resetting preferences, scan ID or capture"); + var preview=new ManuscriptScanPreview{UserID=7,OnboardingID=8,ProjectID=9,BookID=10,Source="NativeWordCompanion",ChapterCount=2};await scans.CompleteAsync(7,preview); + Check((await Progress().GetForCurrentUserAsync()).CoreImport?.ResumeUrl=="/onboarding/scan-review?previewId="+preview.PreviewID.ToString("D"),"capture completion keeps global indicator visible and returns to exact chapter-review preview"); + scans=Store();Check((await Progress().GetForCurrentUserAsync()).CoreImport?.Stage=="Review chapters","reopening restores accepted capture navigation from existing durable repository"); + var review=await scans.GetReviewAsync(7,preview.PreviewID);await scans.SaveReviewAsync(7,new(){PreviewID=preview.PreviewID,Status=ManuscriptScanReviewStatuses.ReadyToImport}); + await scans.BuildProgressAsync(7,preview.PreviewID,"Detecting chapter scenes",38); + Check((await Progress().GetForCurrentUserAsync()).CoreImport is {Stage:"Detecting scenes",PercentComplete:38},"existing in-flight scene detection progress survives page navigation without starting another build"); + await scans.BuildProgressAsync(7,preview.PreviewID,"Built",100,new(){BookID=10});built=new(){BookID=10,ProjectID=9}; + Check((await Progress().GetForCurrentUserAsync()).CoreImport?.ResumeUrl.Contains("scan-locations")==true,"core import returns to required location review after structure build");locationsDone=true; + Check((await Progress().GetForCurrentUserAsync()).CoreImport?.ResumeUrl.Contains("scan-characters")==true,"core import remains visible until character review and durable completion"); + state.OnboardingCompletedUtc=DateTime.UtcNow; + Check(!(await Progress().GetForCurrentUserAsync()).HasActiveWork,"genuine core completion removes core indicator independently of optional analysis");optional=true; + var ai=await Progress().GetForCurrentUserAsync();Check(ai.HasActiveWork&&ai.CoreImport==null&&ai.Books.Count==1,"optional Story Intelligence retains existing global strip and book navigation after core completion"); + state.OnboardingCompletedUtc=null;owner=false;Check((await Progress().GetForCurrentUserAsync()).CoreImport==null,"revoked project permission does not expose a stale core import"); + } + private static void Check(bool ok,string name){if(!ok)throw new Exception(name);Console.WriteLine("PASS "+name);} +} diff --git a/PlotLine.Tests/Program.cs b/PlotLine.Tests/Program.cs index 6fdb72ee..dd55ac1a 100644 --- a/PlotLine.Tests/Program.cs +++ b/PlotLine.Tests/Program.cs @@ -129,6 +129,7 @@ if(args.Contains("--native-installation")){await NativeInstallationTests.Run();C if(args.Contains("--paragraph-view")){await ParagraphViewTests.Run();return;} if(args.Contains("--paragraph-live-ai")){await ParagraphLiveAiTests.Run();return;} if(args.Contains("--paragraph-backups")){ParagraphBackupTests.Run();return;} +if(args.Contains("--import-progress-navigation")){await ImportProgressNavigationTests.Run();return;} if(args.Contains("--core-import-completion")){await CoreImportCompletionTests.Run();return;} if(args.Contains("--paragraph-chapter-dev")){await ParagraphChapterQualificationTests.Run(args.Contains("--repair"));return;} if(args.Contains("--paragraph-chapters")){ParagraphChapterTests.Run();return;} diff --git a/PlotLine/Services/ManuscriptScanPreviewStore.cs b/PlotLine/Services/ManuscriptScanPreviewStore.cs index d09bf687..dc8565a5 100644 --- a/PlotLine/Services/ManuscriptScanPreviewStore.cs +++ b/PlotLine/Services/ManuscriptScanPreviewStore.cs @@ -21,6 +21,7 @@ public interface IManuscriptScanPreviewStore Task SaveReviewAsync(int userId, ManuscriptScanReviewDecision review); Task SaveCharacterCandidatesAsync(int userId, Guid previewId, IReadOnlyList candidates); Task BuildProgressAsync(int userId, Guid previewId, string message, int percentComplete, OnboardingManuscriptBuildResult? result = null); + Task GetBuildProgressAsync(int userId, Guid previewId) => Task.FromResult(null); Task GetBuildResultAsync(int userId, Guid previewId); Task SaveBuildResultAsync(int userId, OnboardingManuscriptBuildResult result); } @@ -349,6 +350,10 @@ public sealed class ManuscriptScanPreviewStore( return Task.FromResult(progress); } + public Task GetBuildProgressAsync(int userId, Guid previewId) + => Task.FromResult(previews.TryGetValue(previewId, out var preview) && preview.UserID == userId + && buildProgress.TryGetValue(previewId, out var progress) ? progress : null); + public Task GetBuildResultAsync(int userId, Guid previewId) => Task.FromResult(previews.TryGetValue(previewId, out var preview) && preview.UserID == userId diff --git a/PlotLine/Services/OnboardingService.cs b/PlotLine/Services/OnboardingService.cs index f9bd1c9f..f414f884 100644 --- a/PlotLine/Services/OnboardingService.cs +++ b/PlotLine/Services/OnboardingService.cs @@ -105,6 +105,7 @@ public sealed class OnboardingService( SelectedBookTitle = selectedBook is null ? null : BookOptionTitle(selectedBook), CompanionPresence = ToPresenceViewModel(presence), ScanState = ToScanStateViewModel(scanState), + BuildProgress = scanState.PreviewID is Guid activePreview ? await scanPreviews.GetBuildProgressAsync(RequireUserId(),activePreview) : null, ProjectOptions = projectOptions, BookOptions = bookOptions, ProjectForm = new ProjectOnboardingForm @@ -1765,6 +1766,10 @@ public sealed class OnboardingService( public async Task StartManuscriptImportSetupAsync() { var userId = RequireUserId(); + var existing = await onboarding.GetAsync(userId); + // The normal Import action resumes unfinished work; it must not clear a scan on navigation. + if (existing is { OnboardingCompletedUtc: null, BookID: not null, ProjectID: not null } + && existing.WritingJourney == WritingJourneyValues.ManuscriptMostlyComplete) return; var state = await onboarding.SaveWritingJourneyAsync(userId, WritingJourneyValues.ManuscriptMostlyComplete); state = await onboarding.ClearWritingSoftwareAsync(userId); await scanPreviews.ClearAsync(userId, state.UserOnboardingStateID); diff --git a/PlotLine/Services/StoryIntelligenceGlobalProgressService.cs b/PlotLine/Services/StoryIntelligenceGlobalProgressService.cs index e2d40605..f22f442a 100644 --- a/PlotLine/Services/StoryIntelligenceGlobalProgressService.cs +++ b/PlotLine/Services/StoryIntelligenceGlobalProgressService.cs @@ -12,7 +12,8 @@ public interface IStoryIntelligenceGlobalProgressService public sealed class StoryIntelligenceGlobalProgressService( ICurrentUserService currentUser, - IStoryIntelligenceResultRepository runs) : IStoryIntelligenceGlobalProgressService + IStoryIntelligenceResultRepository runs, IOnboardingRepository? onboarding=null, IManuscriptScanPreviewStore? scans=null, + IOnboardingBuildRepository? builds=null, IBookRepository? bookRepository=null, ICoreImportBasicLocationService? locations=null, IProjectRepository? projects=null) : IStoryIntelligenceGlobalProgressService { public async Task GetForCurrentUserAsync() { @@ -79,7 +80,34 @@ public sealed class StoryIntelligenceGlobalProgressService( return new StoryIntelligenceGlobalProgressViewModel { - Books = books + Books = books, CoreImport = await CoreImport(userId) }; } + private async Task CoreImport(int user) + { + if(onboarding==null||scans==null||bookRepository==null)return null; + var state=await onboarding.GetAsync(user); + if(state==null||state.OnboardingCompletedUtc.HasValue||state.WritingJourney!=WritingJourneyValues.ManuscriptMostlyComplete||state.BookID is not int book)return null; + if(projects!=null&&state.ProjectID is int project&&(await projects.GetForUserAsync(project,user))?.IsOwner!=true)return null; + var title=await bookRepository.GetAsync(book); + if(title==null||title.ProjectID!=state.ProjectID)return null; + var scan=await scans.GetStateAsync(user,state.UserOnboardingStateID); + if(scan.PreviewID is Guid scoped && (await scans.GetPreviewAsync(user,scoped))?.BookID!=book)return null; + CoreImportGlobalProgress Item(string stage,string message,int? percent=null,string url="/onboarding")=>new(book,title.BookDisplayTitle,stage,message,percent,url); + if(scan.Status==ManuscriptScanStatuses.Running)return Item("Scanning Word",scan.Message??"Reading your manuscript from Word",scan.PercentComplete); + if(scan.Status==ManuscriptScanStatuses.Failed)return Item("Scan needs attention",scan.Message??"Return to the existing import to review the problem"); + if(scan.PreviewID is not Guid preview)return Item("Continue manuscript setup",state.CurrentStep==OnboardingSteps.WritingSoftware?"Choose your writing software to continue the saved setup":"Return to your saved manuscript setup"); + var progress=await scans.GetBuildProgressAsync(user,preview); + if(progress?.Status=="Running")return Item("Detecting scenes",progress.Message,progress.PercentComplete); + if(progress?.Status=="Failed")return Item("Scene detection needs attention",progress.Message); + var build=builds==null?null:await builds.GetByPreviewAsync(user,preview); + if(build!=null&&build.BookID==book){ + var done=locations!=null&&await locations.IsCompleteAsync(user,preview); + return Item(done?"Review characters":"Review locations","Finish the remaining core import review",url:$"/onboarding/{(done?"scan-characters":"scan-locations")}?previewId={preview:D}"); + } + return scan.ReviewStatus==ManuscriptScanReviewStatuses.ReadyToImport + ?Item("Ready to detect scenes","Continue scene detection using the accepted manuscript") + :Item("Review chapters","Your Word capture is saved; review the detected chapters",url:$"/onboarding/scan-review?previewId={preview:D}"); + } + } diff --git a/PlotLine/ViewModels/OnboardingViewModels.cs b/PlotLine/ViewModels/OnboardingViewModels.cs index 98f45fb0..3889ceab 100644 --- a/PlotLine/ViewModels/OnboardingViewModels.cs +++ b/PlotLine/ViewModels/OnboardingViewModels.cs @@ -18,6 +18,7 @@ public sealed class OnboardingWizardViewModel public bool IsMicrosoftWordPath => string.Equals(WritingSoftware, WritingSoftwareValues.MicrosoftWord, StringComparison.Ordinal); public CompanionPresenceViewModel CompanionPresence { get; set; } = new(); public ManuscriptScanStateViewModel ScanState { get; set; } = new(); + public OnboardingBuildProgress? BuildProgress { get; set; } public IReadOnlyList Options { get; set; } = []; public IReadOnlyList ProjectOptions { get; set; } = []; public IReadOnlyList BookOptions { get; set; } = []; diff --git a/PlotLine/ViewModels/StoryIntelligenceGlobalProgressViewModels.cs b/PlotLine/ViewModels/StoryIntelligenceGlobalProgressViewModels.cs index 54758605..db7cf69e 100644 --- a/PlotLine/ViewModels/StoryIntelligenceGlobalProgressViewModels.cs +++ b/PlotLine/ViewModels/StoryIntelligenceGlobalProgressViewModels.cs @@ -5,7 +5,8 @@ namespace PlotLine.ViewModels; public sealed class StoryIntelligenceGlobalProgressViewModel { public IReadOnlyList Books { get; init; } = []; - public bool HasActiveWork => Books.Any(book => book.HasActiveRuns); + public CoreImportGlobalProgress? CoreImport { get; init; } + public bool HasActiveWork => CoreImport is not null || Books.Any(book => book.HasActiveRuns); public int ActiveBookCount => Books.Count(book => book.HasActiveRuns); public int ActiveRunCount => Books.Sum(book => book.PendingRunCount + book.RunningRunCount); public int TotalExpectedScenes => Books.Sum(book => book.TotalExpectedScenes); @@ -106,3 +107,6 @@ public sealed class StoryIntelligenceGlobalProgressRunViewModel or StoryIntelligenceRunStatuses.Failed or StoryIntelligenceRunStatuses.Cancelled; } + +// Projection of the existing wizard/capture/build state, not another import session. +public sealed record CoreImportGlobalProgress(int BookID, string BookTitle, string Stage, string Message, int? PercentComplete, string ResumeUrl); diff --git a/PlotLine/Views/Onboarding/Index.cshtml b/PlotLine/Views/Onboarding/Index.cshtml index de55b04b..943808e1 100644 --- a/PlotLine/Views/Onboarding/Index.cshtml +++ b/PlotLine/Views/Onboarding/Index.cshtml @@ -5,6 +5,7 @@ ViewData["Title"] = "Set up PlotDirector"; var currentJourneyOrder = CurrentJourneyOrder(Model); var structureReadyToImport = string.Equals(Model.ScanState.ReviewStatus, ManuscriptScanReviewStatuses.ReadyToImport, StringComparison.Ordinal); + var buildRunning = Model.BuildProgress?.Status == "Running"; var reviewedScanAvailable = Model.ScanState.IsComplete || structureReadyToImport; } @@ -297,14 +298,14 @@

@(ViewData["NativeCapture"] is true ? "Once your manuscript has been received, scene detection runs on PlotDirector’s server. You may close Word. Native Companion imports do not write scene markers to Word." : "Keep Word open while PlotDirector detects scenes and writes the scene markers.")

-