Group continuity evidence and clarify browser-first onboarding and installer availability
This commit is contained in:
parent
caeb90b350
commit
b8bb08948d
3
PlotLine.Tests/Browser/warning-triage.cjs
Normal file
3
PlotLine.Tests/Browser/warning-triage.cjs
Normal file
@ -0,0 +1,3 @@
|
||||
const {chromium}=require('playwright');const fs=require('node:fs');const path=require('node:path');const assert=require('node:assert/strict');
|
||||
(async()=>{const browser=await chromium.launch();try{const page=await browser.newPage();await page.goto('about:blank');await page.setContent('<input id="warning-evidence-search"><select id="warning-review-state"><option value="all">All</option><option value="active">Active</option><option value="decided">Decided</option></select><button id="warning-expand">Expand</button><button id="warning-collapse">Collapse</button><span id="warning-match-count"></span><details data-warning-cluster><summary>Travel</summary><table><tbody><tr data-warning-evidence data-decided="false"><td>Arrival evidence<form><input name="id" value="10"><button>Dismiss</button></form></td></tr><tr data-warning-evidence data-decided="true"><td>Departure acknowledged</td></tr></tbody></table></details><details data-warning-cluster><summary>Age</summary><table><tbody><tr data-warning-evidence data-decided="false"><td>Birthday conflict</td></tr></tbody></table></details>');
|
||||
await page.evaluate(()=>{window.submissions=0;document.addEventListener('submit',e=>{submissions++;e.preventDefault();});});await page.addScriptTag({content:fs.readFileSync(path.join(__dirname,'../../PlotLine/wwwroot/js/warning-triage.js'),'utf8')});assert.match(await page.locator('#warning-match-count').textContent(),/^3 /);await page.fill('#warning-evidence-search','arrival');assert.match(await page.locator('#warning-match-count').textContent(),/^1 /);assert.equal(await page.locator('[data-warning-cluster]:visible').count(),1);await page.fill('#warning-evidence-search','');await page.selectOption('#warning-review-state','decided');assert.match(await page.locator('#warning-match-count').textContent(),/^1 /);await page.selectOption('#warning-review-state','active');assert.match(await page.locator('#warning-match-count').textContent(),/^2 /);await page.click('#warning-expand');assert.equal(await page.locator('details[open]').count(),2);await page.click('#warning-collapse');assert.equal(await page.locator('details[open]').count(),0);assert.equal(await page.locator('form input').inputValue(),'10');assert.equal(await page.evaluate(()=>submissions),0);console.log('PASS warning triage search, state, expansion and unchanged author-action forms');}finally{await browser.close();}})().catch(e=>{console.error(e);process.exit(1)});
|
||||
@ -122,6 +122,7 @@ if (args.Contains("--plot-lines"))
|
||||
return;
|
||||
}
|
||||
|
||||
if(args.Contains("--release-sprint")){ReleaseSprintTests.Run();Console.WriteLine("PASS continuity triage and public onboarding/installer guidance");return;}
|
||||
if(args.Contains("--native-import")){await NativeImportTests.Run();Console.WriteLine("PASS approved native import preview, source preservation, ownership, version and retry");return;}
|
||||
if(args.Contains("--native-tray")){await NativeTrayIntegrationTests.Run();Console.WriteLine("PASS native tray presence, expiry, scope and persistent PWA review decisions");return;}
|
||||
if(args.Contains("--native-workflow")){await NativeWorkflowTests.Run();Console.WriteLine("PASS native saved workspace and safe import preview validation");return;}
|
||||
@ -130,6 +131,8 @@ if(args.Contains("--native-companion")){await NativeCompanionTests.Run();Console
|
||||
|
||||
var tests = new (string Name, Action Test)[]
|
||||
{
|
||||
("Release triage and browser-only onboarding preserve author decisions", ReleaseSprintTests.Run),
|
||||
("Approved native import source and confirmation remain safe", () => NativeImportTests.Run().GetAwaiter().GetResult()),
|
||||
("Native tray presence and PWA review remain scoped, expiring and non-destructive", () => NativeTrayIntegrationTests.Run().GetAwaiter().GetResult()),
|
||||
("Native saved workspace and established import eligibility remain scoped and read-only", () => NativeWorkflowTests.Run().GetAwaiter().GetResult()),
|
||||
("Native companion authentication, canonical AI mapping and isolated chapter retry", () => NativeCompanionTests.Run().GetAwaiter().GetResult()),
|
||||
|
||||
14
PlotLine.Tests/ReleaseSprintTests.cs
Normal file
14
PlotLine.Tests/ReleaseSprintTests.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using PlotLine.Services;
|
||||
using PlotLine.ViewModels;
|
||||
internal static class ReleaseSprintTests
|
||||
{
|
||||
public static void Run()
|
||||
{
|
||||
void Check(bool value,string text){if(!value)throw new Exception(text);}
|
||||
var warnings=new[]{new ProjectWarningViewModel{ContinuityWarningID=1,WarningType="Travel",WarningTypeDisplayName="Travel",Severity="Warning",CharacterID=10,CharacterName="A",SceneID=1},new ProjectWarningViewModel{ContinuityWarningID=2,WarningType="Travel",WarningTypeDisplayName="Travel",Severity="Warning",CharacterID=10,CharacterName="A",SceneID=2,IsAcknowledged=true},new ProjectWarningViewModel{ContinuityWarningID=3,WarningType="Travel",Severity="Warning",CharacterID=20},new ProjectWarningViewModel{ContinuityWarningID=4,WarningType="Age",Severity="Warning",CharacterID=10}};
|
||||
var groups=WarningTriage.Group(warnings);Check(groups.Count==3&&groups.Sum(g=>g.Warnings.Count)==4,"Triage groups related rule/entity evidence without dropping warnings");var travel=groups.Single(g=>g.Warnings.Count==2);Check(travel.Active==1&&travel.Scenes==2&&warnings[1].IsAcknowledged,"Triage preserves decisions and separates active from acknowledged evidence");
|
||||
var environment=NativeWorkflowTests.Proxy<IWebHostEnvironment>((name,args)=>name=="get_ContentRootPath"?Path.GetFullPath("PlotLine"):name=="get_EnvironmentName"?"Development":null);
|
||||
var help=new HelpService(environment);var first=help.GetByContextKey("gettingStarted.firstBook");var install=help.GetByContextKey("wordCompanion.install");Check(first?.Url=="/help/getting-started/first-book"&&install?.Url=="/help/word-companion/install","New author/Companion guidance resolves through actual help routing");Check(install!.MarkdownContent.Contains("not yet offered")&&!install.MarkdownContent.Contains("C:\\Users"),"Download guidance does not expose an internal installer path or pretend public qualification");
|
||||
}
|
||||
}
|
||||
35
PlotLine/Help/Articles/GettingStarted/First-Book.md
Normal file
35
PlotLine/Help/Articles/GettingStarted/First-Book.md
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
title: Your First Book in PlotDirector
|
||||
slug: first-book
|
||||
category: Getting Started
|
||||
tags: new author, first book, onboarding, browser, planning
|
||||
contextKey: gettingStarted.firstBook
|
||||
micro: Start with one book and one useful scene; Word is optional.
|
||||
quickTitle: Your first book
|
||||
quickSummary: Create a project and book, add a scene, and use Context, Intent and Plot Lines as your story grows.
|
||||
screenshot:
|
||||
---
|
||||
|
||||
# Start with one book
|
||||
|
||||
Create your account, then create a project for your story or series and a book inside it. You can plan and manage your story entirely in the browser or installed PlotDirector app. Microsoft Word and the Companion are optional.
|
||||
|
||||
[Open your projects](/Projects)
|
||||
|
||||
# Add the next scene you want to write
|
||||
|
||||
Add a chapter and scene from the book workspace. Give the scene a useful title, a short summary, its purpose and any known characters, location or story date. Leave unknown details unset rather than guessing. Start small; advanced tools remain available when you need them.
|
||||
|
||||
# Give each screen a job
|
||||
|
||||
**Context** brings together saved scene information, participants, relationships and places. **Intent** shows your scene purpose, chapter goals and saved objectives. Both can be explored manually without Word. With a supported Companion and reliable scene mapping, choose a live manuscript session and enable Follow. Manual exploration pauses following; Return to current Word scene resumes it.
|
||||
|
||||
**Plot Lines** shows how narrative threads develop and meet. A scene can belong to more than one line. Use intersections and the health evidence to investigate quiet or unresolved threads; these observations do not change your author decisions.
|
||||
|
||||
The **Problem Solver** helps when a writing problem needs a clearer diagnosis. Open it from PlotDirector's navigation; you do not need a manuscript import or Word connection to use it.
|
||||
|
||||
# Bring an existing manuscript
|
||||
|
||||
Keep your original manuscript. Use the established manuscript import, or the supported Word Companion analysis/review workflow. Review chapter and scene choices before confirming an import. AI suggestions are proposals, not author-approved story facts. Conflicting existing content must be reconciled explicitly.
|
||||
|
||||
[Word Companion setup and availability](/help/word-companion/install)
|
||||
33
PlotLine/Help/Articles/WordCompanion/Install.md
Normal file
33
PlotLine/Help/Articles/WordCompanion/Install.md
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
title: Word Companion Setup and Availability
|
||||
slug: install
|
||||
category: Word Companion
|
||||
tags: companion, Word, Windows, install, download, browser
|
||||
contextKey: wordCompanion.install
|
||||
micro: Choose browser-only use or the supported Windows desktop Word integration.
|
||||
quickTitle: Word Companion setup
|
||||
quickSummary: The Companion is optional. Its verified Windows developer installer is distinct from a publicly qualified download.
|
||||
screenshot:
|
||||
---
|
||||
|
||||
# Choose how you write
|
||||
|
||||
**Browser or PWA:** use PlotDirector's projects, books, scenes, Context, Intent, Plot Lines and Problem Solver without installing anything in Word.
|
||||
|
||||
**Windows desktop Word:** the Companion connects Word's manuscript access to a Windows tray control centre. PlotDirector performs chapter AI analysis and the browser provides review and story workspaces. Word's ribbon stays small: local connection status and Open Companion.
|
||||
|
||||
# Installer availability
|
||||
|
||||
A complete per-user Windows installer has been tested in Development. A publicly qualified, production-signed download is not yet offered on this page. Do not use an internal developer path, a loose Word manifest or an unverified download as a public installer. You can continue using PlotDirector in your browser meanwhile.
|
||||
|
||||
When an approved release is published, use its verified download and close Word normally before installation. Missing prerequisites should produce a clear message, not require changing Visual Studio or disabling Office security.
|
||||
|
||||
# Connect and review
|
||||
|
||||
Open Companion, sign in through your normal PlotDirector browser session and select the authorised book. Remembering a book association is optional and requires permission to modify document metadata; it never saves or rewrites manuscript prose.
|
||||
|
||||
Use Heading 1 for chapter headings. Detect Chapters reads locally. Select chapters and confirm before sending prose for AI analysis. When approving a connection in your browser, you may enable encrypted import capture for chapters you explicitly submit. This option defaults off and does not upload anything automatically. Older suggestions without source need a newly consented submission; unchanged analysis can be reused.
|
||||
|
||||
Review scene titles, summaries and decisions in PlotDirector. Preview an approved import before confirming it. Existing content is not silently replaced. If Word or the Companion disconnects, the browser still works and saved reviews remain available.
|
||||
|
||||
[Get started without Word](/help/getting-started/first-book)
|
||||
14
PlotLine/ViewModels/WarningTriage.cs
Normal file
14
PlotLine/ViewModels/WarningTriage.cs
Normal file
@ -0,0 +1,14 @@
|
||||
namespace PlotLine.ViewModels;
|
||||
public sealed record WarningCluster(string Title,IReadOnlyList<ProjectWarningViewModel> Warnings)
|
||||
{
|
||||
public int Active=>Warnings.Count(w=>!w.IsDismissed&&!w.IsIntentional&&!w.IsAcknowledged);
|
||||
public int Scenes=>Warnings.Select(w=>w.CurrentSceneId??w.SceneID).Where(id=>id.HasValue).Distinct().Count();
|
||||
}
|
||||
public static class WarningTriage
|
||||
{
|
||||
// Grouping is navigational evidence, never a claim that warnings share one cause.
|
||||
public static IReadOnlyList<WarningCluster> Group(IEnumerable<ProjectWarningViewModel> warnings)=>warnings
|
||||
.GroupBy(w=>$"{w.Severity}|{(string.IsNullOrWhiteSpace(w.WarningType)?w.WarningTypeDisplayName:w.WarningType)}|{w.EntityType}|{w.CharacterID}|{w.AssetID}|{(w.CharacterID.HasValue||w.AssetID.HasValue?null:w.SceneID)}",StringComparer.OrdinalIgnoreCase)
|
||||
.Select(g=>new WarningCluster(g.First().WarningTypeDisplayName+" · "+(!string.IsNullOrWhiteSpace(g.First().CharacterName)?g.First().CharacterName:!string.IsNullOrWhiteSpace(g.First().EntityType)?g.First().EntityType:"Story evidence"),g.OrderByDescending(w=>w.LastDetectedDate).ToArray()))
|
||||
.OrderByDescending(g=>g.Active).ThenByDescending(g=>g.Warnings.Count).ThenBy(g=>g.Title).ToArray();
|
||||
}
|
||||
@ -15,6 +15,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="plain-card mb-3 d-flex flex-wrap gap-3" aria-label="Start here"><a href="/help/getting-started/first-book">Your first book · Word is optional</a><a href="/help/word-companion/install">Word Companion setup and availability</a></nav>
|
||||
|
||||
<section data-pwa-context="Find" class="plain-card mb-4">
|
||||
<form method="get" asp-action="Index" class="row g-2 align-items-end">
|
||||
<div class="col-md-9">
|
||||
|
||||
@ -223,7 +223,7 @@
|
||||
<p class="marketing-eyebrow">The next chapter is yours</p>
|
||||
<h2>You've got a book to finish.</h2>
|
||||
<p>Let's give it a little room.</p><a class="marketing-btn marketing-btn--primary" asp-controller="Account" asp-action="Register">Start writing free <span aria-hidden="true">↗</span></a>
|
||||
<p class="cta-note">30 days free · No card needed</p>
|
||||
<p class="cta-note">30 days free · No card needed</p><p class="cta-note"><a href="/help/getting-started/first-book">Start with your first book</a> · <a href="/help/word-companion/install">Word Companion is optional</a></p>
|
||||
</div>
|
||||
</section>
|
||||
</article>
|
||||
|
||||
@ -138,6 +138,8 @@
|
||||
|
||||
<section class="list-section">
|
||||
<h2>Warnings <help-icon key="warnings.list" /></h2>
|
||||
<div class="warning-triage-toolbar d-flex flex-wrap gap-2 mb-3"><label>Search evidence <input id="warning-evidence-search" class="form-control form-control-sm" type="search" /></label><label>Review state <select id="warning-review-state" class="form-select form-select-sm"><option value="all">All loaded warnings</option><option value="active">Needs attention</option><option value="decided">Dismissed / acknowledged</option></select></label><button type="button" id="warning-expand" class="btn btn-sm btn-outline-secondary">Expand related warnings</button><button type="button" id="warning-collapse" class="btn btn-sm btn-outline-secondary">Collapse</button><span id="warning-match-count" role="status"></span></div>
|
||||
<p class="muted">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.</p>
|
||||
@if (!Model.ProjectWarnings.Any())
|
||||
{
|
||||
<p class="muted">@(Model.HasAnyWarnings ? "No warnings match the current filters." : "No project warnings detected.")</p>
|
||||
@ -156,6 +158,8 @@
|
||||
</h3>
|
||||
<div id="@groupId" class="accordion-collapse collapse @(group.IsExpanded ? "show" : "")" aria-labelledby="@($"{groupId}-heading")">
|
||||
<div class="accordion-body p-0">
|
||||
@foreach(var cluster in WarningTriage.Group(group.Warnings)){
|
||||
<details class="warning-cluster p-2 border-bottom" data-warning-cluster><summary><strong>@cluster.Title</strong> · @cluster.Active need attention · @cluster.Warnings.Count warnings · @cluster.Scenes affected scenes</summary>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm align-middle mb-0">
|
||||
<thead>
|
||||
@ -170,14 +174,14 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var warning in group.Warnings)
|
||||
@foreach (var warning in cluster.Warnings)
|
||||
{
|
||||
<tr data-pd-context="warning">
|
||||
<tr data-pd-context="warning" data-warning-evidence data-decided="@((warning.IsDismissed||warning.IsIntentional||warning.IsAcknowledged).ToString().ToLowerInvariant())">
|
||||
<td><span class="badge @SeverityBadgeClass(warning.Severity)">@warning.Severity</span></td>
|
||||
<td>@warning.Category</td>
|
||||
<td>@warning.WarningTypeDisplayName</td>
|
||||
<td>
|
||||
<div>@warning.Message</div>
|
||||
<div>@warning.Message</div><small class="text-muted">Detected @warning.LastDetectedDate.ToString("u")</small>
|
||||
@if (!string.IsNullOrWhiteSpace(warning.Details))
|
||||
{
|
||||
<small class="text-muted d-block">@warning.Details</small>
|
||||
@ -322,7 +326,8 @@
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div></details>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -330,3 +335,5 @@
|
||||
</div>
|
||||
}
|
||||
</section>
|
||||
|
||||
@section Scripts {<script src="~/js/warning-triage.js" asp-append-version="true"></script>}
|
||||
|
||||
5
PlotLine/wwwroot/js/warning-triage.js
Normal file
5
PlotLine/wwwroot/js/warning-triage.js
Normal file
@ -0,0 +1,5 @@
|
||||
(()=>{
|
||||
const search=document.querySelector('#warning-evidence-search'),state=document.querySelector('#warning-review-state'),groups=[...document.querySelectorAll('[data-warning-cluster]')];if(!search||!state)return;
|
||||
const update=()=>{const query=search.value.trim().toLocaleLowerCase();let total=0;for(const group of groups){let matches=0;for(const row of group.querySelectorAll('[data-warning-evidence]')){const decided=row.dataset.decided==='true';row.hidden=!!query&&!row.textContent.toLocaleLowerCase().includes(query)||state.value==='active'&&decided||state.value==='decided'&&!decided;if(!row.hidden)matches++;}group.hidden=!matches;if(query&&matches)group.open=true;total+=matches;}document.querySelector('#warning-match-count').textContent=total+' matching warnings in loaded results';};
|
||||
search.addEventListener('input',update);state.addEventListener('change',update);document.querySelector('#warning-expand')?.addEventListener('click',()=>groups.filter(g=>!g.hidden).forEach(g=>g.open=true));document.querySelector('#warning-collapse')?.addEventListener('click',()=>groups.forEach(g=>g.open=false));update();
|
||||
})();
|
||||
Loading…
x
Reference in New Issue
Block a user