feat(app): 답변 완료 알림 — 창 안 보고 있으면 토스트 + 트레이 점

- 프론트: 스트림 onDone 에서 chat.done(title) 한 번. 브라우저에선 no-op
- Rust shell/notify: 창 보이고 포커스면 아무것도 안 함. 아니면 Windows 토스트(tauri-plugin-notification)
  + 트레이 아이콘을 점 찍힌 tray-alert.png 로. 창 Focused(true) 에서 원복
- 토스트는 설치본(msi)에서만 알림센터에 등록돼 보임. dev 에선 트레이 점으로 확인

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
lee-hyeon-cheol
2026-09-21 14:13:40 +09:00
co-authored by Claude Fable 5.1
parent eb74de2634
commit 89fc8fab45
12 changed files with 5522 additions and 5320 deletions
+6
View File
@@ -59,6 +59,7 @@ pub fn run() {
.build(),
)
.plugin(tauri_plugin_global_shortcut::Builder::new().build())
.plugin(tauri_plugin_notification::init())
.manage(commands::RouteState::default())
.manage(paste::PasteState::default())
.manage(window::TemporaryWindowState::default())
@@ -73,6 +74,7 @@ pub fn run() {
commands::snippets_update,
commands::snippets_delete,
commands::snippets_record_use,
commands::chat_done,
])
.setup(|app| {
let handle = app.handle().clone();
@@ -103,6 +105,10 @@ pub fn run() {
Ok(())
})
.on_window_event(|window, event| {
// 창을 다시 보면 트레이 "새 답변" 점 원복.
if matches!(event, tauri::WindowEvent::Focused(true)) {
shell::notify::seen(window.app_handle());
}
if matches!(event, tauri::WindowEvent::CloseRequested { .. }) {
if let Err(error) = window::restore_size(window.app_handle()) {
eprintln!("[window] {error}");