fix: keep legacy builds registration-free and bound review headers

This commit is contained in:
Nick Beckley 2026-11-05 11:17:19 +00:00
parent cdc75a3666
commit 0a404d2b58
3 changed files with 7 additions and 3 deletions

View File

@ -26,6 +26,7 @@ namespace PlotDirector.WordAddIn
public AnalysisWindow(Action analyse,Action stop,Action<int> page,Action<StructureSuggestion[]> submit,Action<StructureSuggestion> navigate)
{
Text="PlotDirector — Manuscript review";Font=new Font("Segoe UI",9F);AutoScaleMode=AutoScaleMode.Dpi;MinimumSize=new Size(680,480);Width=980;Height=680;ShowInTaskbar=false;
status.MaximumSize=new Size(Math.Max(400,ClientSize.Width-40),0);
var layout=new TableLayoutPanel{Dock=DockStyle.Fill,ColumnCount=1,RowCount=6,Padding=new Padding(10)};
layout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent,100));
layout.RowStyles.Add(new RowStyle(SizeType.AutoSize));layout.RowStyles.Add(new RowStyle(SizeType.Absolute,8));layout.RowStyles.Add(new RowStyle(SizeType.AutoSize));
@ -43,7 +44,7 @@ namespace PlotDirector.WordAddIn
var footer=new FlowLayoutPanel{Dock=DockStyle.Fill,AutoSize=true};footer.Controls.AddRange(new Control[]{previous,next,pages});
previous.Click+=(_,__)=>{if(tabs.SelectedIndex==0)page(-1);else{aiOffset=Math.Max(0,aiOffset-40);RenderAi();}};
next.Click+=(_,__)=>{if(tabs.SelectedIndex==0)page(1);else{aiOffset+=40;RenderAi();}};
tabs.SelectedIndexChanged+=(_,__)=>{if(tabs.SelectedIndex==1)RenderAi();else UpdatePages();};
tabs.SelectedIndexChanged+=(_,__)=>{details.Text="Select a result to inspect its source and reasoning.";if(tabs.SelectedIndex==1)RenderAi();else UpdatePages();};
local.AfterSelect+=(_,e)=>Inspect(e.Node);ai.AfterSelect+=(_,e)=>Inspect(e.Node);
local.NodeMouseDoubleClick+=(_,e)=>{if(e.Node.Tag is StructureSuggestion item)navigate(item);};
ai.NodeMouseDoubleClick+=(_,e)=>{if(e.Node.Tag is StructureSuggestion item)navigate(item);};
@ -62,7 +63,7 @@ namespace PlotDirector.WordAddIn
var key=string.Join("|",available.Select(b=>b.BookId+":"+b.Title));
if(bookKey!=key){var selected=SelectedBook;bookKey=key;books.DataSource=available;books.SelectedIndex=-1;if(available.Any(b=>b.BookId==selected))books.SelectedValue=selected;}
var newKey=(review?.SnapshotId.ToString()??"")+":"+(current?.Offset??-1);
if(renderKey!=newKey){renderKey=newKey;Fill(local,current?.Items??Array.Empty<StructureSuggestion>());}
if(renderKey!=newKey){renderKey=newKey;details.Text="Select a result to inspect its source and reasoning.";Fill(local,current?.Items??Array.Empty<StructureSuggestion>());}
if(tabs.SelectedIndex==1)RenderAi();else UpdatePages();
}
private void Inspect(TreeNode node)

View File

@ -1,11 +1,12 @@
param([Parameter(Mandatory=$true)][string]$CertificateThumbprint)
$ErrorActionPreference='Stop'
Write-Output 'For the complete update/test/package workflow use Update-WordCompanion.ps1. This legacy build helper also omits Office registration.'
$root=Split-Path $PSScriptRoot -Parent
$vswhere=Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'
$msbuild=& $vswhere -latest -requires Microsoft.VisualStudio.Workload.Office -find 'MSBuild\**\Bin\amd64\MSBuild.exe' | Select-Object -First 1
if(!$msbuild){throw 'Visual Studio MSBuild with Office/VSTO development tools is required.'}
$project=Join-Path $root 'Vsto\PlotDirector.WordAddIn.csproj'
& $msbuild $project /restore /t:Build /p:Configuration=Debug /p:SignManifests=true "/p:ManifestCertificateThumbprint=$CertificateThumbprint"
& $msbuild $project /restore '/t:Build;VisualStudioForApplicationsBuild' /p:PrepareForRunDependsOn=CopyFilesToOutputDirectory /p:Configuration=Debug /p:SignManifests=true "/p:ManifestCertificateThumbprint=$CertificateThumbprint"
if($LASTEXITCODE -ne 0){throw 'VSTO build failed; do not register or install the add-in.'}
$agent=Join-Path $root 'Vsto\bin\Debug\Agent'
dotnet publish (Join-Path $root 'Agent\PlotDirector.Companion.Agent.csproj') -c Debug -r win-x64 --self-contained false -o $agent

View File

@ -1,3 +1,5 @@
For current Phase 3 development, use [Phase3-AI.md](Phase3-AI.md). It provides a same-user, command-line update/build and explicit reversible per-user install workflow. A VM/separate profile, IDE launch or IDE repair is not required. The earlier disposable-profile guidance below is historical qualification advice, not a prerequisite for the authorised Phase 3 developer update.
# Windows / real Word validation gate
**Not executed on the Linux implementation host.** Passing managed tests or generating these sources does not prove VSTO compilation/loading, COM behaviour, Windows pipe ACLs or Word responsiveness. Do not install for authors or distribute until this gate is reviewed and passed.