Skip to content

TUI: Default notification on Windows uses the Windows error chime (BEL → default beep) #583

@Hmbown

Description

@Hmbown

User report (Simplified Chinese)

每当 ds tui 完成任务时,它的提示音跟 windows 默认提示音一样,这就跟我以前画施工图时某个软件弹窗报错的提示音一模一样,听起来很不爽,有没有办法修改

Translation: "Every time ds tui completes a task, its notification sound is the same as the Windows default chime — identical to the error-popup sound from a piece of CAD/construction-drawing software I used to use. It sounds really unpleasant. Is there a way to change it?"

Root cause

crates/tui/src/tui/notifications.rs ships Method::Auto as the default. resolve_method() only promotes to Osc9 for TERM_PROGRAM ∈ {iTerm.app, Ghostty, WezTerm} — every other terminal (including Windows Terminal, ConHost, PowerShell, MSYS2, Alacritty-on-Windows, …) falls back to Method::Bel, which emits a single \x07 byte.

On Windows, BEL is mapped by the OS audio stack to the system default beep (SystemAsterisk / MB_OK chime), which is the same sound that gets used for application error popups in many native Windows apps. So the post-turn "your task is done" notification ends up sounding like a software error.

The user can already work around this by setting notifications.method = "off" in ~/.deepseek/config.toml, but:

  • It is not discoverable. There is no entry in docs/CONFIGURATION.md or in /config for it.
  • The default should not sound like an error on Windows in the first place.

Suggested fixes (in increasing scope)

  1. Discoverability (cheap, definitely do):

    • Document notifications.method and notifications.threshold_seconds in docs/CONFIGURATION.md.
    • Surface a toggle in /config so users can change it without editing TOML.
    • Mention it in onboarding when a long turn first triggers a notification ("Was that beep annoying? Run /config to disable").
  2. Better default on Windows:

    • On cfg(target_os = "windows"), change Auto's fallback so it does not emit a raw BEL by default.
    • Cheapest path: default to Off on Windows and rely on the visible footer/toast.
    • Slightly bigger: add a Method::Visual that flashes the terminal title or a TUI overlay (no audio).
  3. Native toast on Windows (bigger):

    • Use the notify-rust crate (or tauri-winrt-notification / winrt-notification) to send a real Windows Action Center toast instead of a BEL. This gives the user a non-error sound and a visible card.
    • This crosses an additional dependency boundary, so probably worth a separate scoping conversation before implementing.

Acceptance criteria for v0.8.11

  • notifications.method is documented in docs/CONFIGURATION.md with an explicit Windows note.
  • On Windows, the default behavior no longer emits a raw BEL. Either:
    • default to Off on Windows, or
    • add a non-audible Visual method and make it the Windows default.
  • User can toggle the setting from /config without editing TOML.
  • Existing Auto / Osc9 / Bel / Off behavior on macOS and Linux is unchanged.
  • Tests in crates/tui/src/tui/notifications.rs cover the new Windows path.

References

  • crates/tui/src/tui/notifications.rsMethod, resolve_method, notify_done_to.
  • crates/tui/src/config.rs:348-376, 735-737NotificationsConfig schema.
  • crates/tui/src/tui/ui.rs:927-951 — call site at turn completion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v0.8.11Targeting v0.8.11

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions