feat(desktop): add Windows native pywebview + pystray harness#5494
Open
whoxllm wants to merge 2 commits into
Open
feat(desktop): add Windows native pywebview + pystray harness#5494whoxllm wants to merge 2 commits into
whoxllm wants to merge 2 commits into
Conversation
whoxllm
force-pushed
the
desktop/windows-native-harness
branch
from
July 13, 2026 05:25
f19e853 to
df42f9c
Compare
odysseus-desktop.py wraps the existing backend as a native Windows app: - starts uvicorn (app:app) as a managed subprocess, health-checked against /api/health with auto-restart, - embeds the existing web UI in a native pywebview window (no browser tab), - system-tray icon with start/stop/open/quit and close-to-tray, - creates a per-user Start Menu shortcut on first launch (plus a tray action to recreate it), and - sets an explicit AppUserModelID so the taskbar shows the Odysseus icon instead of the generic Python host icon. No changes to app.py or core routes. The three new deps (pywebview, pystray, pillow) go in requirements-optional.txt so the core/Docker install is unaffected. Includes a PyInstaller spec for building a standalone .exe. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…aunch) On first launch odysseus-desktop.py now creates the data dirs and initializes the DB (reusing setup.py's create_dirs/init_database), but does NOT create an admin — the web UI's 'Create Admin Account' screen handles that in-app. This means the harness is launch-and-go: no separate 'setup.py install' step and no 'start the server with uvicorn' terminal hint that reads like the install didn't finish. Idempotent and best-effort; the backend also self-initializes core.database on import. The optional desktop deps (pywebview/pystray/pillow) stay in requirements-optional.txt so the core install is unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
whoxllm
force-pushed
the
desktop/windows-native-harness
branch
from
July 17, 2026 20:22
df42f9c to
799dd98
Compare
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Adds an optional native Windows desktop harness (
odysseus-desktop.py) that wraps the existing backend. It starts uvicorn (app:app) as a managed subprocess (health-checked against/api/health, auto-restart), embeds the existing web UI in a native pywebview window, adds a system-tray icon (start/stop/open/quit, close-to-tray), creates a per-user Start Menu shortcut on first launch, and sets an AppUserModelID so the taskbar shows the Odysseus icon instead of generic Python. On first launch it initializes its own data dir + DB and lets the web UI's "Create Admin Account" screen handle the admin — a single launch command, no separate setup step.It does not touch
app.pyor any core route. The whole change is 3 new files + 3 deps inrequirements-optional.txt(opt-in, so the core/Docker install is unaffected).Working example (standalone build you can run today): https://github.com/whoxllm/odysseus-desktop
Target branch
dev, notmain.Linked Issue
Closes #5561
Type of Change
Checklist
devdocker compose uporuvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.How to Test
On Windows (Python 3.11+, Git):
The harness creates its data dir + DB, starts the backend, and opens a native window to Create Admin Account. A boat icon appears in the tray; Odysseus appears in the Start Menu.
Visual / UI changes
This is OS integration (native window, tray, Start Menu, taskbar icon), not a change to the web frontend/CSS — no
static/rendering is altered. Screenshots of the desktop experience below.Disclosure: built with Claude Code (AI-assisted). Not a bulk auto-generated PR — issue #5561 was opened first per the guideline, the commits carry
Co-Authored-By: Claude(matching this project's own convention), and it's a single focused feature I've run and verified end-to-end.(Screenshots: Start Menu entry with the boat icon, and the Create Admin Account window — attached in a comment.)