[PR #2035] [CLOSED] [GUI] Add Optional Windows Tray For Local Model Control #3822

Closed
opened 2026-11-07 15:31:00 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2035
Author: @medking82
Created: 10/12/2026
Status: ❌ Closed

Base: main ← Head: codex/windows-tray-20261012


📝 Commits (7)

  • b82f4c9 Add opt-in read-only Windows Tray status client
  • 041b20c Use official favicon and document Tray operation with actual menu capture
  • 00d35c1 Replace blurry menu capture with clearly labeled original PNG reference
  • 5726a62 Add generic managed Windows Tray with safe lifecycle and updates
  • 4e2c03d Address managed Tray startup and error-display review findings
  • d86e5de Keep managed Tray startup and upgrades unloaded until requested
  • 7ca4ab6 docs(tray): clarify external clients are not required

📊 Changes

20 files changed (+2270 additions, -0 deletions)

View changed files

➕ tools/windows-tray/.gitignore (+3 -0)
➕ tools/windows-tray/App.config (+7 -0)
➕ tools/windows-tray/AssemblyInfo.cs (+2 -0)
➕ tools/windows-tray/Build.ps1 (+21 -0)
➕ tools/windows-tray/ManagedTray.cs (+231 -0)
➕ tools/windows-tray/ProcessJob.cs (+72 -0)
➕ tools/windows-tray/Program.cs (+266 -0)
➕ tools/windows-tray/README.md (+170 -0)
➕ tools/windows-tray/Strata.ico (+0 -0)
➕ tools/windows-tray/TrayTests.cs (+110 -0)
➕ tools/windows-tray/app.manifest (+12 -0)
➕ tools/windows-tray/managed/config.py (+161 -0)
➕ tools/windows-tray/managed/controller.py (+379 -0)
➕ tools/windows-tray/managed/requirements.txt (+1 -0)
➕ tools/windows-tray/managed/test_managed.py (+382 -0)
➕ tools/windows-tray/managed/updates.py (+151 -0)
➕ tools/windows-tray/managed/windows_job.py (+292 -0)
➕ tools/windows-tray/screenshots/favicon.png (+0 -0)
➕ tools/windows-tray/screenshots/local-tray-reference.png (+0 -0)
➕ tools/windows-tray/tray.example.json (+10 -0)

📄 Description

Problem and result

Windows users need quick access to their local Strata server without keeping a console or browser open. This opt-in Tray adds a read-only client and a separately configured managed mode for model profiles, context, idle unload and explicit Preload/Unload. It is not installed or started by the default installer.

#2034. Rebased onto 0.2.0-beta main (e88ee39d) for the tracker reset. Scope agreement for the managed feature is still requested; this remains a draft proposal. The earlier issue proposed a narrower read-only client. No maintainer agreement on the expanded scope is assumed.

Approach

All files are isolated under tools/windows-tray/. Existing engine, server, frontend, setup and default installation files are byte-identical to the base revision. The Tray forwards client authentication unchanged and owns only the processes in its private Windows Job. Lifecycle changes close admission and drain admitted requests before acting; occupied ports are refused. Startup and restart stay lazy.

Managed mode uses the official context choices (8K, 32K, 64K, 128K, 200K, 256K, 384K, 512K), and Never/5/10/30 minute idle unload, preserving the original profiles and saved settings. An optional desktop_app path adds Open Strata App and a separate App update metadata check using the official feed. App installation and signature verification stay in the App. Legacy engine staging is retained only for legacy assets; signed 0.2 component releases explicitly defer to the official component updater.

The current official desktop icon replaces the earlier favicon. The old personal Tray screenshot was removed; no personal configuration or screenshot is included. This generic proposal has no Codex dependency or client-capacity synchronization.

Validation

Commands below omit the local windowless-runner wrapper and use a disposable output/dependency directory.

Passed:

  • Windows x64, .NET Framework compiler v4, Python 3.12; patch d2303a53 on base e88ee39d (0.2.0-beta).
  • tools/windows-tray/Build.ps1 -Test -OutputDirectory <temporary directory> and TrayTests.exe: 54 checks passed, including actual PerMonitorV2, loopback API parsing, auth/redirect boundaries, embedded icon, diagnostic privacy, argument quoting, App version/metadata validation and malformed-feed handling.
  • tools/windows-tray/Build.ps1 -OutputDirectory <temporary directory>: production WinForms executable built.
  • python -B tools/windows-tray/managed/test_managed.py: 16 tests passed against this base's unmodified official MockEngine and disposable streaming fixtures. Covers lazy lifecycle, profile/settings preservation, 30-minute persistence, authentication forwarding, foreign-port refusal, streaming drain, archive/digest/staging checks and deferral of signed component releases.
  • git diff --check; all changed paths are below tools/windows-tray/.

Failed:

  • Initial mock-server runs lacked the base revision's jinja2 and regex dependencies. The final run passed with those pinned official dependencies installed in an isolated test directory; the production Python environment was not changed.

Not run:

  • Real GPU cold load, generation, unload/idle timing or upgrades; Windows reboot/autostart; cross-monitor transitions; configured-App launch and App installer interaction in this generic candidate. The official MockEngine always reports loaded and a fixed 32768 context; unloaded behavior is tested separately with fake control responses. No inference or model download was submitted for this update.

Limits

Draft pending scope agreement and targeted Windows hardware acceptance. Signed component installation belongs to the official updater. This Tray does not provide an upstream plugin API or manage App-owned prepared-model registration. Read-only mode does not accept API keys; protected servers report authentication required.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/2035 **Author:** [@medking82](https://github.com/medking82) **Created:** 10/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/windows-tray-20261012` --- ### 📝 Commits (7) - [`b82f4c9`](https://github.com/Niko1221/Strata/commit/b82f4c9c4d1c3db25fec55b59063cc98ac242f1b) Add opt-in read-only Windows Tray status client - [`041b20c`](https://github.com/Niko1221/Strata/commit/041b20c8e23543b0250f37bcc5f686e782207e89) Use official favicon and document Tray operation with actual menu capture - [`00d35c1`](https://github.com/Niko1221/Strata/commit/00d35c169a237919a7275a94d9d2f6612a1ff931) Replace blurry menu capture with clearly labeled original PNG reference - [`5726a62`](https://github.com/Niko1221/Strata/commit/5726a6223948c5293457986f0aebe0ba9acbb660) Add generic managed Windows Tray with safe lifecycle and updates - [`4e2c03d`](https://github.com/Niko1221/Strata/commit/4e2c03dcbacbc2c37a937e6ca3ab6fc56182a560) Address managed Tray startup and error-display review findings - [`d86e5de`](https://github.com/Niko1221/Strata/commit/d86e5de6a12b967d4ccd73eca2b2b931b64b1a1d) Keep managed Tray startup and upgrades unloaded until requested - [`7ca4ab6`](https://github.com/Niko1221/Strata/commit/7ca4ab66daf0100d509b2a1c9e29ad9d75254115) docs(tray): clarify external clients are not required ### 📊 Changes **20 files changed** (+2270 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `tools/windows-tray/.gitignore` (+3 -0) ➕ `tools/windows-tray/App.config` (+7 -0) ➕ `tools/windows-tray/AssemblyInfo.cs` (+2 -0) ➕ `tools/windows-tray/Build.ps1` (+21 -0) ➕ `tools/windows-tray/ManagedTray.cs` (+231 -0) ➕ `tools/windows-tray/ProcessJob.cs` (+72 -0) ➕ `tools/windows-tray/Program.cs` (+266 -0) ➕ `tools/windows-tray/README.md` (+170 -0) ➕ `tools/windows-tray/Strata.ico` (+0 -0) ➕ `tools/windows-tray/TrayTests.cs` (+110 -0) ➕ `tools/windows-tray/app.manifest` (+12 -0) ➕ `tools/windows-tray/managed/config.py` (+161 -0) ➕ `tools/windows-tray/managed/controller.py` (+379 -0) ➕ `tools/windows-tray/managed/requirements.txt` (+1 -0) ➕ `tools/windows-tray/managed/test_managed.py` (+382 -0) ➕ `tools/windows-tray/managed/updates.py` (+151 -0) ➕ `tools/windows-tray/managed/windows_job.py` (+292 -0) ➕ `tools/windows-tray/screenshots/favicon.png` (+0 -0) ➕ `tools/windows-tray/screenshots/local-tray-reference.png` (+0 -0) ➕ `tools/windows-tray/tray.example.json` (+10 -0) </details> ### 📄 Description ## Problem and result Windows users need quick access to their local Strata server without keeping a console or browser open. This opt-in Tray adds a read-only client and a separately configured managed mode for model profiles, context, idle unload and explicit Preload/Unload. It is not installed or started by the default installer. ## Related discussion #2034. Rebased onto 0.2.0-beta `main` (`e88ee39d`) for the tracker reset. **Scope agreement for the managed feature is still requested; this remains a draft proposal.** The earlier issue proposed a narrower read-only client. No maintainer agreement on the expanded scope is assumed. ## Approach All files are isolated under `tools/windows-tray/`. Existing engine, server, frontend, setup and default installation files are byte-identical to the base revision. The Tray forwards client authentication unchanged and owns only the processes in its private Windows Job. Lifecycle changes close admission and drain admitted requests before acting; occupied ports are refused. Startup and restart stay lazy. Managed mode uses the official context choices (8K, 32K, 64K, 128K, 200K, 256K, 384K, 512K), and Never/5/10/30 minute idle unload, preserving the original profiles and saved settings. An optional `desktop_app` path adds Open Strata App and a separate App update metadata check using the official feed. App installation and signature verification stay in the App. Legacy engine staging is retained only for legacy assets; signed 0.2 component releases explicitly defer to the official component updater. The current official desktop icon replaces the earlier favicon. The old personal Tray screenshot was removed; no personal configuration or screenshot is included. This generic proposal has no Codex dependency or client-capacity synchronization. ## Validation Commands below omit the local windowless-runner wrapper and use a disposable output/dependency directory. **Passed:** - Windows x64, .NET Framework compiler v4, Python 3.12; patch `d2303a53` on base `e88ee39d` (0.2.0-beta). - `tools/windows-tray/Build.ps1 -Test -OutputDirectory <temporary directory>` and `TrayTests.exe`: **54 checks passed**, including actual PerMonitorV2, loopback API parsing, auth/redirect boundaries, embedded icon, diagnostic privacy, argument quoting, App version/metadata validation and malformed-feed handling. - `tools/windows-tray/Build.ps1 -OutputDirectory <temporary directory>`: production WinForms executable built. - `python -B tools/windows-tray/managed/test_managed.py`: **16 tests passed** against this base's unmodified official MockEngine and disposable streaming fixtures. Covers lazy lifecycle, profile/settings preservation, 30-minute persistence, authentication forwarding, foreign-port refusal, streaming drain, archive/digest/staging checks and deferral of signed component releases. - `git diff --check`; all changed paths are below `tools/windows-tray/`. **Failed:** - Initial mock-server runs lacked the base revision's `jinja2` and `regex` dependencies. The final run passed with those pinned official dependencies installed in an isolated test directory; the production Python environment was not changed. **Not run:** - Real GPU cold load, generation, unload/idle timing or upgrades; Windows reboot/autostart; cross-monitor transitions; configured-App launch and App installer interaction in this generic candidate. The official MockEngine always reports loaded and a fixed 32768 context; unloaded behavior is tested separately with fake control responses. No inference or model download was submitted for this update. ## Limits Draft pending scope agreement and targeted Windows hardware acceptance. Signed component installation belongs to the official updater. This Tray does not provide an upstream plugin API or manage App-owned prepared-model registration. Read-only mode does not accept API keys; protected servers report authentication required. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:31:00 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3822
No description provided.