System Tray Icon and Menu rework #330

Closed
opened 2026-10-09 10:42:17 -04:00 by Salastil · 3 comments
Owner

image.png

Currently the system tray icon is very bland, does not inform very well in a manner that respects system theming when we have a mention and the right click menu is centered more around debugging than usefulness for a user.

Restart should exist, but it should be a command to restart both the daemon and moho.

![image.png](/attachments/a1f29276-f1e2-4bb3-8775-e2ba4f3c73e1) Currently the system tray icon is very bland, does not inform very well in a manner that respects system theming when we have a mention and the right click menu is centered more around debugging than usefulness for a user. Restart should exist, but it should be a command to restart both the daemon and moho.
Salastil added this to the v1.0 milestone 2026-10-09 10:42:17 -04:00
Author
Owner

Finished: 24106e5.

before and after

The tray icon and its menu are reworked. The picture is built from the real icon files and the menu's real labels, because a tray can't be photographed from inside the app.

Icon

  • It is drawn for the system's colour scheme: a light bubble on a dark panel, a dark one on a light panel, and it is redrawn when the scheme changes.
  • With something waiting, a red badge carries the number (1-9, then 9+). A mention in a channel lights it as well as a direct message; before, only direct messages and pinned conversations did.
  • The tooltip says what is waiting, e.g. "moho - 2 direct messages, 1 mention". The existing badge setting still switches the count off.

Menu

  • First line: what is new (clicking it opens the newest waiting conversation), or "Nothing new".
  • Show/Hide moho (says which), Status (Online, Idle, Do not disturb, Invisible, applied to every account, with the current one checked), Desktop notifications (the same setting as in Settings), Settings, Restart moho, Quit.
  • Restart daemon and Stop daemon are gone from the tray. Restart daemon is still in Settings; Stop daemon has no other entry, since Quit already stops the daemon and a stopped daemon with moho still open is not a state anyone wants. Restart moho quits cleanly, which already stops the daemon, and starts moho again with a daemon of its own.

Checked: npm run test:tray (new, also in the release workflow) drives the real app: it reads the icon, tooltip and menu for each state and presses Settings, a status, the notifications switch and Restart moho. The restart comes back as a new process with a new daemon and the old one gone. I did not try Restart moho from the installed AppImage itself, which relaunches by the AppImage's own path; that is worth a click.

Finished: [24106e5](https://git.salastil.com/Salastil/moho/commit/24106e51f4ab565eef6ad1b0a80c85da19ffcc13). ![before and after](https://git.salastil.com/attachments/d0e5fa96-3c98-4ed2-9aa0-5a56f6be6c80) The tray icon and its menu are reworked. The picture is built from the real icon files and the menu's real labels, because a tray can't be photographed from inside the app. **Icon** - It is drawn for the system's colour scheme: a light bubble on a dark panel, a dark one on a light panel, and it is redrawn when the scheme changes. - With something waiting, a red badge carries the number (1-9, then 9+). A mention in a channel lights it as well as a direct message; before, only direct messages and pinned conversations did. - The tooltip says what is waiting, e.g. "moho - 2 direct messages, 1 mention". The existing badge setting still switches the count off. **Menu** - First line: what is new (clicking it opens the newest waiting conversation), or "Nothing new". - Show/Hide moho (says which), Status (Online, Idle, Do not disturb, Invisible, applied to every account, with the current one checked), Desktop notifications (the same setting as in Settings), Settings, Restart moho, Quit. - Restart daemon and Stop daemon are gone from the tray. Restart daemon is still in Settings; Stop daemon has no other entry, since Quit already stops the daemon and a stopped daemon with moho still open is not a state anyone wants. **Restart moho** quits cleanly, which already stops the daemon, and starts moho again with a daemon of its own. **Checked:** `npm run test:tray` (new, also in the release workflow) drives the real app: it reads the icon, tooltip and menu for each state and presses Settings, a status, the notifications switch and Restart moho. The restart comes back as a new process with a new daemon and the old one gone. I did not try Restart moho from the installed AppImage itself, which relaunches by the AppImage's own path; that is worth a click.
Salastil reopened this issue 2026-10-09 11:02:27 -04:00
Author
Owner

Remove the "Desktop Notifications" item as we cover this with the "Do not Disturb" status setting. If DND does not disable moho creating desktop notifications it should be implemented.

Remove the "Desktop Notifications" item as we cover this with the "Do not Disturb" status setting. If DND does not disable moho creating desktop notifications it should be implemented.
Author
Owner

Finished: 53fb0f3.

the tray after this change

Both changes from the comment:

  • Desktop notifications removed from the tray menu. Do not disturb in Status is the one switch for quiet.
  • Do not disturb now silences moho's desktop notifications. It did not before: nothing in the app looked at an account's status when deciding to show one. Now an account that is set to Do not disturb shows no popup and plays no sound, and the taskbar flash is held back too. Other accounts are unaffected. What arrives still counts as unread, so the tray number and the badge stay accurate, and the conversation is there when you look.

The status reaches the notifier for each account separately, so setting one account to Do not disturb from its own status control silences only that account; setting it from the tray sets every account. Checked by unit tests (a Do not disturb account shows nothing but still counts; another account still notifies) and by npm run test:tray, which now also checks that the menu has no notifications switch. I have not seen a real desktop notification suppressed on a live account.

Finished: [53fb0f3](https://git.salastil.com/Salastil/moho/commit/53fb0f34cebf4e9759ba1c2ffd0101a2d2e8a699). ![the tray after this change](https://git.salastil.com/attachments/8b9e18f7-42c0-495a-ad9b-e9d693b4568a) Both changes from the comment: - **Desktop notifications removed from the tray menu.** Do not disturb in Status is the one switch for quiet. - **Do not disturb now silences moho's desktop notifications.** It did not before: nothing in the app looked at an account's status when deciding to show one. Now an account that is set to Do not disturb shows no popup and plays no sound, and the taskbar flash is held back too. Other accounts are unaffected. What arrives still counts as unread, so the tray number and the badge stay accurate, and the conversation is there when you look. The status reaches the notifier for each account separately, so setting one account to Do not disturb from its own status control silences only that account; setting it from the tray sets every account. Checked by unit tests (a Do not disturb account shows nothing but still counts; another account still notifies) and by `npm run test:tray`, which now also checks that the menu has no notifications switch. I have not seen a real desktop notification suppressed on a live account.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#330