mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3612] [GUI] Add Opt-In Windows Close To Tray #4711
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4711
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3612
Author: @medking82
Created: 10/21/2026
Status: 🔄 Open
Base:
main← Head:codex/windows-close-to-tray-20261021📝 Commits (6)
39ef5d4feat(desktop): add opt-in Windows close-to-tray lifetime60ae168docs: use the verified screenshot media type6a4202dci: retain source-bound native shell for GUI acceptancef994c06docs: add source-bound candidate Web acceptance evidence6b8363adocs: add submitted-candidate Close To Tray GUI evidence1492671Merge upstream main into Windows close-to-tray branch📊 Changes
11 files changed (+510 additions, -1 deletions)
View changed files
➕
.github/workflows/desktop-window-lifecycle.yml(+70 -0)📝
apps/desktop/src-tauri/src/desktoplog.rs(+1 -1)📝
apps/desktop/src-tauri/src/main.rs(+16 -0)➕
apps/desktop/src-tauri/src/window_lifecycle.rs(+159 -0)📝
docs/CLOSING.md(+29 -0)➕
docs/windows-close-to-tray/README.md(+164 -0)➕
docs/windows-close-to-tray/candidate-tray-reopened.jpg(+0 -0)➕
docs/windows-close-to-tray/candidate-web-baseline.jpg(+0 -0)➕
docs/windows-close-to-tray/candidate-web-hidden.jpg(+0 -0)➕
docs/windows-close-to-tray/gui-acceptance.json(+71 -0)➕
docs/windows-close-to-tray/web-background.jpg(+0 -0)📄 Description
Problem And Result
Closing the Windows App with X destroys its Host, which also interrupts an owner Web UI that uses that Host. This opt-in native hook lets a visible companion keep the same App Host alive while X hides the main window. Launching the App again restores the same instance; explicit Windows
--quitand verified-owner exit use the normal Host shutdown path.Related: #2034 and #3365. Native lifecycle scope proposal. Scope agreement remains requested, not assumed. The managed-model Tray and App contract proposals keep their separate scope.
Approach
STRATA_CLOSE_TO_TRAY=1, the companion's PID and its absolute executable path. Verify and retain that exact process handle to avoid PID reuse. Missing, inaccessible, mismatched or exited owners keep normal X behavior.Actual Submitted-Candidate GUI Acceptance
Tested native source:
6a4202de18bd8c5b77ac3512875c8230722c0f16, from Windows CI run 39632085918. Executable SHA-256:2e08024cbbcda10415af59d53462e173c7f3e7aa424e858aef18ffbc3f1db4c2. This exact unbundled executable ran beside copies of unchanged official App 0.2.2 Host/UI/Control resources; its official contract fingerprint matched. No Rust patch was used for local acceptance.Observed on 2026-10-22 (Asia/Kuala_Lumpur), Windows x64, Engine 0.1.47, RTX 5080 16 GB and 61.4 GB usable RAM:
PR3612_APP_OK. Clicking the actual native 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.StrataTray.exe --open-appentry restored the exact same native window, App and Host. This invokes its normal Open App handler; physical notification-area icon clicking was not automated.PR3612_FINAL_WEB_OKwhile the native window stayed hidden. The same on-demand Huihui V2 Swift IQ3_S model loaded for that request. Authenticated Models metadata and Monitor returned HTTP 200.synced. Reload of an already running Codex client was not verified.--quitexited its 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. Original activation pointers and the original unloaded, on-demand model state were restored.These are real QA captures, not mockups. They contain only QA text and generic UI; no private path, hostname, account identity, credentials, original user screenshot or unrelated chat is published. JPEG header audit found no EXIF/XMP/IPTC/comment metadata. Incidental usage figures are not a benchmark. The sanitized observation receipt records checksums and identity comparisons without private IDs or paths.
Validation
Base: official App 0.2.2 main
011c9e600a93bbc9fd451c563501b5831c32bbca. Current head6b8363ad8145220f23cf338d88e28339d89c1130changes evidence/docs only after tested native source6a4202de18bd8c5b77ac3512875c8230722c0f16. The exact native/build-input comparison is empty:Passed:
cargo test --locked -- --test-threads=1passed 25 tests, 0 failed;cargo build --locked --releasesucceeded. The workflow uses an inert compile-only page and no bundled resources, and retains the exact executable and provenance as thewindows-window-lifecycleartifact.git diff --check, exact native/build-input comparison, screenshot visual privacy review and JPEG metadata audit.Observed CI output:
Observed Failure And Resolution: the companion's old Win32 restore shortcut reported success while the window stayed hidden. Direct single-instance App launch worked. The companion now always calls its validated launcher and the App's own restore entry; the final GUI run used this correction. No Rust fix was needed. The earlier Windows Security prompt was resolved manually by the user; automation did not operate that dialog. Actual listeners remained loopback-only.
Not Run: physical notification-area icon clicking; signed-installer update, updater exit and Windows logoff; actual candidate owner-exit GUI execution; other App versions and Linux/macOS builds. Owner-exit logic passed its Windows Rust tests. No C++/CUDA/HIP/SYCL/Metal backend is changed by this PR.
Limits
Companions must provide a visible Open/Exit entry and start the App outside a server-only Job. Process validation proves the configured process is alive; it cannot prove the companion has a usable icon. This does not add a built-in Tray, a general plugin or browser-deployment API. Future-version compatibility and signed-updater execution remain unverified. Scope agreement remains outstanding.
Reproduction, baseline and separate earlier deployed reference: Windows Close To Tray Acceptance.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.