Skip to content

fix(google-chat) - fix(alibaba-chat) update unread badge - #698

Open
dansleboby wants to merge 2 commits into
ferdium:mainfrom
dansleboby:main
Open

fix(google-chat) - fix(alibaba-chat) update unread badge#698
dansleboby wants to merge 2 commits into
ferdium:mainfrom
dansleboby:main

Conversation

@dansleboby

Copy link
Copy Markdown

Pre-flight Checklist

Please ensure you've completed all of the following.

Description of Change

Add a MutationObserver to detect unread badge changes in Google Chat and recalculate the Ferdium badge immediately. DOM mutations are batched with requestAnimationFrame to avoid redundant badge updates. The existing Ferdium loop is kept as a fallback. The aggregate Shortcuts section is still ignored to prevent unread messages from being counted twice.

@dansleboby dansleboby changed the title fix(google-chat): update unread badge on DOM changes fix(google-chat) - fix(alibaba-chat) update unread badge Jun 17, 2026

@SpecialAro SpecialAro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes! The Alibaba Chat and ClickUp changes look reasonable, but I think this PR needs a small update before merging.

The Google Chat change has now been superseded by #701, which is already merged and uses a simpler unread-count implementation. Could you please rebase this PR and drop the Google Chat changes to avoid overwriting the newer fix?

Also, please bump the recipe versions for Alibaba Chat and ClickUp. Ferdium relies on recipe version bumps to distribute updated recipes to users.

With those changes, this should be in good shape.

dansleboby and others added 2 commits September 8, 2026 19:44
Update the Ferdium badge logic to select the last .option-item in the
inbox panel and read its .item-unread-num value.

The unread value is now safely parsed as an integer, with empty or
invalid values defaulting to 0.

Bump the recipe version so Ferdium distributes the update.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RwKCaAEp95nLcryQMErnp4
The previous badge logic relied on the .cu-notification-alert__dot
element, which no longer reflects unread chat messages. Read the value
from the sidebar chat counter instead and report the actual number of
unread messages rather than a binary 1/0.

Bump the recipe version so Ferdium distributes the update.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RwKCaAEp95nLcryQMErnp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants