Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Blogging prompt notifications never report dismissals

Open Beginner friendly
#26,256 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
79/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
ios, swift
Domain
analytics, mobile

Research direction

Start in WordPress/Classes/Utility/Notifications/InteractiveNotificationsManager.swift, where notificationCategory() currently passes empty options despite .bloggingPrompt defining .customDismissAction. Read handleLocalNotificationAction as well, since handling dismissals may also log a received event. Run the two named NoteCategoryDefinitionTests in Tests/KeystoneTests/Tests/Utility/NoteCategoryDefinitionTests.swift; done means the category requests dismissal reporting and the event behavior is handled as intended.

Written by the indexing model from the issue text.

Description

[Pri] Low [Status] Ready for Dev [Type] Bug Blogging Prompts Notifications

Split from #6254. Dismissing a blogging prompt notification is never reported to the app, so the blogging_reminders_notification_prompt_dismissed event has never been sent.

What happens

The app asks iOS to report dismissals of blogging prompt notifications, but the request never reaches iOS:

  • NoteCategoryDefinition.notificationCategoryOptions returns [.customDismissAction] for .bloggingPrompt.
  • notificationCategory() never uses it. It always passes empty options: options: UNNotificationCategoryOptions().
  • So iOS never reports a dismissal. The UNNotificationDismissActionIdentifier branch in handleLocalNotificationAction, which tracks promptsNotificationDismissed, has never run.

Both lines were added together in 4a03aa458a (May 2022) and haven't changed since. Everything is in WordPress/Classes/Utility/Notifications/InteractiveNotificationsManager.swift.

Failing test

bloggingPromptCategoryRequestsDismissAction fails on trunk (iOS 27 simulator, run 2026-10-27):

Expectation failed: category.options.contains(.customDismissAction)
category.options → UNNotificationCategoryOptions(rawValue: 0)
.customDismissAction → UNNotificationCategoryOptions(rawValue: 1)
Test (new file Tests/KeystoneTests/Tests/Utility/NoteCategoryDefinitionTests.swift)
import Testing
import UserNotifications

@testable import WordPress

struct NoteCategoryDefinitionTests {
    /// The blogging prompt category asks iOS to report dismissals, but the option is
    /// never passed to `UNNotificationCategory`, so iOS never reports them.
    @Test func bloggingPromptCategoryRequestsDismissAction() {
        let category = InteractiveNotificationsManager.NoteCategoryDefinition.bloggingPrompt.notificationCategory()
        #expect(category.options.contains(.customDismissAction))
    }

    @Test func categoriesWithoutListedOptionsHaveNone() {
        let category = InteractiveNotificationsManager.NoteCategoryDefinition.mediaUploadSuccess.notificationCategory()
        #expect(category.options.isEmpty)
    }
}

KeystoneTests is a synchronized folder and already in WordPressUnitTests.xctestplan, so no project changes are needed.

Fix

Pass the options through in notificationCategory():

func notificationCategory() -> UNNotificationCategory {
    UNNotificationCategory(
        identifier: identifier,
        actions: actions.map({ $0.notificationAction() }),
        intentIdentifiers: [],
        options: UNNotificationCategoryOptions(notificationCategoryOptions)
    )
}

Verified: with this one-line change applied locally, both tests pass.

Side effect to handle in the PR: the .bloggingPrompt case in handleLocalNotificationAction tracks bloggingRemindersNotificationReceived at the top for every response. Once dismissals arrive, each dismissal will also log that event. Either move that tracking so it skips dismissals, or keep it and say so in the PR.

How to verify on a device

  • Both tests pass.
  • Turn on blogging prompts, then wait for a prompt reminder (or schedule one for a minute ahead).
  • Swipe it away in Notification Center without opening it.
  • blogging_reminders_notification_prompt_dismissed appears in the debug analytics log.

Not checked on a device or simulator yet.

Dominant language
Swift
Stars
3.9k
Forks
1.2k
Avg merge
1d 20h
Merged PRs (30d)
82

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wordpress-mobile/WordPress-iOS

All issues in wordpress-mobile/WordPress-iOS

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.