Skip to content

Enhance notifications to avoid duplicates during auto search cycles#780

Merged
Doezer merged 2 commits into
release/1.4.0from
avoid-duplicate-notifications
Jul 7, 2026
Merged

Enhance notifications to avoid duplicates during auto search cycles#780
Doezer merged 2 commits into
release/1.4.0from
avoid-duplicate-notifications

Conversation

@Doezer

@Doezer Doezer commented Jul 7, 2026

Copy link
Copy Markdown
Owner

This pull request improves notification logic for game availability and updates, ensuring users are only notified when new results become available (i.e., on a false→true transition), rather than on every search cycle. It also updates the UI to clarify notification behavior when preferred release groups are enabled, and adds comprehensive tests to verify deduplication and gating logic.

Notification deduplication and transition gating:

  • Only send "Game Available", "Multiple Results Found", and "Game Updates Available" notifications when a game transitions from unavailable to available (false→true), preventing repeated notifications on subsequent cycles if the item remains available (server/cron.ts). [1] [2] [3] [4] [5]

Preferred release groups notification logic:

  • Update UI help text to clarify that enabling preferred release groups will also limit notifications to only when a preferred group release is found (client/src/components/PreferredReleaseGroupsSettings.tsx).

Testing and verification:

  • Add extensive tests to ensure notifications are deduplicated correctly, only sent on state transitions, and respect preferred release group settings (server/__tests__/cron_autosearch.test.ts).

@Doezer Doezer added this to the 1.4.0 milestone Jul 7, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request implements notification deduplication (transition gating) in the auto-search cron job, ensuring that availability and update notifications are only triggered on a false-to-true transition rather than on every cycle. It also updates the frontend settings description and adds comprehensive test coverage. Feedback points out a potential issue where the shared searchResultsAvailable flag is not reset when a game transitions from wanted to owned, which could cause users to miss the first update notification.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread server/cron.ts
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
server/storage.ts 40.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb2fb739d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server/cron.ts
Doezer added 2 commits July 7, 2026 10:18
The flag is reused for two meanings (main release available for
wanted games, update available for owned games) and was never reset
on the wanted -> owned/downloading transition, silently suppressing
the first genuine "Game Updates Available" notification. Resolves
gemini-code-assist and chatgpt-codex-connector review comments on
PR #780.
@Doezer Doezer force-pushed the avoid-duplicate-notifications branch from cb2fb73 to e556dcd Compare July 7, 2026 16:04
@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

@Doezer Doezer merged commit fc2ee89 into release/1.4.0 Jul 7, 2026
11 checks passed
@Doezer Doezer deleted the avoid-duplicate-notifications branch July 7, 2026 16:16
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.

1 participant