diff --git a/PlotLine.Tests/Browser/writer-phase2.cjs b/PlotLine.Tests/Browser/writer-phase2.cjs index 1cb16796..0e80f6f6 100644 --- a/PlotLine.Tests/Browser/writer-phase2.cjs +++ b/PlotLine.Tests/Browser/writer-phase2.cjs @@ -12,7 +12,7 @@ await p.goto(route('Explore'));await p.locator('[data-discovery-tiles] [data-til await p.goto(route('Review')+'&chapterId='+w.chapter);await p.locator('[data-review-intentions-slot] [data-review-intentions]').waitFor();assert(await p.locator('.reader-page').isVisible());const paragraph=p.locator('[data-paragraph-id][data-scene-id]').filter({hasText:'recorded first paragraph'}).first();await paragraph.click();await p.locator('[data-review-record]').click();await p.locator('[data-review-cancel]').click();await p.locator('[data-review-intentions-slot]').getByText('Disposable review scene',{exact:true}).waitFor();await shot('Review-context');await p.locator('#reader-focus').click();await p.locator('.reader-controls a[rel=next]').click();assert.equal(await p.locator('.manuscript-reader').getAttribute('data-focus'),'true');await p.locator('#reader-focus').click();await p.goto(route('Review')+'&reading=true&chapterId='+w.chapter);assert.equal(await p.locator('.manuscript-reader').getAttribute('data-reading'),'true');await shot('Reading-mode'); // An explicit session is a separate action, never a side effect of choosing focus. await p.goto(route('Write'));const token=await p.locator('input[name=__RequestVerificationToken]').first().inputValue();const session=require('crypto').randomUUID();assert.equal((await p.request.post(base+'/Writer/Work/Start',{form:{bookId:w.book,kind:'Planning',requestId:session,__RequestVerificationToken:token}})).status(),200);assert.equal((await p.request.post(base+'/Writer/Work/End',{form:{bookId:w.book,sessionId:session,note:'Considered the next writing step',__RequestVerificationToken:token}})).status(),200); -await p.goto(`${base}/Writer/ScheduleSetup?projectId=${w.project}&bookId=${w.book}`);await p.locator('[name=PlanName]').fill('Disposable Phase 2 writing plan');const today=new Date(),end=new Date(Date.now()+28*86400000);await p.locator('[name=StartDate]').fill(today.toISOString().slice(0,10));await p.locator('[name=DeadlineDate]').fill(end.toISOString().slice(0,10));for(const box of await p.locator('input[type=checkbox][name$=".IsAvailable"]').all())await box.check();await p.getByRole('button',{name:'Review activities',exact:true}).click();await p.waitForURL(/PlanActivities|SchedulePreview/);if(p.url().includes('PlanActivities')){await p.locator('[name=Confirm]').check();await p.getByRole('button',{name:'Commit reviewed schedule'}).click();await p.waitForURL(/SchedulePreview/);}const planId=new URL(p.url()).searchParams.get('writingPlanId');assert(planId);await p.goto(route('Plan'));assert((await p.locator('.writer3-main').textContent()).includes('Scheduled writing activities'));await p.goto(`${base}/Writer/EditWritingPlan?writingPlanId=${planId}`);assert(await p.locator('[name=PlanName]').isVisible());await p.goto(route('Reflect'));await p.locator('.writer-month-grid').waitFor();const month=await p.locator('.writer-section-heading h2').first().textContent();await p.getByRole('link',{name:'Previous month',exact:true}).click();assert(p.url().includes('/Writer/Reflect'));assert.notEqual(await p.locator('.writer-section-heading h2').first().textContent(),month);await p.locator('.writer-month-grid a').first().click();assert(p.url().includes('day='));await shot('Reflect-day'); +if(w.planId){await p.goto(`${base}/Writer/PlanActivities?writingPlanId=${w.planId}`);}else{await p.goto(`${base}/Writer/ScheduleSetup?projectId=${w.project}&bookId=${w.book}`);await p.locator('[name=PlanName]').fill('Disposable Phase 2 writing plan');const today=new Date(),end=new Date(Date.now()+28*86400000);await p.locator('[name=StartDate]').fill(today.toISOString().slice(0,10));await p.locator('[name=DeadlineDate]').fill(end.toISOString().slice(0,10));for(const box of await p.locator('input[type=checkbox][name$=".IsAvailable"]').all())await box.check();await p.getByRole('button',{name:'Review activities',exact:true}).click();await p.waitForURL(/PlanActivities|SchedulePreview/);}if(p.url().includes('PlanActivities')){await p.locator('input[type=checkbox][name=Confirm]').check();await p.getByRole('button',{name:'Commit reviewed schedule'}).click();await p.waitForURL(/SchedulePreview/);}const planId=new URL(p.url()).searchParams.get('writingPlanId');assert(planId);await p.goto(route('Plan'));assert((await p.locator('.writer3-main').textContent()).includes('Scheduled writing activities'));await p.goto(`${base}/Writer/EditWritingPlan?writingPlanId=${planId}`);assert(await p.locator('[name=PlanName]').isVisible());await p.goto(route('Reflect'));await p.locator('.writer-month-grid').waitFor();const month=await p.locator('.writer-section-heading h2').first().textContent();await p.getByRole('link',{name:'Previous month',exact:true}).click();assert(p.url().includes('/Writer/Reflect'));assert.notEqual(await p.locator('.writer-section-heading h2').first().textContent(),month);await p.locator('.writer-month-grid a').first().click();assert(p.url().includes('day='));await shot('Reflect-day'); for(const d of ['Write','Explore','Plan','Review','Reflect']){await p.goto(route(d));await p.waitForTimeout(150);await shot('Working-'+d);} for(const width of [1920,1366,800])for(const d of ['Write','Explore','Plan','Review','Reflect']){await p.setViewportSize({width,height:1000});await p.goto(route(d));await p.evaluate(()=>PlotLineHelpDrawer.open('writer3.layout'));await p.locator('.help-drawer-article').waitFor();assert(await p.evaluate(()=>document.documentElement.scrollWidth<=innerWidth+2),d+' '+width);await shot(d+'-'+width+'-panels');const collapse=p.locator('[data-ribbon-collapse]');await collapse.click();assert(await p.evaluate(()=>document.documentElement.scrollWidth<=innerWidth+2));if(await p.locator('[data-guidance-collapse]').isVisible())await p.locator('[data-guidance-collapse]').click();await p.locator('[data-help-collapse]').count().then(async n=>{if(n)await p.locator('[data-help-collapse]').click();});await shot(d+'-'+width+'-collapsed');} assert.deepEqual(errors,[]);console.log('PASS Phase 2 authenticated four fixtures, AJAX focus and no sessions, discovery preferences, canonical questionnaire, saved guidance, Review/Reading/Focus scene context, Reflect month/day, three widths and panel/ribbon states');await context.close();}finally{await browser.close();}})().catch(e=>{console.error(e.stack);process.exitCode=1}); diff --git a/PlotLine/Help/Articles/Workspace/Writer3-reviewing.md b/PlotLine/Help/Articles/Workspace/Writer3-reviewing.md index 3ee13713..26838128 100644 --- a/PlotLine/Help/Articles/Workspace/Writer3-reviewing.md +++ b/PlotLine/Help/Articles/Workspace/Writer3-reviewing.md @@ -40,3 +40,7 @@ Return to Word reuses the verified, acknowledged Companion handoff. Open paragra Expand Reading & Audio Review to use the existing recording and supported native playback controls. Record observations while preserving the actual session target, playback and return note. Audio time is not a paragraph anchor. Native pause-on-edit and media safeguards are unchanged. Your observations are distinct from recorded intentions and saved automated findings. Saved assessments & other tools opens existing Intent evidence, Context and the book's analysis/review tools. Opening Review starts no analysis. Assessments remain explicit actions with their original provenance and freshness. + +# Chapter intentions beside your reading + +Chapter intentions and reliable scene context can be collapsed independently of observations. At wide working widths they sit beside the canonical manuscript; at smaller widths they come before it. Scene context uses accepted paragraph assignments and falls back to the chapter where those assignments are uncertain. diff --git a/PlotLine/Views/Writer/_WriterFocusForm.cshtml b/PlotLine/Views/Writer/_WriterFocusForm.cshtml index 2fdc5e03..af315fb7 100644 --- a/PlotLine/Views/Writer/_WriterFocusForm.cshtml +++ b/PlotLine/Views/Writer/_WriterFocusForm.cshtml @@ -1,6 +1,6 @@ @model WriterDashboardViewModel @{var objective=Model.Objective;} -