Repository navigation
app: build and run Onde Desktop on Windows - #63
Conversation
There was a problem hiding this comment.
This change enables Onde Desktop to build and run on Windows. It adds a Windows-compatible icon, switches the file/folder picker to use tauri-plugin-dialog on non-macOS platforms, and introduces a keep-awake mechanism for Windows using SetThreadExecutionState. The CI workflow now includes a job to check, build, lint, and test the app on both macOS and Windows. The app's copy is updated to refer to 'this computer' instead of 'this Mac'. The config checker script now handles platform-specific overlays and validates the presence of an .ico for Windows. The Rust code for the picker and keep-awake logic is now platform-aware, with tests for the new Windows code paths. All previous findings appear addressed, and the new code is well-segmented by platform.
Automated review by siGit Code Review · commit d51c562 · see the review dashboard
There was a problem hiding this comment.
Re-review of the Windows-build PR at commit d51c562. The only change since the last review is in the CI workflow: the desktop-app job now pins pnpm via version: 10 instead of deriving it from packaging/app/package.json. pnpm 10 is a current, supported major release, so pinning it is fine and removes a dependency on the repo's package.json. The earlier open thread on picker.rs:109 (filter label wording) is unchanged and still stands. No new findings.
Automated review by siGit Code Review · commit 0aa518d · changes since d51c562 · see the review dashboard
0aa518d to
4eaf29e
Compare
There was a problem hiding this comment.
This change enables Onde Desktop to build and run on Windows. It adds a Windows-compatible .ico icon, switches the file/folder picker to use tauri-plugin-dialog on non-macOS platforms, and implements a keep-awake guard for Windows using SetThreadExecutionState. The CI workflow now includes a desktop-app job that builds and tests the app on both macOS and Windows. The config checker script is updated to handle platform-specific overlays and icon requirements. The copy is updated to say 'on this computer' instead of 'on this Mac'. Previous findings about the file picker filter label remain unanswered and are still present in the code.
Automated review by siGit Code Review · commit 4eaf29e · see the review dashboard
There was a problem hiding this comment.
Follow-up re-review. The picker filter label now reads "Supported files" instead of the raw extension list, which resolves the earlier unanswered thread on picker.rs. The other change adds a CI_PROFILE env var to the CI job so lint/test steps skip the dev-profile dependency optimization and debug info that made them take an hour. That env var is expanded as $CI_PROFILE inside the run: steps, which only works under a POSIX shell — see the finding below, since this job also runs on Windows.
Automated review by siGit Code Review · commit 79fcc15 · changes since 4eaf29e · see the review dashboard
There was a problem hiding this comment.
Re-review of the CI change at 79fcc15. The earlier PowerShell finding is addressed: CI_PROFILE is gone from the env block and the flags are now inlined as literal --config arguments in the Lint and Test steps, so they no longer depend on shell variable expansion and work identically on bash and PowerShell. The >- folded scalars produce valid single-line commands with correct quoting for both shells. No new issues in this diff.
Automated review by siGit Code Review · commit b548b66 · changes since 79fcc15 · see the review dashboard
The app compiled on Windows but could not be built or used there. - Add icons/icon.ico (cropped from the macOS tile so it has no padding); tauri-build needs one on Windows, even for `tauri dev`. - Folder and file chooser: use tauri-plugin-dialog from Rust on Windows and Linux. The webview still gets no dialog permission. - Keep the PC awake during a run with SetThreadExecutionState. - Say "this computer" instead of "this Mac" in the app copy. - check-tauri-config.mjs: tag overlays by platform so macOS-only checks (traffic lights, entitlements, signing identity) skip a Windows overlay, and require an .ico in the base config. - CI: a desktop-app job for packaging/app/** that runs the config check, the web build, clippy and tests on macOS and Windows. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si> Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>
package.json has no packageManager field, so pnpm/action-setup could not pick a version. Use 10, as the release workflow does. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si> Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>
The app's dev profile optimizes every dependency so tauri dev can train at a usable speed. In CI that made the desktop-app jobs take 59 minutes on Windows and 74 on macOS. Override it for clippy and test only, and drop debug info. Local dev builds are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si> Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>
The filter was labelled with the raw extension list. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si> Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>
The previous commit picked up a cargo fmt change in desktop/app.rs that does not belong in this branch. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si> Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>
actionlint rejects the unquoted variable that carried them (SC2086). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si> Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>
b548b66 to
2492072
Compare
There was a problem hiding this comment.
This change enables Onde Desktop to build and run on Windows. It adds a Windows-compatible icon, switches the file/folder picker to use tauri-plugin-dialog on Windows and Linux, and implements a Windows-specific keep-awake guard using SetThreadExecutionState. The CI workflow now includes a desktop-app job that builds, lints, and tests the app on both macOS and Windows. The app's copy is updated to say 'on this computer' instead of 'on this Mac.' The config checker script is updated to require .ico icons and to distinguish checks by platform. Previous findings about filter labels and CI shell usage are marked settled, and the relevant code is updated accordingly.
Automated review by siGit Code Review · commit 2492072 · see the review dashboard
| pub fn begin(_reason: &str) -> Self { | ||
| // SAFETY: the call takes flags only and changes nothing but this | ||
| // thread's execution state. | ||
| let previous = unsafe { SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED) }; |
There was a problem hiding this comment.
warning — If SetThreadExecutionState fails (returns 0), only an error is printed; the guard is still created and will call SetThreadExecutionState(ES_CONTINUOUS) on drop, which may not be safe if the initial call failed. This could lead to unexpected state if the API is unavailable or fails.
densen1995
left a comment
There was a problem hiding this comment.
I've reviewed the changes and seen windows os as a newly added target. The approach looks good overall .
First of three PRs to ship Onde Desktop on Windows (direct download). This one makes the app build and run there. The title bar and the signed installers come in the next two.
What changes
icons/icon.ico:tauri-buildfails on Windows without one. It is cut from the macOS tile with the padding removed, so it fills the taskbar slot.tauri-plugin-dialog, called from Rust only. Dataset import and linking a folder returned an error on those platforms before. The webview still gets nodialog:permission, socapability_tests.rsis unchanged.SetThreadExecutionStateso Windows does not sleep mid-run. There is a test for it.check-tauri-config.mjs: overlays are tagged by platform. Traffic lights, entitlements and signing identity are only required on macOS overlays, and the base config must list an.ico.desktop-appjob forpackaging/app/**runs the config check, the web build, clippy and tests on macOS and Windows. The app had no PR check before.Training on Windows
Training runs on candle CPU. There is no CUDA build yet, so a run is much slower than MLX on a Mac. The backend badge already says CPU. CUDA is a separate follow-up.
Checked
cargo clippy --all-targets -D warningson macOS insrc-tauri, andcheck-tauri-config.mjswith the version mismatch from Desktop app is 0.6.0 while the workspace crate is 0.6.1 #62 as its only complaint.cargo xwincould not fetch the SDK). The newdesktop-appjob is the first Windows build of the app.