Blogging prompt notifications never report dismissals
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 79/100
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
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.notificationCategoryOptionsreturns[.customDismissAction]for.bloggingPrompt.notificationCategory()never uses it. It always passes empty options:options: UNNotificationCategoryOptions().- So iOS never reports a dismissal. The
UNNotificationDismissActionIdentifierbranch inhandleLocalNotificationAction, which trackspromptsNotificationDismissed, 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_dismissedappears 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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wordpress-mobile/WordPress-iOS
-
[Pri] Low [Status] Ready for Dev [Type] Bug /Me
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
wordpress-mobile/WordPress-iOS#26279 · 1 comment ·
Maintainers usually reply within 1 day
-
[Pri] Low [Status] Ready for Dev [Type] Bug Share Extension
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
wordpress-mobile/WordPress-iOS#26276 · 1 comment ·
Maintainers usually reply within 1 day
-
[Status] Ready for Dev [Type] Bug Reader
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
wordpress-mobile/WordPress-iOS#26254 · 2 comments ·
Maintainers usually reply within 1 day
-
[Type] Bug Posts + Pages UI
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
wordpress-mobile/WordPress-iOS#26232 · 1 comment ·
Maintainers usually reply within 1 day
-
[Type] Tech Debt Site Creation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
wordpress-mobile/WordPress-iOS#26113 · 3 comments ·
Maintainers usually reply within 1 day
All issues in wordpress-mobile/WordPress-iOS
Similar issues
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
simulator-session.yml の simtunnel の固定先が古く、agentd が無いため simtunnel up --wait / status が準備完了を検知できないOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Ebullioscopic/Atoll#900 ·
Maintainers usually reply within 2 days