Skip to content

Commit e697b5b

Browse files
Mike HarshCopilot
andcommitted
chore(msix): drop ghost-frame cleanup from packaging PR
Remove the PR-only Windows Terminal ghost-frame cleanup script, build hook, docs, and contract tests so this PR stays focused on packaging. Validation: ./build.ps1; dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore; dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3cbdaeb commit e697b5b

5 files changed

Lines changed: 7 additions & 546 deletions

File tree

AGENTS.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ Notes:
2727
- `$env:OPENCLAW_REPO_ROOT='D:\github\moltbot-windows-hub.<worktree-name>'`
2828
- Tray tests must isolate `SettingsManager` from real user settings. Do not use `new SettingsManager()` in tests unless the test intentionally reads `%APPDATA%\OpenClawTray\settings.json`; pass a temp settings directory or set `OPENCLAW_TRAY_DATA_DIR` before the test process starts.
2929
- Prefer isolated worktrees for PR validation. Use `git-wt` for worktree workflows; `wt.exe` may resolve to WorkTrunk instead of Windows Terminal, so use the full Windows Terminal path when explicitly launching Terminal.
30-
- **Windows Terminal ghost frames**: tray tests and MSIX packaging tools (`MakeAppx`, `signtool`, the WindowsAppSDK markup compiler) can leak blank "Terminal" windows that survive testhost / msbuild exit. The in-process cleanup at `tests/OpenClaw.Tray.Tests/WinAppSdkGhostWindowCleanup.cs` catches most of them; `build.ps1` invokes the manual fallback at the end of every build. If you see blank Terminal windows piling up after a manual / interrupted test run, run `scripts/cleanup-ghost-windows.ps1` (no admin needed; safe — only touches `CASCADIA_HOSTING_WINDOW_CLASS` windows ≥1000×500 with title literally `Terminal` owned by `WindowsTerminal`).
31-
- **Win11 default-terminal-app trigger**: on a stock Win11 install, `HKCU\Console\%%Startup\DelegationConsole` is set to the Windows Terminal CLSID, which means EVERY console-spawning child (gh, git, dotnet, pwsh, an agent's tool invocations) allocates a Cascadia frame. Most close cleanly; a small fraction leak. For high-shell-activity sessions, prefer one of:
32-
- `./scripts/cleanup-ghost-windows.ps1 -Daemon` (foreground watcher, Ctrl+C to stop)
33-
- `./scripts/cleanup-ghost-windows.ps1 -InstallScheduledTask` (registers a hidden 5-minute task under the current user; uninstall with `-UninstallScheduledTask`)
3430
- Do not claim completion without reporting validation results.
3531

3632
## Architecture Context for New Agents

build.ps1

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -270,16 +270,6 @@ if ($failCount -eq 0) {
270270
Write-Warning "Unable to determine WinUI target framework from $winUIProjectPath"
271271
}
272272
}
273-
274-
# Auto-cleanup any Terminal ghost frames that snuck through during MSIX
275-
# packaging / XAML compilation / signtool. The in-process test cleanup
276-
# (tests/OpenClaw.Tray.Tests/WinAppSdkGhostWindowCleanup.cs) only runs
277-
# inside the testhost lifetime; build-time tooling that spawns Cascadia
278-
# hosting windows leaks ghosts that this script catches.
279-
$ghostCleanup = Join-Path $PSScriptRoot "scripts\cleanup-ghost-windows.ps1"
280-
if (Test-Path $ghostCleanup) {
281-
& $ghostCleanup -Quiet
282-
}
283273
} else {
284274
Write-Host "$failCount build(s) failed" -ForegroundColor Red
285275
exit 1

scripts/cleanup-ghost-windows.ps1

Lines changed: 0 additions & 301 deletions
This file was deleted.

0 commit comments

Comments
 (0)