Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Chat has sounds. A short warm cue plays for a message in a conversation you have open but aren't looking at, a direct message, a mention of you and an agent finishing something for you, with a soft tick for sending that is off until you turn it on; never for your own messages, a muted conversation, a conversation you are looking at in a window that has the front, or while you have paused notifications, and never twice for one message or more than once in a second and a half. The cues are made by the browser itself in two sets, Soft and Bright, so nothing is downloaded; the Sounds and notifications section of your notification settings turns them on and off, picks the set and the volume, plays each one, and offers desktop notifications for when the window is behind; Do not disturb is the one pause everyone sees, set from the chat sidebar's bell, the settings, or your avatar menu, now with a two-hour choice, and the top bar's bell shows a dot while it's on. Your choices are kept with your account. The sound layer sits behind one small interface so the desktop app can play them natively later. The chat and notifications guides say the rules. | 1 | -- What a person hears when chat moves, kept with their account so a phone, |
| 2 | -- a laptop and the desktop app all sound the same: whether sounds play, which | |
| 3 | -- set, how loud, each cue on or off (`sound_cues` is a JSON object such as | |
| 4 | -- {"message":true,"sent":false}), and whether an open tab shows a system | |
| 5 | -- notification while its window is not in front. A person with no row has | |
| 6 | -- the defaults. Do not disturb is not here: it is the person's presence | |
| 7 | -- (services/notify). See src/sounds.rs. | |
| 8 | CREATE TABLE sound_settings ( | |
| 9 | user_id TEXT PRIMARY KEY REFERENCES users (id) ON DELETE CASCADE, | |
| 10 | sounds_enabled INTEGER NOT NULL DEFAULT 1, | |
| 11 | sound_set TEXT NOT NULL DEFAULT 'soft', | |
| 12 | sound_volume INTEGER NOT NULL DEFAULT 60, | |
| 13 | sound_cues TEXT NOT NULL DEFAULT '{}', | |
| 14 | desktop_toasts INTEGER NOT NULL DEFAULT 0, | |
| 15 | updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) | |
| 16 | ); |