Repository navigation
Conversation
On Windows the GUI opened but was completely inert: every button did nothing, the status bar was stuck on "CUDA: OFF" and no translation ever loaded. Two independent causes, both needed fixing. 1. The UI is loaded from a file:// URL. pywebview 5+ does not expose the js_api bridge to file:// pages, and Chromium blocks fetch() there too, so ui/config.json and ui/lang/*.json never loaded either. Tracing every js_api method showed zero calls arriving from JS over 25s. Serving the same page through pywebview's local HTTP server fixes both. 2. Even over HTTP, the default WebView2 backend wires up the bridge only about half the time. Measured over repeated cold launches: WebView2 4/8 runs healthy (the rest render the page but never connect, some hanging the UI thread outright), pywebview 5.4 0/6, Qt backend 7/7. So prefer the Qt backend on Windows when PySide6 is available, and fall back to the previous behaviour when it is not. requirements.txt: add PySide6 on Windows for the Qt backend, and mark PyGObject as Linux-only - it needs GTK/girepository plus Python dev libs, which the embedded Python from setup.ps1 does not ship, so it always fails there. Verified on Windows 11 with an RTX 3050: status bar reports CUDA/FFmpeg on, config and translations load, and Start Processing runs a file end to end from the GUI. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
soemon-afk
left a comment
There was a problem hiding this comment.
tested the commit and UI is working on Windows 11
soemon-afk
left a comment
There was a problem hiding this comment.
tested the commit and UI is working on Windows 11
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe application now prefers the Qt WebView backend on Windows when PySide6 is available. Webview startup enables the local HTTP server. Dependency markers limit PySide6 to Windows and PyGObject to Linux. ChangesWebView platform support
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The Windows WebView startup and platform-specific dependencies are aligned, with no identified merge-blocking impact. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Superseded by merged #90. Thank you @kienbb for diagnosing the Windows bridge issue and testing the local HTTP + Qt backend approach. That direction is incorporated into the current dependency stack, with native file/folder dialog checks, real processing and preview tests, and desktop CI on Windows, Linux and macOS. Closing this PR as the implementation is now in main. |
On Windows the GUI opens but is completely inert: every button does nothing, the status bar stays on
CUDA: OFF/FFMPEG: OFF/RAM: 0%, and no translation ever loads (only the hardcoded English fallbacks show). The CLI (remwm.py) works fine — this is GUI-only.There are two independent causes, and both have to be fixed for the GUI to work.
1. The UI is loaded from a
file://URLremwmgui.pypassesui/index.htmltocreate_window(), so the page runs on afile://origin. pywebview 5+ does not expose thejs_apibridge tofile://pages, and Chromium blocksfetch()there too — which is also whyui/config.jsonandui/lang/*.jsonnever load, leavingt = {}.I instrumented every
js_apimethod with a logging wrapper and launched the app. Over 25 seconds, not a single call arrived from JS — only theset_window()call made from Python:Serving the same page through pywebview's built-in HTTP server (
http_server=True) fixes both the bridge andfetch():2. The WebView2 backend wires up the bridge only about half the time
Even over HTTP, cold launches are a coin flip: the window renders but never connects, and some launches hang the UI thread outright (
Not Responding). Counting healthy launches (bridge alive,get_static_inforeturningcuda: True):file://and HTTP)So this PR prefers the Qt backend on Windows when PySide6 is importable, and silently falls back to the previous behaviour when it is not — nothing changes for Linux/macOS, where the GTK/Cocoa backends are already reliable.
Changes
remwmgui.py:webview.start(http_server=True, gui=gui), withgui='qt'chosen onwin32when PySide6 is available.requirements.txt: addPySide6; sys_platform == "win32".requirements.txt: markPyGObjectassys_platform == "linux". On Windows it can never install — the embedded Python fromsetup.ps1ships nolibs/python312.lib, and it also needs GTK/girepository via MSYS2:Nothing in the codebase imports
gi, so this only ever broke Windows installs.Verification
Windows 11, RTX 3050, embedded Python 3.12.7 from
setup.ps1, pywebview 6.2.1.After the fix, reading the live page state:
{ "alpineLoaded": true, "tailwindLoaded": true, "apiMethods": 12, "isLoading": false, "translationKeys": 13, "systemInfo": { "cuda": true, "gpu": "NVIDIA GeForce RTX 3050", "ffmpeg": true, "ram": 44 } }Four consecutive
run.batlaunches were all healthy, and clicking Start Processing in the GUI ran a file end to end (Done! File processed successfully.) with the watermark removed. Video mode was also checked separately via the CLI: two-pass detection over 24 frames, audio stream preserved through FFmpeg.Note
One thing I did not touch, but worth flagging:
ui/index.htmlloads Tailwind, Alpine.js and Google Fonts from CDNs at startup (lines 9–14), so the GUI currently needs internet access to render. Vendoring those two scripts would make it work offline — happy to do that in a separate PR if you want it.Summary by CodeRabbit