Stop announcing the same email twice

Both notification paths feed one channel, which is how a single arrival
came to be announced twice: Gmail names the sender, then the unread count
says "1 new" behind it seconds later.

A count is now skipped when the app has spoken for itself in the last
twenty seconds - generous, because a count is only noticed on a
four-second tick, well after the app raised its own. Settings can also
turn count notifications off outright, for hearing only what an app says
in its own words, at the cost of the tools that never say anything.

`npm run ship` now updates only /Applications. The Desktop installer
moved behind `--dmg`, for when a build is going to someone else.
This commit is contained in:
2026-09-02 09:36:57 +02:00
parent c989fef6fe
commit aa19da48de
10 changed files with 121 additions and 21 deletions
+15
View File
@@ -305,6 +305,21 @@ export default function Settings({
{notifyStatus && (
<p className={`${HELP} font-mono`}>{notifyStatus}</p>
)}
<div className="flex items-center gap-3 pt-1">
<Segmented<"on" | "off">
value={config.settings.countNotifications ? "on" : "off"}
onChange={(v) => run(() => api.setCountNotifications(v === "on"))}
options={[
{ value: "on", label: "On" },
{ value: "off", label: "Off" },
]}
/>
<span className={HELP}>
Notify from unread counts, for apps that never notify by themselves —
Google Chat is one. A count is skipped when the app has just said the same
thing in its own words, so mail does not arrive twice.
</span>
</div>
<p className={HELP}>
WKWebView defines a notification API that silently does nothing, so it is
replaced with one that forwards to macOS. Notifications raised by a service