Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
test(window): provision native desktop geometry on hosted runners
Linuxdazhao92b56a56e63a
diff --git a/.github/workflows/windows-native-snap.yml b/.github/workflows/windows-native-snap.ymlindex 1b59e1bd3..d8b3cab2a 100644--- a/.github/workflows/windows-native-snap.yml+++ b/.github/workflows/windows-native-snap.yml@@ -60,6 +60,46 @@ jobs:run: |cargo build -p host-core --locked 2>&1 | Tee-Object "$env:RUNNER_TEMP/native-snap-evidence/build.log"if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }+ - name: Configure the ephemeral desktop for native minimum sizes+ shell: pwsh+ run: |+ Add-Type @'+ using System;+ using System.Runtime.InteropServices;+ public static class SnapDisplay {+ [StructLayout(LayoutKind.Sequential,CharSet=CharSet.Unicode)]+ public struct Mode {+ [MarshalAs(UnmanagedType.ByValTStr,SizeConst=32)] public string device;+ public ushort spec,driver,size,extra; public uint fields;+ public int x,y; public uint orientation,fixedOutput;+ public short color,duplex,yResolution,tt,collate;+ [MarshalAs(UnmanagedType.ByValTStr,SizeConst=32)] public string form;+ public ushort logPixels;+ public uint bpp,width,height,flags,frequency,icmMethod,icmIntent,media,dither,reserved1,reserved2,panningWidth,panningHeight;+ }+ [DllImport("user32.dll",CharSet=CharSet.Unicode)] static extern bool EnumDisplaySettings(string device,int index,ref Mode mode);+ [DllImport("user32.dll",CharSet=CharSet.Unicode)] static extern int ChangeDisplaySettings(ref Mode mode,uint flags);+ static Mode Current() {+ var mode=new Mode();mode.size=(ushort)Marshal.SizeOf(typeof(Mode));+ if(!EnumDisplaySettings(null,-1,ref mode))throw new Exception("Cannot read the CI desktop mode");+ return mode;+ }+ public static string Configure() {+ var before=Current();var mode=before;+ if(mode.width<1920 || mode.height<1080 || mode.bpp!=32) {+ mode.width=1920;mode.height=1080;mode.bpp=32;mode.fields=0x1C0000;+ int tested=ChangeDisplaySettings(ref mode,2);+ if(tested!=0)throw new Exception("CI desktop rejects 1920x1080x32: "+tested);+ int changed=ChangeDisplaySettings(ref mode,0);+ if(changed!=0)throw new Exception("CI desktop mode change failed: "+changed);+ }+ var after=Current();+ if(after.width<1920 || after.height<1080 || after.bpp!=32)throw new Exception("CI desktop did not reach the required mode");+ return "before="+before.width+"x"+before.height+"x"+before.bpp+" after="+after.width+"x"+after.height+"x"+after.bpp;+ }+ }+ '@+ [SnapDisplay]::Configure() | Tee-Object "$env:RUNNER_TEMP/native-snap-evidence/display.log"- name: Run interactive native acceptanceshell: pwshrun: |diff --git a/docs/project/windows-native-snap-replay.md b/docs/project/windows-native-snap-replay.mdindex 13b2008af..1518235f6 100644--- a/docs/project/windows-native-snap-replay.md+++ b/docs/project/windows-native-snap-replay.md@@ -7,6 +7,10 @@ pinned Electron. The job uses read-only permissions, no credentials, and nodeployment. Its artifact is named `native-snap-<head SHA>-<attempt>`.The job artifact has `job.json`, build/preparation logs, and a `native/`directory containing the acceptance summary, screenshots and replay payload.+The ephemeral runner's display is configured to at least 1920×1080×32 so the+native minimum width fits in a work-area half. The mode change is checked and+recorded; an unsupported display mode fails the job. Manual replay leaves the+reviewer's desktop settings unchanged and requires the display below.## Independent interactive Windows run@@ -115,9 +119,9 @@ captures; the matrix baseline failed precisely at Win+Left as required.Download [its manifest](windows-native-snap-evidence/2b52999879a6/manifest.json),[matrix summary](windows-native-snap-evidence/2b52999879a6/summary.json),-[runner log](windows-native-snap-evidence/2b52999879a6/runner.log),+[runner log](https://github.com/Linuxdazhao/PI-Desktop/blob/e45ac351547f3cb0c448435c69524bbe78a3ee2a/docs/project/windows-native-snap-evidence/2b52999879a6/runner.log),[candidate results](windows-native-snap-evidence/2b52999879a6/candidate/result.json),-[native RPC replies](windows-native-snap-evidence/2b52999879a6/candidate/native-rpc.jsonl),+[native RPC replies](https://github.com/Linuxdazhao/PI-Desktop/blob/e45ac351547f3cb0c448435c69524bbe78a3ee2a/docs/project/windows-native-snap-evidence/2b52999879a6/candidate/native-rpc.jsonl),[maximized pixels](windows-native-snap-evidence/2b52999879a6/candidate/maximized.png)and [restored maximized pixels](windows-native-snap-evidence/2b52999879a6/candidate/restoredMaximized.png).These are author replay records, distinct from an independent Actions run.