fix(desktop): ask before quitting from the macOS Dock or at logout and shutdown

Open
#98 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
tauri
Domain
desktop

Research direction

Read apps/desktop/src/window-close.ts and the window-close work in #67, then verify how Tauri 2.13 and tao 0.38 handle termination on macOS, Windows, and Linux. Check whether a runtime hook or native change in the desktop host can intercept each shutdown path; done means real-system checks for all listed paths, with tests or recorded manual evidence and documentation for any unavoidable limitation.

Written by the indexing model from the issue text.

Description

Problem

Dewee Desktop asks before closing when unsent messages or drafts would be lost (apps/desktop/src/window-close.ts, the window-close prompt from #67). Some ways of ending the app never reach that prompt:

  • macOS: the Dock's Quit, and logging out, restarting or shutting down. These send terminate: straight to the app, not through the menu. The runtime (Tauri 2.13 / tao 0.38) has no applicationShouldTerminate: hook and reports only the final RunEvent::Exit, which cannot be prevented. Cmd+Q and the app menu's Quit are covered by #67: they close the main window, so the prompt answers.
  • Windows and Linux: logging off or shutting down the system. These are not covered either.

Today the impact is small: stable desktop builds have no sign-in adapter yet, so no real user has unsent work kept on the device. It matters once desktop sign-in ships.

Expected

Wherever the OS allows it, ending the app while unsent work would be lost either asks first, or the work survives (for example, kept for the same verified identity). Where neither is possible, the limitation is documented.

Done means

  • macOS Dock Quit and logout either ask first or are documented as unavoidable, based on a real Mac run.
  • Windows and Linux logoff and shutdown are checked on real systems.
  • Tests or recorded manual evidence for each path.

This needs a runtime hook the app cannot add today, or a native change in this repo's desktop host. Verify the runtime's current behaviour before planning.

Dominant language
No language data
Stars
1
Forks
2
Avg merge
1h 51m
Merged PRs (30d)
103

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextlevelbuilder/dewee-desktop-app

All issues in nextlevelbuilder/dewee-desktop-app

Similar issues

More Desktop Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.