Home

dev / openkara

publicthedavidweng/OpenKara· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

feat(separation): notify natively when a separation finishes unfocused (#268)

2 months ago

1672daf
Authored
Davy7/26/2026, 11:28:48 PM
* feat(separation): notify natively when a separation finishes unfocused

Separation is minutes of ONNX inference and users routinely switch
away. Completion was surfaced only through the in-app notification
store, which is invisible while the window is in the background.

Adopt tauri-plugin-notification and post a native notification from the
three moments that matter: a fresh single-song completion, a separation
failure, and a batch completion. A cache hit is deliberately excluded -
it returns before the user could switch away, so notifying would be
noise for an operation that took no time. Cancellations are excluded
too: the user issued them.

Permission is requested lazily at the first unfocused completion rather
than at launch, so the app does not raise the macOS prompt for a
capability the user has not exercised yet. Denial degrades silently.

songDisplayTitle moves to src/lib/song-display.ts instead of gaining a
fourth copy of the title/file-name/hash fallback, and it now splits on
both path separators - the "/"-only split rendered every Windows path
in full.

Closes #262

* fix(separation): keep a background batch to one notification

A batch emits a per-song terminal event for every song it separates, on
top of its own summary event, so a 30-song batch run in the background
posted 31 native notifications - the exact scenario this feature exists
to keep calm.

Gate the per-song alerts on no batch being in progress, mirroring the
branch the in-app progress bar already takes.

Parent4e3bb64

35 files changed
  • README.md+1−0
  • README_CN.md+1−0
  • package.json+1−0
  • packaging/flatpak/generated/cargo-sources.json+52−0
  • packaging/flatpak/generated/node-sources.0.json+8−1
  • pnpm-lock.yaml+10−0
  • src-tauri/Cargo.lock+59−0
  • src-tauri/Cargo.toml+1−0
src-tauri/capabilities/default.json
+1
−0
  • src-tauri/src/lib.rs+4−0
  • src/components/Layout/GlobalProgressBar.tsx+3−4
  • src/components/Library/SongListItem.tsx+6−9
  • src/hooks/use-playback-runtime.test.tsx+93−0
  • src/hooks/use-playback-runtime.ts+46−2
  • src/lib/notifications.test.ts+84−0
  • src/lib/notifications.ts+41−0
  • src/lib/song-display.test.ts+55−0
  • src/lib/song-display.ts+16−0
  • src/locales/de.json+6−0
  • src/locales/en.json+6−0
  • src/locales/es.json+6−0
  • src/locales/fr.json+6−0
  • src/locales/id.json+6−0
  • src/locales/it.json+6−0
  • src/locales/ja.json+6−0
  • src/locales/ko.json+6−0
  • src/locales/nl.json+6−0
  • src/locales/pl.json+6−0
  • src/locales/pt-BR.json+6−0
  • src/locales/ru.json+6−0
  • src/locales/th.json+6−0
  • src/locales/tr.json+6−0
  • src/locales/vi.json+6−0
  • src/locales/zh-CN.json+6−0
  • src/locales/zh-TW.json+6−0