Skip to content

feat: Add unread message badge to system tray icon - #1605

Open
kupietz wants to merge 2 commits into
nextcloud:mainfrom
kupietz:system-tray-unread-badge
Open

feat: Add unread message badge to system tray icon#1605
kupietz wants to merge 2 commits into
nextcloud:mainfrom
kupietz:system-tray-unread-badge

Conversation

@kupietz

@kupietz kupietz commented Dec 21, 2025

Copy link
Copy Markdown

Shows numbered badge (1, 2, 15, 99+) on tray icon when there are unread conversations, respecting notification settings.

Features:

  • Canvas-based badge rendering using offscreen BrowserWindow
  • Respects notification settings per conversation
  • Event-driven updates via store.subscribe() (no polling!)

☑️ Resolves

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

🖼️ Screenshots

🏚️ Before 🏡 After
image image

@kupietz
kupietz force-pushed the system-tray-unread-badge branch 2 times, most recently from fe957d7 to 06f6a62 Compare December 21, 2025 06:54
@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@kupietz
kupietz force-pushed the system-tray-unread-badge branch from 06f6a62 to 590ed01 Compare March 3, 2026 12:11
@nickvergessen
nickvergessen requested a review from ShGKme March 3, 2026 12:25
@kupietz
kupietz force-pushed the system-tray-unread-badge branch from 590ed01 to 693f19b Compare June 14, 2026 13:01
@kupietz

kupietz commented Jun 14, 2026

Copy link
Copy Markdown
Author

Successfully rebased on v2.2.0

@Flofler

Flofler commented Jul 3, 2026

Copy link
Copy Markdown

Could someone please review this merge request? I’ve tested it successfully and it works perfectly. This is a must-have feature for my colleagues and me. We frequently overlook notifications because we don't want to keep the window open all the time—plus, the current setup doesn't work well when using multiple workspaces.

Comment thread src/talk/renderer/TalkWrapper/useBadgeCountIntegration.ts Outdated
@Antreesy Antreesy added enhancement New feature or request design labels Jul 4, 2026
Shows numbered badge (1, 2, 15, 99+) on tray icon when there are
unread conversations, respecting notification settings.

Features:
- Canvas-based badge rendering using offscreen BrowserWindow
- Respects notification settings per conversation
- Event-driven updates via store.subscribe() (no polling!)

(Pertially?) resolves nextcloud#391

Signed-off-by: Marc Kupietz <kupietz@ids-mannheim.de>
@kupietz
kupietz force-pushed the system-tray-unread-badge branch from 693f19b to 793a6c3 Compare August 31, 2026 15:09
@kupietz

kupietz commented Aug 31, 2026

Copy link
Copy Markdown
Author

Call me impatient, but I have now force-pushed the rebased and reworked integration that uses the public talk:unread:updated event =)

It is rebased onto current main, and the relaunchApp lint error from CI is fixed as well.

@miaulalala
miaulalala requested a review from Antreesy September 2, 2026 09:22
@miaulalala

Copy link
Copy Markdown

@ShGKme are there any blockers to merge this?

@miaulalala

Copy link
Copy Markdown

Hey @kupietz , can you add the right AI trailer to the commit? You can find the info on that in the AGENTS.md of this repo.

@miaulalala miaulalala added the AI assisted This PR contains AI-assisted commits label Sep 2, 2026
…ated event

Instead of reaching into Talk's internal Vuex store
(window.OCA.Talk.instance.$store) and subscribing to mutations, subscribe to
the public `talk:unread:updated` event Talk emits. This decouples the desktop
badge from Talk's state management implementation and survives the planned
state-manager migration, as requested in the PR review.

- Badge now shows the total unread message count (event payload `messages`).
- Subscribe before Talk is mounted so the initial (immediate) event is caught.
- Removes the store access, the 500ms polling loop and the `any` casts.

Assisted-by: Claude Code:claude-opus-4-8
Signed-off-by: Marc Kupietz <kupietz@ids-mannheim.de>
@kupietz
kupietz force-pushed the system-tray-unread-badge branch from 793a6c3 to 19924a5 Compare September 2, 2026 12:26
@Antreesy

Antreesy commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

CI might fail on forks, so don't worry. Assisted-by trailer looks correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted This PR contains AI-assisted commits design enhancement New feature or request feedback-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants