From 0a404d2b58f95dd9d4ffe2452fa9d1510218d3de Mon Sep 17 00:00:00 2001 From: Nick Beckley Date: Thu, 5 Nov 2026 11:17:19 +0000 Subject: [PATCH] fix: keep legacy builds registration-free and bound review headers --- PlotDirector.NativeCompanion/Vsto/AnalysisWindow.cs | 5 +++-- .../WindowsValidation/Build-Developer.ps1 | 3 ++- PlotDirector.NativeCompanion/WindowsValidation/README.md | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/PlotDirector.NativeCompanion/Vsto/AnalysisWindow.cs b/PlotDirector.NativeCompanion/Vsto/AnalysisWindow.cs index d1c1e05d..61c78308 100644 --- a/PlotDirector.NativeCompanion/Vsto/AnalysisWindow.cs +++ b/PlotDirector.NativeCompanion/Vsto/AnalysisWindow.cs @@ -26,6 +26,7 @@ namespace PlotDirector.WordAddIn public AnalysisWindow(Action analyse,Action stop,Action page,Action submit,Action 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());} + if(renderKey!=newKey){renderKey=newKey;details.Text="Select a result to inspect its source and reasoning.";Fill(local,current?.Items??Array.Empty());} if(tabs.SelectedIndex==1)RenderAi();else UpdatePages(); } private void Inspect(TreeNode node) diff --git a/PlotDirector.NativeCompanion/WindowsValidation/Build-Developer.ps1 b/PlotDirector.NativeCompanion/WindowsValidation/Build-Developer.ps1 index 74f78cb6..acc236ed 100644 --- a/PlotDirector.NativeCompanion/WindowsValidation/Build-Developer.ps1 +++ b/PlotDirector.NativeCompanion/WindowsValidation/Build-Developer.ps1 @@ -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 diff --git a/PlotDirector.NativeCompanion/WindowsValidation/README.md b/PlotDirector.NativeCompanion/WindowsValidation/README.md index 9c44c647..4e0e312e 100644 --- a/PlotDirector.NativeCompanion/WindowsValidation/README.md +++ b/PlotDirector.NativeCompanion/WindowsValidation/README.md @@ -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.