Compare commits

...

4 Commits

Author SHA1 Message Date
Solomon
4ff42e0f2c review-feedback: better PowerShell command pattern:
Some checks failed
Create GitHub Pre-Release / tag-check (push) Has been cancelled
Create GitHub Pre-Release / build-frontend (push) Has been cancelled
Create GitHub Pre-Release / build-backend (linux-arm64, ubuntu-latest, aarch64-unknown-linux-gnu) (push) Has been cancelled
Create GitHub Pre-Release / build-backend (linux-x64, ubuntu-latest, x86_64-unknown-linux-gnu) (push) Has been cancelled
Create GitHub Pre-Release / build-backend (macos-arm64, macos-14, aarch64-apple-darwin) (push) Has been cancelled
Create GitHub Pre-Release / build-backend (macos-x64, macos-13, x86_64-apple-darwin) (push) Has been cancelled
Create GitHub Pre-Release / build-backend (windows-arm64, windows-latest-l, aarch64-pc-windows-msvc) (push) Has been cancelled
Create GitHub Pre-Release / build-backend (windows-x64, windows-latest-l, x86_64-pc-windows-msvc) (push) Has been cancelled
Create GitHub Pre-Release / package-npx-cli (vibe-kanban, linux-arm64, aarch64-unknown-linux-gnu) (push) Has been cancelled
Create GitHub Pre-Release / package-npx-cli (vibe-kanban, linux-x64, x86_64-unknown-linux-gnu) (push) Has been cancelled
Create GitHub Pre-Release / package-npx-cli (vibe-kanban, macos-arm64, aarch64-apple-darwin) (push) Has been cancelled
Create GitHub Pre-Release / package-npx-cli (vibe-kanban, macos-x64, x86_64-apple-darwin) (push) Has been cancelled
Create GitHub Pre-Release / package-npx-cli (vibe-kanban.exe, windows-arm64, aarch64-pc-windows-msvc) (push) Has been cancelled
Create GitHub Pre-Release / package-npx-cli (vibe-kanban.exe, windows-x64, x86_64-pc-windows-msvc) (push) Has been cancelled
Create GitHub Pre-Release / create-prerelease (push) Has been cancelled
using -Command with $args[0] parameter passing instead of string interpolation.
2025-06-30 12:27:36 +01:00
Solomon
21bc89d2aa review-feedback: document intential fire-and-forget of sound notifications 2025-06-30 12:27:36 +01:00
Solomon
eb8f4215b7 review-feedback: log current-directory fetching errors 2025-06-30 12:27:36 +01:00
bloop-test-user
d25c92cd0a Task attempt 6fab0cad-0927-4e90-8c71-0acba56eef0b - Final changes 2025-06-30 12:27:35 +01:00

View File

@@ -73,6 +73,7 @@ async fn commit_execution_changes(
/// Play a system sound notification
async fn play_sound_notification(sound_file: &crate::models::config::SoundFile) {
// Use platform-specific sound notification
// Note: spawn() calls are intentionally not awaited - sound notifications should be fire-and-forget
if cfg!(target_os = "macos") {
let sound_path = sound_file.to_path();
let _ = tokio::process::Command::new("afplay")
@@ -101,10 +102,26 @@ async fn play_sound_notification(sound_file: &crate::models::config::SoundFile)
.spawn();
}
} else if cfg!(target_os = "windows") {
let _ = tokio::process::Command::new("powershell")
.arg("-c")
.arg("[System.Media.SystemSounds]::Beep.Play()")
.spawn();
let sound_path = sound_file.to_path();
let current_dir = std::env::current_dir().unwrap_or_else(|e| {
tracing::error!("Failed to get current directory: {}", e);
std::path::PathBuf::from(".")
});
let absolute_path = current_dir.join(&sound_path);
if absolute_path.exists() {
let _ = tokio::process::Command::new("powershell")
.arg("-Command")
.arg("(New-Object Media.SoundPlayer $args[0]).PlaySync()")
.arg(absolute_path.to_string_lossy().as_ref())
.spawn();
} else {
// Fallback to system beep if sound file doesn't exist
let _ = tokio::process::Command::new("powershell")
.arg("-c")
.arg("[System.Media.SystemSounds]::Beep.Play()")
.spawn();
}
}
}