Skip to content

fix: harden fan control release build#62

Merged
naufaldi merged 2 commits into
mainfrom
fix/fan-control-release-hardening
Jun 29, 2026
Merged

fix: harden fan control release build#62
naufaldi merged 2 commits into
mainfrom
fix/fan-control-release-hardening

Conversation

@naufaldi

@naufaldi naufaldi commented Jun 29, 2026

Copy link
Copy Markdown
Owner

What Change

  • Added separate direct-distribution and TestFlight/App Store build paths, including tauri.direct.conf.json, tauri.testflight.conf.json, TestFlight entitlements, and package scripts for direct and TestFlight builds.
  • Hardened fan-control command handling so constant RPM, sensor-based mode, auto mode, tray actions, and snapshots share safer backend state flow.
  • Added immediate fan-control sensor snapshot overlay and active preset sync after fan-control changes.
  • Added privileged-helper packaging support behind a helper-binary Cargo feature and helper binary lookup/install improvements.
  • Replaced the hello-world E2E with a fan-control regression that sets Fan 0 to 5000 RPM and returns it to auto.
  • Added component/unit coverage for fan-control controls, distribution behavior, updater behavior, Tauri command wrappers, and a gated real-hardware fan-control smoke script.
  • Updated release/signing docs, CI/release workflow commands, and native macOS UI/design documentation.

Why Change

  • The beta needed a shareable install path while keeping TestFlight/App Store builds away from private macOS APIs and privileged fan-control writes.
  • The fan-control UI could appear to accept a custom RPM while the backend did not prove the target RPM actually applied.
  • A local immediate-refresh path could freeze after changing RPM because fan-control commands held state locks while triggering snapshot refresh.
  • The new flow returns an error when SMC target RPM readback does not match the requested value instead of silently treating the write as successful.
  • The new mocked E2E flow covers the reported 5000 RPM path so future regressions are easier to catch.

Impact

  • Affected areas: macOS Tauri backend commands, SMC writer verification, privileged helper packaging, tray fan controls, fan-control modal/pane UI, TestFlight/direct release configs, CI/release workflows, and fan-control regression tests.
  • Breaking changes: No user-facing API breaking changes. Build commands changed: direct builds should use pnpm tauri:build:direct; TestFlight/CI builds use pnpm tauri:build:testflight.
  • Dependencies: Cargo feature flags added: app-store and helper-binary. No new npm runtime dependency added.
  • Testing: Passed locally: cargo test fan_control_write_helper_releases_locks_before_snapshot_refresh; cargo test target_verification_failure_returns_error; rtk pnpm test (43 tests); rtk pnpm playwright:test (1 E2E); cd src-tauri && rtk cargo test (114 passed, 3 ignored); cd src-tauri && rtk cargo test --features helper-binary (115 passed, 3 ignored); rtk pnpm biome:check (42 files checked). Hardware smoke was not run because it writes real SMC fan settings and is intentionally gated behind FANGUARD_HARDWARE_SMOKE=1.
  • Screenshot/browser evidence: The fan-control flow was verified through Playwright rather than a saved screenshot because the key regression is command completion/state update after changing RPM.

@naufaldi naufaldi changed the title fix: harden fan control release and parchment UI redesign fix: harden fan control release build Jun 29, 2026
Replace is_none_or (Rust 1.82+) with map_or for MSRV 1.77.2 compatibility
and drop needless borrow in tray fan-mode menu item IDs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@naufaldi
naufaldi merged commit d633a10 into main Jun 29, 2026
3 checks passed
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.

1 participant