Skip to content

app: build and run Onde Desktop on Windows - #63

Merged
setoelkahfi merged 6 commits into
fix/app-version-0.6.1from
feature/app-windows-build
Nov 30, 2026
Merged

setoelkahfi merged 6 commits into
fix/app-version-0.6.1from
feature/app-windows-build

Conversation

@setoelkahfi

Copy link
Copy Markdown
Collaborator

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-build fails on Windows without one. It is cut from the macOS tile with the padding removed, so it fills the taskbar slot.
  • Chooser: on Windows (and Linux) the folder and file picker now uses tauri-plugin-dialog, called from Rust only. Dataset import and linking a folder returned an error on those platforms before. The webview still gets no dialog: permission, so capability_tests.rs is unchanged.
  • Keep awake: a training run calls SetThreadExecutionState so Windows does not sleep mid-run. There is a test for it.
  • Copy: "on this Mac" becomes "on this computer".
  • 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.
  • CI: a new desktop-app job for packaging/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 warnings on macOS in src-tauri, and check-tauri-config.mjs with the version mismatch from Desktop app is 0.6.0 while the workspace crate is 0.6.1 #62 as its only complaint.
  • Not run locally: the Windows build and the test suite (the disk filled up, and cargo xwin could not fetch the SDK). The new desktop-app job is the first Windows build of the app.

@setoelkahfi setoelkahfi self-assigned this Nov 25, 2026
@setoelkahfi
setoelkahfi requested a review from paydii November 25, 2026 10:23

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread packaging/app/src-tauri/src/picker.rs Resolved

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@setoelkahfi
setoelkahfi force-pushed the feature/app-windows-build branch from 0aa518d to 4eaf29e Compare November 25, 2026 10:30
@setoelkahfi
setoelkahfi changed the base branch from development to fix/app-version-0.6.1 November 25, 2026 10:30

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread .github/workflows/ci.yml Resolved

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

setoelkahfi and others added 6 commits November 26, 2026 00:27
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>
@setoelkahfi
setoelkahfi force-pushed the feature/app-windows-build branch from b548b66 to 2492072 Compare November 25, 2026 23:27

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 densen1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reviewed the changes and seen windows os as a newly added target. The approach looks good overall .

@setoelkahfi
setoelkahfi merged commit aa7a756 into development Nov 30, 2026
9 checks passed
@setoelkahfi
setoelkahfi deleted the feature/app-windows-build branch November 30, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants