feat(notify): in-app notifications with the app's own sound
OpenSSF Scorecard / Scorecard analysis (push) Waiting to run
CI / Build & test (Node 20) (push) Canceled after 0s
CI / Build & test (Node 24) (push) Canceled after 0s
CI / Build & test (push) Canceled after 0s
CodeQL / Analyze (javascript-typescript) (push) Canceled after 0s
Security / Secret scan (gitleaks) (push) Canceled after 0s
Security / Dependency scan (OSV-Scanner) (push) Canceled after 0s
Security / IaC/config scan (Trivy) (push) Canceled after 0s
Security / License compliance scan (Trivy) (push) Canceled after 0s

The system balloon carries the OS notification sound, which does not belong to
this app, and it only fired while the window was out of focus — with the app
focused nothing appeared at all.

Notifications now surface inside the window, carry the same synthesised timbre
as the rest of the app's sounds, and clicking one opens the channel. The native
balloon is kept for when the window is not visible, since an in-app card
nobody can see is no notification, but it is now silent: the app plays its own
effect instead.

A focused window is notified only about other channels — announcing the
conversation someone is already reading is noise.

Also fixes the Gitea publish cleanup, which silently deleted nothing: it
interpolated an Actions expression inside a bash , and when the pattern
did not match, the loop passed over every asset. The release ended with two
latest.yml files and the updater served the older one, reporting 1.1.0 as
current — an update that exists but is never offered, with no error anywhere.
The filter is plain bash now, logs what it found, and the job fails if more
than one latest.yml survives.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-01 18:57:02 -03:00
co-authored by Claude Opus 5
parent 1a1067bbb6
commit 1fb61377b9
10 changed files with 203 additions and 11 deletions
@@ -0,0 +1,30 @@
import { create } from 'zustand';
export interface InAppNotification {
id: string;
title: string;
body: string;
avatar: string | null;
userId?: string;
channelId?: string;
spaceId?: string;
}
interface State {
items: InAppNotification[];
push: (n: Omit<InAppNotification, 'id'>) => void;
dismiss: (id: string) => void;
}
/** Poucas de cada vez: uma pilha longa cobre a conversa em vez de avisar. */
const MAX_VISIBLE = 3;
export const useInAppNotificationStore = create<State>((set) => ({
items: [],
push: (n) =>
set((s) => ({
items: [...s.items, { ...n, id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}` }]
.slice(-MAX_VISIBLE),
})),
dismiss: (id) => set((s) => ({ items: s.items.filter((i) => i.id !== id) })),
}));