Repository navigation
Fix the Windows port, offer the beta at install, and install WebView2 for web wallpapers - #3
Merged
Merged
Conversation
Before: every path haru keeps state in came from XDG_CONFIG_HOME, XDG_DATA_HOME or HOME. Windows sets none of the three outside MSYS or Git Bash, so Config::path(), the overrides file and the engine's data directory all came back None. Settings were lost the moment the app closed, the Wallpaper Engine assets had nowhere to install, and scene wallpapers could not render at all. After: config_home() and data_home() answer with %APPDATA% and %LOCALAPPDATA% on Windows, falling back to %USERPROFILE%\AppData\..., and keep the XDG and macOS rules everywhere else. The three call sites ask them rather than reading variables themselves. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K3w2xdTR76kYV6RA52J4Ag
Before: haru's volume slider is 0-100 and the renderer's --volume and volume command are 0-128 with a default of 15. At launch the flag was left off entirely, so a slider reading full started the wallpaper at about 12%, and then the socket was sent `volume 100` on the wrong scale. An "unlimited" frame rate sent no --fps at all, which gave the renderer its own default of 30. The render-scale slider went down to 0.25, which the socket clamps to 0.5. After: kirie_volume() converts once, --volume and `volume` both carry it, --fps is always sent so 0 means unlimited, `set fps 0` is left out because the socket floors it at 1, and the slider starts at 0.5. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K3w2xdTR76kYV6RA52J4Ag
Before: the Startup-folder entry was a kirie.cmd running `start "" /B`, which runs the renderer inside the script's own console. That console stayed on screen and in the taskbar for the whole session, and closing it -- the obvious thing to do with a stray black window -- killed the wallpaper. Plain `start ""` only moves the window rather than removing it, because the renderer is a console program. After: the entry is a kirie.vbs that calls WScript.Shell.Run with window style 0, so the renderer never gets a window. A kirie.cmd left by an earlier version is swept up on enable and on disable, so it cannot put a second renderer up at login. The cost is a dependency on Windows Script Host, which is enabled on every stock install but can be turned off by policy. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K3w2xdTR76kYV6RA52J4Ag
Before: --screen-root was only ever passed on Linux, so on Windows and macOS the screen name was dropped and one --bg covered every monitor at once. Assigning a wallpaper to the second screen quietly changed both, and the other screen's wallpaper was never sent. The login entry kept only the first screen, so a second monitor came back bare at every login. Stop was broken as well: `taskkill` without /F asks politely by posting WM_CLOSE to the process's top-level windows, and the renderer has none -- its only window is a WS_CHILD parented into Explorer's desktop -- so taskkill found nothing to ask, exited non-zero, and Stop and every Restart reported a failure while the wallpaper stayed up. After: the screen name is sent on every platform and the plan carries every screen rather than the first. The one name the renderer has never heard of is haru's own Desktop stand-in, used before anything has reported the real screens, and that one is still left off. Stop goes straight to /F with /T so the web host goes too; nothing is lost by it, because the renderer removes a stale socket file before binding and has no other state to write on the way out. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K3w2xdTR76kYV6RA52J4Ag
Before: the control socket is one command per line, and a property value is whatever the wallpaper's author typed. A text property or a saved override holding a newline was written straight through, so the command was cut in half and the remainder was parsed as another one. After: ask() folds carriage returns and newlines to spaces before it writes, which covers every command rather than each caller. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K3w2xdTR76kYV6RA52J4Ag
Before: open_link ran `cmd /C start "" <target>` on Windows. Rust quotes an argument there only when it contains a space, so a URL reached cmd unquoted and cmd read the first `&` in it as a command separator. The Steam browser sign-in link ends `...&redir_ssl=1`, so it opened truncated and the sign-in did not work. After: `explorer <target>`, which takes it as one argument with no shell in between and opens https:, steam: and plain directories the same way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K3w2xdTR76kYV6RA52J4Ag
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The window asked for transparency, which Windows' DX12 and Vulkan swapchains cannot give, so winit fell back to DWM blur-behind and resizes flashed black or white with garbage at the edges. It presented without vsync, which tears on a Windows swapchain, and let wgpu take whichever of Vulkan, DX12 or WGL answered first, which depended on the driver. On Windows the window is now opaque, vsynced and DX12 (WGPU_BACKEND still overrides it), and opens at 1120x660 so it fits a 1080p screen at the default 150% scaling instead of putting the paging bar off-screen. Linux and macOS are unchanged. The control-socket hint no longer tells Windows users about $XDG_RUNTIME_DIR. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QJnt7JtdtiqnVCP9GYqUhK
The install prompt only ever fetched the newest stable release, so the only way to get a prerelease was to install stable, find the updater's beta setting and wait for it. The prompt now has an "Install the beta" choice, starting from whatever the updater is set to, and picking it also turns the updater's beta setting on so the install keeps following betas. The WebKit/Chromium choice is only shown on Linux, the one platform that publishes more than one build, and the prompt names the real install folder instead of ~/.local/bin, which was wrong on Windows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QJnt7JtdtiqnVCP9GYqUhK
kirie now shows web wallpapers on Windows in Microsoft Edge WebView2, a system component that Windows 11 ships and most Windows 10 machines have. For the ones that do not, haru can now install it. haru reads the runtime's version from the registry, where Microsoft's guidance says to look. When it is missing, the install-kirie prompt offers to install it too, and Settings > Renderer has an Install WebView2 button. Either one downloads Microsoft's Evergreen bootstrapper, refuses to run it unless it carries a valid Authenticode signature from Microsoft Corporation, and runs it through Start-Process -Verb RunAs, so Windows puts up its administrator prompt and the runtime is installed for every account. Declining the prompt is reported as that, and a failed WebView2 install never undoes a good kirie install. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QJnt7JtdtiqnVCP9GYqUhK
beingsuz
marked this pull request as ready for review
September 26, 2026 00:53
beingsuz
pushed a commit
that referenced
this pull request
Sep 26, 2026
The previous pin, 1b133b6, was tapline #3's branch head, which was cut from 1c5153d and so did not contain tapline #2 (auth token ACL, ffi event loss, SteamAppId message). 8c439f1 is tapline main after #3 merged and carries both. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BjWixYpwMjeckvBT82WjHZ
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.
Before: on Windows, nothing haru saved survived closing the app. Every path it keeps state in came from
XDG_CONFIG_HOME,XDG_DATA_HOMEorHOME, and Windows sets none of the three outside MSYS or Git Bash, so the config file, the overrides file and the engine's data directory all resolved to nothing. The assets had nowhere to install and scene wallpapers could not render at all. The login entry put a console window on screen for the whole session, and closing it — the obvious thing to do with a stray black window — killed the wallpaper. Stop and Restart reported a failure while the wallpaper stayed up. Assigning a wallpaper to the second monitor changed both, and at the next login only one monitor came back. The Steam sign-in link opened truncated. A full volume slider started the wallpaper at about 12%, and a frame-rate slider set to "unlimited" quietly capped it at 30. The window itself drew with blur-behind artefacts and tearing. The first kirie install could only fetch the stable release, and web wallpapers could not run on Windows at all.After:
%APPDATA%and%LOCALAPPDATA%are where settings and data go on Windows, with the XDG and macOS rules untouched everywhere else. The login entry is akirie.vbsthat starts the renderer with no window at all, and sweeps up the oldkirie.cmdso it cannot put a second renderer up beside it. Stop goes straight totaskkill /F /T, because the renderer's only window is a child of Explorer's desktop and there is nothing for a polite close to talk to. Every screen in the plan is named to the renderer on every platform, not only on Linux. Links open throughexplorerrather than throughcmd, which was reading the first&in a URL as a command separator. Volume and frame rate are converted once, inkirie_volume()and inarguments(), to the 0–128 and--fps=0the renderer actually documents. On Windows the window is opaque, vsynced and on DX12. The install-kirie prompt can install the beta. When the machine lacks the Microsoft Edge WebView2 Runtime, which kirie now uses for web wallpapers on Windows (kirie #9), haru offers to install it behind Windows' administrator prompt.This is the single haru PR. The WebView2 work was briefly #4, which shows as merged only because its commit now lives on this branch.
What this changes
Windows port fixes
Nine fixes, all found by reading the Windows port against the Win32 and renderer documentation and by cross-compiling it for the first time. Seven are Windows-only. Two — the volume scale and the render-scale floor — were wrong on every platform. A tenth keeps a newline inside a wallpaper property from splitting the socket command in two.
The one judgement call worth flagging: the login entry now depends on Windows Script Host. It is present and enabled on every stock Windows install, but an administrator can turn it off by policy, and then nothing comes up at login. The alternative is the console window, which is worse and which any user would close.
The window on Windows
The window asked for transparency, which Windows' DX12 and Vulkan swapchains cannot give, so winit fell back to DWM blur-behind and resizes flashed black or white with garbage at the edges. It presented without vsync, which tears, and wgpu took whichever of Vulkan, DX12 or WGL answered first, which depended on the driver. On Windows the window is now opaque, vsynced and DX12 (
WGPU_BACKENDstill overrides it). It opens at 1120×660 so it fits a 1080p screen at the default 150% scaling. Linux and macOS are unchanged. These are the likeliest causes of the "visual bugs" reported on v0.6.5, but no screenshot has confirmed it.Install the beta from the first prompt
The install-kirie prompt has an "Install the beta" choice, starting from whatever the updater is set to. Picking it also turns the updater's beta setting on, so the install keeps following betas. The WebKit/Chromium choice is shown only on Linux, the one platform that publishes more than one build. The prompt names the real install folder instead of
~/.local/bin, which was wrong on Windows.WebView2 for web wallpapers
haru_apply::webview2::installed()reads the runtime'spvvalue from the registry keys Microsoft's guidance names (per-machine in both registry views, and per-user). An empty value or0.0.0.0counts as not installed.Get-AuthenticodeSignature, thenStart-Process -Verb RunAs -Waitwith/silent /install. A declined prompt, a bad signature and a failed installer each come back as their own message.How it was tested
cargo fmt --all,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspaceare clean on Linux: 171 tests. The same clippy run is clean forx86_64-pc-windows-gnu.Tests that fail without the fix, or pin the new behaviour:
every_screen_in_the_plan_is_named_to_the_rendererandthe_stand_in_screen_is_not_named_to_the_renderer;the_volume_reaches_the_renderer_on_its_own_scale;the_beta_choice_starts_where_the_updater_is;regoutput, including keys left behind by an uninstall;Nothing here has been run on Windows. Every Windows claim in this PR is read from the documentation and from the renderer's own
docs/COMMANDS.md, not observed. To watch first on a real machine:.vbslogin entry,taskkill /F /T, and per-screen assignment on two monitors;/silent /install.