diff --git a/.github/workflows/desktop-window-lifecycle.yml b/.github/workflows/desktop-window-lifecycle.yml
new file mode 100644
index 00000000000..493fb779ce3
--- /dev/null
+++ b/.github/workflows/desktop-window-lifecycle.yml
@@ -0,0 +1,70 @@
+name: Windows Desktop Window Lifecycle
+
+on:
+ push:
+ paths:
+ - 'apps/desktop/src-tauri/**'
+ - '.github/workflows/desktop-window-lifecycle.yml'
+ pull_request:
+ paths:
+ - 'apps/desktop/src-tauri/**'
+ - '.github/workflows/desktop-window-lifecycle.yml'
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ windows:
+ runs-on: windows-latest
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v4
+ - uses: Swatinem/rust-cache@v2
+ with:
+ workspaces: apps/desktop/src-tauri
+ - name: Prepare Compile-Only Resources
+ shell: pwsh
+ run: |
+ # Tests and the unbundled executable need no downloaded Node, Control,
+ # Engine or frontend. Only this disposable build checkout is changed.
+ $configPath = 'apps/desktop/src-tauri/tauri.conf.json'
+ $config = Get-Content -Raw -LiteralPath $configPath | ConvertFrom-Json -AsHashtable
+ $config.build.frontendDist = 'ci-placeholder'
+ $config.bundle.resources = @{}
+ $config.bundle.active = $false
+ New-Item -ItemType Directory -Path 'apps/desktop/src-tauri/ci-placeholder' -Force | Out-Null
+ Set-Content -LiteralPath 'apps/desktop/src-tauri/ci-placeholder/index.html' -Value '
Compile Only'
+ $config | ConvertTo-Json -Depth 30 | Set-Content -LiteralPath $configPath
+ - name: Test Native Windows Lifecycle
+ shell: pwsh
+ working-directory: apps/desktop/src-tauri
+ run: |
+ cargo test --locked -- --test-threads=1
+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
+ - name: Build Unbundled Native Shell
+ shell: pwsh
+ working-directory: apps/desktop/src-tauri
+ run: |
+ cargo build --locked --release
+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
+ - name: Record Native Artifact Provenance
+ shell: pwsh
+ run: |
+ $exe = 'apps/desktop/src-tauri/target/release/strata-desktop.exe'
+ New-Item -ItemType Directory -Path 'window-lifecycle-artifact' | Out-Null
+ Copy-Item -LiteralPath $exe -Destination 'window-lifecycle-artifact/strata-desktop.exe'
+ @{
+ schema = 1
+ sourceCommit = $env:GITHUB_SHA
+ sourceRepository = $env:GITHUB_REPOSITORY
+ sha256 = (Get-FileHash -LiteralPath $exe -Algorithm SHA256).Hash.ToLowerInvariant()
+ bytes = (Get-Item -LiteralPath $exe).Length
+ compileOnlyResources = $true
+ } | ConvertTo-Json | Set-Content -LiteralPath 'window-lifecycle-artifact/provenance.json'
+ - uses: actions/upload-artifact@v4
+ with:
+ name: windows-window-lifecycle
+ path: window-lifecycle-artifact/
+ if-no-files-found: error
+ retention-days: 14
diff --git a/apps/desktop/src-tauri/src/desktoplog.rs b/apps/desktop/src-tauri/src/desktoplog.rs
index 5bdf7125b60..2e71942543e 100644
--- a/apps/desktop/src-tauri/src/desktoplog.rs
+++ b/apps/desktop/src-tauri/src/desktoplog.rs
@@ -584,7 +584,7 @@ mod tests {
let path = write_startup_failure(&dir, "the app stopped unexpectedly: boom (at main.rs:1, thread main)", Some(Path::new("/x/desktop-1.log"))).unwrap();
assert!(path.file_name().unwrap().to_string_lossy().starts_with("desktop-crash-"));
let text = std::fs::read_to_string(&path).unwrap();
- for needle in ["boom", "main.rs:1", "/x/desktop-1.log", "0.2.0", "System:", "Meaning:"] {
+ for needle in ["boom", "main.rs:1", "/x/desktop-1.log", env!("CARGO_PKG_VERSION"), "System:", "Meaning:"] {
assert!(text.contains(needle), "{needle}");
}
let _ = std::fs::remove_dir_all(&dir);
diff --git a/apps/desktop/src-tauri/src/main.rs b/apps/desktop/src-tauri/src/main.rs
index 83eff2680c0..0ade79d8d01 100644
--- a/apps/desktop/src-tauri/src/main.rs
+++ b/apps/desktop/src-tauri/src/main.rs
@@ -40,6 +40,8 @@ use tauri::{Manager, WebviewUrl, WebviewWindowBuilder};
mod updater;
mod desktoplog;
mod shell;
+#[cfg(windows)]
+mod window_lifecycle;
#[cfg(target_os = "linux")]
mod supervisor;
@@ -882,6 +884,8 @@ fn run_embedded() {
tauri::Builder::default()
// First, as the plugin requires: a second launch ends here after telling the running app to show itself.
.plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
+ #[cfg(windows)]
+ if window_lifecycle::second_launch(app, &_args) { return; }
if let Some(window) = app.get_webview_window("main") {
let _ = window.unminimize();
let _ = window.show();
@@ -900,6 +904,16 @@ fn run_embedded() {
panic!("STRATA_DESKTOP_TEST_PANIC is set: the app panics on purpose");
}
let handle = app.handle().clone();
+ #[cfg(windows)]
+ {
+ // A cold explicit Quit starts neither the Host nor a window.
+ if window_lifecycle::quit_requested(&std::env::args().collect::>()) {
+ handle.exit(0);
+ return Ok(());
+ }
+ handle.manage(window_lifecycle::Policy::from_environment());
+ handle.state::().watch_owner(handle.clone());
+ }
// A setup error would become a panic inside Tauri ("Failed to setup app"), and with panic = "abort" a crash with no message.
// A failed start is reported (log, crash file, message box) and ends the app here instead.
let port = match start_host(&handle) {
@@ -917,6 +931,8 @@ fn run_embedded() {
Ok(())
})
.on_window_event(|window, event| {
+ #[cfg(windows)]
+ if window_lifecycle::close(window, event) { return; }
// "Minimise to tray" (Settings, off by default): closing the main window hides it and keeps Strata running in the tray; Quit in the
// tray menu ends it (#3477). If no tray could be made the window closes as before.
if let tauri::WindowEvent::CloseRequested { api, .. } = event {
diff --git a/apps/desktop/src-tauri/src/window_lifecycle.rs b/apps/desktop/src-tauri/src/window_lifecycle.rs
new file mode 100644
index 00000000000..4cbc2c99210
--- /dev/null
+++ b/apps/desktop/src-tauri/src/window_lifecycle.rs
@@ -0,0 +1,159 @@
+//! Opt-in Windows window lifetime. No engine, UI or updater ownership changes.
+use std::sync::Arc;
+use tauri::Manager;
+
+#[cfg(windows)]
+mod owner {
+ use std::{ffi::c_void, path::PathBuf};
+ type Handle = *mut c_void;
+ #[link(name = "kernel32")]
+ extern "system" {
+ fn OpenProcess(access: u32, inherit: i32, pid: u32) -> Handle;
+ fn QueryFullProcessImageNameW(process: Handle, flags: u32, image: *mut u16, size: *mut u32) -> i32;
+ fn WaitForSingleObject(handle: Handle, timeout: u32) -> u32;
+ fn CloseHandle(handle: Handle) -> i32;
+ }
+ pub struct Owner(Handle);
+ unsafe impl Send for Owner {}
+ unsafe impl Sync for Owner {}
+ impl Owner {
+ pub fn open(pid: u32, image: &str) -> Option {
+ if pid == 0 || !PathBuf::from(image).is_absolute() { return None; }
+ let handle = unsafe { OpenProcess(0x0010_0000 | 0x1000, 0, pid) };
+ if handle.is_null() { return None; }
+ let owner = Self(handle);
+ let mut buffer = vec![0u16; 32768];
+ let mut size = buffer.len() as u32;
+ if unsafe { QueryFullProcessImageNameW(handle, 0, buffer.as_mut_ptr(), &mut size) } == 0 {
+ return None;
+ }
+ let actual = String::from_utf16_lossy(&buffer[..size as usize]);
+ if !actual.eq_ignore_ascii_case(image) || !owner.alive() { return None; }
+ Some(owner)
+ }
+ pub fn alive(&self) -> bool { unsafe { WaitForSingleObject(self.0, 0) == 258 } }
+ pub fn wait(&self) { unsafe { WaitForSingleObject(self.0, u32::MAX); } }
+ }
+ impl Drop for Owner { fn drop(&mut self) { unsafe { CloseHandle(self.0); } } }
+}
+
+pub struct Policy {
+ #[cfg(windows)]
+ owner: Option>,
+}
+
+impl Policy {
+ pub fn from_environment() -> Self {
+ #[cfg(windows)]
+ {
+ let enabled = std::env::var("STRATA_CLOSE_TO_TRAY").ok().as_deref() == Some("1");
+ let pid = std::env::var("STRATA_TRAY_PID").ok().and_then(|v| v.parse().ok());
+ let image = std::env::var("STRATA_TRAY_IMAGE").ok();
+ let owner = if enabled {
+ pid.zip(image).and_then(|(pid, image)| owner::Owner::open(pid, &image)).map(Arc::new)
+ } else { None };
+ Self { owner }
+ }
+ #[cfg(not(windows))]
+ Self {}
+ }
+
+ pub fn can_hide(&self) -> bool {
+ #[cfg(windows)]
+ { self.owner.as_ref().map(|owner| owner.alive()).unwrap_or(false) }
+ #[cfg(not(windows))]
+ { false }
+ }
+
+ pub fn watch_owner(&self, app: tauri::AppHandle) {
+ #[cfg(windows)]
+ if let Some(owner) = self.owner.clone() {
+ // Hold this exact process handle: PID reuse cannot change the owner.
+ std::thread::spawn(move || { owner.wait(); app.exit(0); });
+ }
+ }
+}
+
+pub fn quit_requested(args: &[String]) -> bool {
+ args.iter().any(|arg| arg == "--quit")
+}
+
+pub fn second_launch(app: &tauri::AppHandle, args: &[String]) -> bool {
+ if quit_requested(args) {
+ app.exit(0); // Explicit quit uses the original clean Host shutdown.
+ return true;
+ }
+ false // Keep the existing single-instance restore path in main.rs.
+}
+
+pub fn close(window: &tauri::Window, event: &tauri::WindowEvent) -> bool {
+ if let tauri::WindowEvent::CloseRequested { api, .. } = event {
+ if window.label() == "main" && window.app_handle().state::().can_hide() {
+ // Only prevent destruction after hide succeeds. Without a live Tray,
+ // normal close remains available and cannot strand an invisible App.
+ if window.hide().is_ok() { api.prevent_close(); return true; }
+ }
+ }
+ false
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn explicit_quit_does_not_match_other_arguments() {
+ let args = |values: &[&str]| values.iter().map(|value| value.to_string()).collect::>();
+ assert!(quit_requested(&args(&["strata-desktop", "--quit"])));
+ assert!(!quit_requested(&args(&["strata-desktop", "--quit-later"])));
+ assert!(!quit_requested(&args(&["strata-desktop", "a--quit.exe"])));
+ assert!(!quit_requested(&[]));
+ }
+
+ #[cfg(windows)]
+ #[test]
+ fn owner_requires_the_exact_live_executable() {
+ let image = crate::plain_path(std::env::current_exe().unwrap()).to_string_lossy().into_owned();
+ let pid = std::process::id();
+ let owner = owner::Owner::open(pid, &image).expect("the current test process");
+ assert!(owner.alive());
+ assert!(owner::Owner::open(pid, &format!("{image}.other")).is_none());
+ assert!(owner::Owner::open(pid, "relative.exe").is_none());
+ assert!(owner::Owner::open(0, &image).is_none());
+ }
+
+ #[cfg(windows)]
+ #[test]
+ fn a_held_owner_stops_enabling_hide_when_that_process_exits() {
+ use std::os::windows::process::CommandExt;
+ use std::process::{Command, Stdio};
+ let image = std::path::PathBuf::from(std::env::var_os("SystemRoot").unwrap())
+ .join("System32").join("ping.exe");
+ let mut child = Command::new(&image).args(["-n", "60", "127.0.0.1"])
+ .creation_flags(0x0800_0000).stdin(Stdio::null()).stdout(Stdio::null()).stderr(Stdio::null())
+ .spawn().expect("a disposable owner with no console window");
+ let opened = owner::Owner::open(child.id(), &image.to_string_lossy());
+ // Always end the disposable process, including if the identity assertion fails.
+ let was_alive = opened.as_ref().map(|owner| owner.alive()).unwrap_or(false);
+ let _ = child.kill();
+ child.wait().unwrap();
+ let owner = opened.expect("the exact disposable process");
+ owner.wait();
+ let policy = Policy { owner: Some(Arc::new(owner)) };
+ assert!(was_alive);
+ assert!(!policy.can_hide(), "a dead owner cannot strand an invisible App");
+ }
+
+ #[test]
+ fn missing_or_unverified_tray_never_enables_hide() {
+ std::env::remove_var("STRATA_CLOSE_TO_TRAY");
+ assert!(!Policy::from_environment().can_hide());
+ std::env::set_var("STRATA_CLOSE_TO_TRAY", "1");
+ std::env::set_var("STRATA_TRAY_PID", "0");
+ std::env::set_var("STRATA_TRAY_IMAGE", "relative.exe");
+ assert!(!Policy::from_environment().can_hide());
+ std::env::remove_var("STRATA_CLOSE_TO_TRAY");
+ std::env::remove_var("STRATA_TRAY_PID");
+ std::env::remove_var("STRATA_TRAY_IMAGE");
+ }
+}
diff --git a/docs/CLOSING.md b/docs/CLOSING.md
index 204619414e0..1bbec61f7fb 100644
--- a/docs/CLOSING.md
+++ b/docs/CLOSING.md
@@ -42,6 +42,35 @@ in that order instead of the engine dying under a request.
`strata_control/procs.py` is the identity rule behind every "is this still the process I started": PID **and** start time
**and** command line, checked again at the moment of each signal. A PID alone is never signalled.
+## Optional Windows Close To Tray
+
+The default X still closes the App. A Windows Tray companion may opt into hiding
+the main window instead by supplying all three environment values when it launches
+the App:
+
+```text
+STRATA_CLOSE_TO_TRAY=1
+STRATA_TRAY_PID=
+STRATA_TRAY_IMAGE=
+```
+
+The companion must provide a visible way to open and exit the App. The shell
+checks the process image, holds that exact process handle and watches its exit.
+A missing, inaccessible, exited or mismatched owner keeps normal X behavior.
+With a live verified owner, X hides only the main window and keeps the same Host
+alive. It does not detach an Engine or change its normal idle-unload setting.
+Launching the App again uses the existing single-instance restore path.
+
+`strata-desktop.exe --quit` is an explicit Windows exit, including while hidden.
+A cold `--quit` starts neither a Host nor a window. When the verified Tray owner
+exits, the App exits through the existing Host cleanup path. Updater exit, crash
+containment, the Windows Job and Linux/macOS behavior are unchanged. This adds no
+Tray icon, startup entry, launcher, HTTP endpoint or frontend permission.
+
+The [acceptance record](windows-close-to-tray/README.md) records this candidate's
+native X, same-window Tray Reopen and hidden-window Web inference separately from
+the earlier deployed Extension reference.
+
## Leftovers, and how they are found
Every engine, image encoder and server Strata starts writes a small private record (`/procs/.json`: PID, start
diff --git a/docs/windows-close-to-tray/README.md b/docs/windows-close-to-tray/README.md
new file mode 100644
index 00000000000..0b794db03ca
--- /dev/null
+++ b/docs/windows-close-to-tray/README.md
@@ -0,0 +1,164 @@
+# Windows Close To Tray Acceptance
+
+This opt-in candidate keeps the existing App Host alive when a main-window X
+hides the Windows App. A companion supplies its own live process ID and absolute
+image path; the shell holds the verified process handle. Starting the App again
+uses the existing single-instance restore path. Explicit `--quit` and owner exit
+use the existing Host shutdown path.
+
+Normal X without a verified opt-in owner still closes the App. The existing
+resource lookup, updater, Host command, shutdown token and Windows Job stay in
+place. Linux and macOS do not compile or call the new module. No Engine, Control,
+server or frontend code is changed. The separate Tray proposal is #3365; its
+managed-mode scope remains separate from this native lifecycle hook.
+
+## Reproduce The Opt-In Behavior
+
+Use a disposable App installation and a real, visible companion. Supply the
+three environment values described in [Closing](../CLOSING.md#optional-windows-close-to-tray)
+when launching `strata-desktop.exe`. Do not start the App inside a companion Job
+that is meant to contain only its server workers.
+
+1. Record the App, Host, companion and listener identities. Confirm the App UI
+ and an authenticated owner browser surface both reach the same Host.
+2. Click the actual native X. Confirm that the window disappears while the same
+ App and Host remain, and that browser metadata and Monitor still work.
+3. Launch the same App executable again from the companion. Confirm the same
+ window returns with unchanged App and Host identities.
+4. Hide it again. If hardware testing is intended, send one short prompt through
+ the owner browser and confirm the completed reply. Metadata alone is not
+ evidence of inference.
+5. Send `strata-desktop.exe --quit`. Confirm the App and its Host exit cleanly.
+ A cold `--quit` must not start a Host. Test owner exit separately.
+
+## Submitted Candidate: Live Web Baseline
+
+The native executable from [Windows CI run 39632085918](https://github.com/medking82/Strata/actions/runs/39632085918)
+was run on Windows x64 with the unchanged official App 0.2.2 Host, UI and Control
+resources. The executable was built from candidate commit
+`6a4202de18bd8c5b77ac3512875c8230722c0f16`; its SHA-256 is
+`2e08024cbbcda10415af59d53462e173c7f3e7aa424e858aef18ffbc3f1db4c2`.
+Its source and checksum match the CI provenance artifact. No native source was
+patched for this local test. This was an unbundled candidate, not an installer.
+
+The running Tray opened this candidate. The authenticated owner Web then used
+the loaded Huihui V2 Swift IQ3_S model and completed `PR3612_WEB_BASELINE_OK`.
+Models metadata and Monitor returned HTTP 200. Effective Context stayed at
+204800 (200K), idle unload at 1800 seconds, and Codex Sync reported `synced`.
+The existing Tray and 8080/8081 listener identities were retained.
+
+After the capture, explicit `--quit` ended the candidate and its Host. The real
+Tray reopened the original native Extension. Its original settings and activation
+pointer were restored byte for byte. Preservation checks passed for 17 private
+files and all 29,400 official resource files. The original model, Context, idle
+unload and synchronized Codex state were retained; shared listeners were not
+restarted.
+
+
+
+This was the initial Web baseline. A Windows Security firewall prompt for the
+copied Node executable interrupted the first native GUI attempt. The user later
+allowed that executable manually; automation did not operate the security dialog.
+The App Host and both shared API listeners still bound only to loopback. The
+completed native GUI acceptance below supersedes that earlier blocker.
+
+The screenshot contains only QA text and generic UI. It contains no account
+identity, private path, hostname, credential or unrelated chat. Incidental usage
+figures are not a benchmark.
+
+## Submitted Candidate: Completed GUI Acceptance
+
+The same CI executable and unchanged official resources were tested on
+2026-10-22 (Asia/Kuala_Lumpur). No Rust or build input changed after the successful
+CI run. The [sanitized observation record](gui-acceptance.json) contains the
+source/checksum, identity comparisons and preservation results, without private
+paths, process IDs, account details or conversation identifiers.
+
+- The native App completed `PR3612_APP_OK`. Clicking the actual title-bar X
+ removed its window from the visible Windows inventory while the same App,
+ official Node Host, Tray and 8080/8081 listeners remained alive.
+- The running companion's real `StrataTray.exe --open-app` entry restored the
+ exact same native window, App and Host. This invokes its normal Open App
+ handler; the physical notification-area icon was not clicked by automation.
+- After a second actual X, the owner Web completed `PR3612_FINAL_WEB_OK` while
+ the native window stayed hidden. The same on-demand model was loaded for that
+ request. Authenticated Models metadata and Monitor each returned HTTP 200.
+- Effective Context remained 204800 (200K), idle unload remained 1800 seconds
+ (30 Minutes), and Codex Sync reported `synced`. This does not establish that an
+ already running Codex client has reloaded its catalog.
+- Explicit candidate `--quit` ended the candidate App and Host. The real Tray
+ reopened the original native Extension. All 17 recorded private files and all
+ 29,400 official resource files passed preservation checks. The original native
+ activation pointers and on-demand, unloaded model state were restored.
+
+
+
+
+
+GUI acceptance exposed a separate companion bug: its Win32 restore shortcut
+reported success while this hidden native window stayed hidden. Launching the
+same App executable directly restored it. The companion was corrected to always
+use its validated launcher and the App's own single-instance restore entry;
+313 companion assertions and its build passed. The final GUI run above used
+that corrected companion. Its C# implementation and site-specific deployment
+are external to this native PR; they are not presented as submitted Rust changes.
+
+These are real QA captures, not mockups. The collapsed sidebar and QA-only chat
+avoid exposing unrelated conversations. The published JPEGs have no
+EXIF/XMP/IPTC/comment metadata. Their incidental usage figures are not a benchmark.
+
+## Separate Deployed Reference
+
+The screenshot below is an actual acceptance capture of a separately deployed
+native Extension derived from official App 0.2.2 commit
+`011c9e600a93bbc9fd451c563501b5831c32bbca`, not a mockup. Its integration source
+was `b1308ce6dbbcbe5bd859953486f1a5acfc625ddd`, native package
+`0.1.0-ef4a4e88db40`, on Windows x64 with Engine 0.1.47, an RTX 5080 16 GB,
+61.4 GB usable RAM and a local Huihui V2 Swift IQ3_S model.
+
+During that test, native X removed the App from the visible-window inventory;
+App, Host, companion and 8080/8081 listener identities stayed unchanged. The
+running Tray's real Open App command restored the same native window. Physical
+taskbar-icon clicking was not automated. The window was hidden again before
+owner Web generated `CLOSE_TO_TRAY_FINAL_OK`. Models metadata and Monitor each
+returned HTTP 200. The model was loaded at effective Context 204800 (200K), with
+1800-second idle unload and the current model's Sampling baseline preserved.
+Explicit Quit and a subsequent Tray cold-open were also observed.
+
+The public screenshot contains only QA text, generic App UI, a public model
+display label and incidental usage figures. It contains no account identity,
+private path, hostname, credentials, original user screenshot or unrelated chat.
+The usage figures are not a benchmark or a speedup claim.
+
+
+
+The reference Extension also selected installed resources and handled companion
+startup outside its server Job. Those site-specific launcher/deployment changes
+are not part of this upstream candidate. The screenshot does not establish that
+the submitted candidate was installed or that a future App version will work.
+
+## Candidate Checks And Limits
+
+Run on native Windows from `apps/desktop/src-tauri`:
+
+```text
+cargo test --locked -- --test-threads=1
+cargo build --locked --release
+```
+
+The targeted Windows workflow runs these against the submitted Rust source in a
+disposable build checkout. It substitutes an inert compile-only page and no
+bundled resources; it does not create a distributable installer, download an
+Engine, run the App or start a model. The existing crash-report test now checks
+the package version rather than a stale literal 0.2.0; runtime logging is unchanged.
+New regressions check missing/mismatched owners, an exact live executable handle,
+owner exit, and exact `--quit` argument handling.
+
+Windows CI passed 25 Rust tests and the release build. The native source and
+build inputs remain identical to tested commit `6a4202de18bd8c5b77ac3512875c8230722c0f16`.
+The live baseline and completed GUI run above use that submitted native candidate.
+The deployed reference remains separate evidence. Physical Tray-icon clicking,
+signed-installer update, updater exit, Windows logoff, actual candidate owner-exit
+execution, other App versions and Linux/macOS builds remain unverified. Owner-exit
+logic is covered by the Windows Rust tests; that is distinct from GUI execution.
+Scope agreement for this optional native hook is requested in #2034.
diff --git a/docs/windows-close-to-tray/candidate-tray-reopened.jpg b/docs/windows-close-to-tray/candidate-tray-reopened.jpg
new file mode 100644
index 00000000000..88b8b9091d7
Binary files /dev/null and b/docs/windows-close-to-tray/candidate-tray-reopened.jpg differ
diff --git a/docs/windows-close-to-tray/candidate-web-baseline.jpg b/docs/windows-close-to-tray/candidate-web-baseline.jpg
new file mode 100644
index 00000000000..d7b28ef1b75
Binary files /dev/null and b/docs/windows-close-to-tray/candidate-web-baseline.jpg differ
diff --git a/docs/windows-close-to-tray/candidate-web-hidden.jpg b/docs/windows-close-to-tray/candidate-web-hidden.jpg
new file mode 100644
index 00000000000..e6fe41e4a47
Binary files /dev/null and b/docs/windows-close-to-tray/candidate-web-hidden.jpg differ
diff --git a/docs/windows-close-to-tray/gui-acceptance.json b/docs/windows-close-to-tray/gui-acceptance.json
new file mode 100644
index 00000000000..0515f8ac175
--- /dev/null
+++ b/docs/windows-close-to-tray/gui-acceptance.json
@@ -0,0 +1,71 @@
+{
+ "schema": 1,
+ "observedAtUtc": "2026-10-21T21:54:53.050Z",
+ "testedNativeSource": "6a4202de18bd8c5b77ac3512875c8230722c0f16",
+ "nativeSha256": "2e08024cbbcda10415af59d53462e173c7f3e7aa424e858aef18ffbc3f1db4c2",
+ "ciRun": "https://github.com/medking82/Strata/actions/runs/39632085918",
+ "environment": {
+ "os": "Windows x64",
+ "officialApp": "0.2.2",
+ "engine": "0.1.47",
+ "gpu": "RTX 5080 16 GB",
+ "usableRamGb": 61.4
+ },
+ "companion": {
+ "scope": "External to this native PR",
+ "sourceCommit": "62dcbbd56f7161a612e231228c87104c5edcbf12",
+ "entry": "StrataTray.exe --open-app",
+ "assertionsPassed": 313,
+ "buildPassed": true,
+ "physicalTrayIconClicked": false
+ },
+ "observed": {
+ "actualNativeXHidden": true,
+ "sameWindowReopenedByRealTrayEntry": true,
+ "candidateAppAndHostIdentitiesPreserved": true,
+ "sharedListenerIdentitiesPreserved": true,
+ "hiddenWebReply": "PR3612_FINAL_WEB_OK",
+ "candidateExplicitQuitExitedAppAndHost": true,
+ "originalNativeExtensionReopened": true,
+ "modelsHttp": 200,
+ "monitorHttp": 200,
+ "sharedListenersLoopbackOnly": true
+ },
+ "configuration": {
+ "model": "huihui-v2-swift-qwen3.8-flash-next-iq3_s",
+ "contextTokens": 204800,
+ "idleUnloadSeconds": 1800,
+ "codexSync": "synced",
+ "runningCodexClientReloadVerified": false,
+ "initialAndRestoredModelLoaded": false
+ },
+ "preservation": {
+ "privateFiles": 17,
+ "officialResources": 29400,
+ "originalPointersRestored": true
+ },
+ "screenshots": [
+ {
+ "file": "candidate-tray-reopened.jpg",
+ "bytes": 57081,
+ "sha256": "112642bc3c599c06bc07a748dcaec50ac1353f5c13df430e454fe390a0ad26c8",
+ "exifXmpIptcCommentMetadata": false
+ },
+ {
+ "file": "candidate-web-hidden.jpg",
+ "bytes": 35523,
+ "sha256": "fba2d60723c7795d2b8bfaac2d4e6426e082bb5fc76f0ffa4af017fe5e2a57e2",
+ "exifXmpIptcCommentMetadata": false
+ }
+ ],
+ "notRun": [
+ "Physical notification-area icon click",
+ "Signed-installer update",
+ "Updater exit",
+ "Windows logoff",
+ "Candidate owner-exit GUI execution",
+ "Other App versions",
+ "Linux/macOS build"
+ ],
+ "performanceClaim": null
+}
diff --git a/docs/windows-close-to-tray/web-background.jpg b/docs/windows-close-to-tray/web-background.jpg
new file mode 100644
index 00000000000..691d1fdeb8f
Binary files /dev/null and b/docs/windows-close-to-tray/web-background.jpg differ