Windows port — Phase 6: scheduling, autostart & notifications#12
Conversation
…sk is not an error) Mirrors the autostart disable (NotFound→Ok). set_schedule(false) returns Ok(false) when no task exists instead of Err, while still surfacing real /Delete failures. (Final-review Minor #1.)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdaabdc8fe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .join("Local") | ||
| }); | ||
| let root = local.join("Temp"); | ||
| clean_root(&root, &root, MIN_AGE_DAYS, apply) |
There was a problem hiding this comment.
Filter Temp directories before scheduled cleanup
When the Windows scheduled task runs with --apply, this path scans %LOCALAPPDATA%\Temp through TempService::scan(), whose directory branch adds every non-empty immediate child directory without applying the min_age_days cutoff (only loose files are age-filtered). With a fresh installer/app temp directory present at the weekly run, clean_root will pass that directory to to_trash, so the scheduled cleanup can remove active recent temp trees rather than only stale files.
Useful? React with 👍 / 👎.
Phase 6 of the Windows port. Autostart via HKCU Run key (winreg); weekly cleanup via schtasks running a user-level (no-UAC) headless cleanup of %LOCALAPPDATA%\Temp; WinRT toast notifications (PowerShell) for the scheduled-cleanup result and the low-space alert.
headless run() now resolves the cleanup root per-OS (clean_root refactor: Linux/macOS ~/.cache unchanged, Windows %LOCALAPPDATA%\Temp). No
windowscrate, nounsafe(winreg + schtasks + PowerShell). Linux/macOS unchanged (cfg-gated). Windows runtime = manual-smoke.