status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
287 stars 78 forks source link

Onboarding prompts the user to turn on notifications but no native macOS notification request is issued #16218

Open benjthayer opened 2 weeks ago

benjthayer commented 2 weeks ago

Issue: When the user reaches the below point in the onboarding flow, they are encouraged to allow notifications. However, the macOS request doesn't appear to be issued.

desktop-notification

Expected behaviour: Unsure exactly what the intention was here but it seems logical that either while on this step or the next, the macOS notification request prompt should be issued to the user.

cc @anastasiyaig @igor-sirotin

igor-sirotin commented 2 weeks ago

@benjthayer @anastasiyaig I think it was intended to be like this. Though now I would just consider this as a bug 🙂

How it should be IMO

WHEN this is the first time you run the app
AND there're no notifications settings for Status found in MacOS
THEN request OS to accept/deny notifications
ELSE skip this onboarding screen

Such popup looks like this now (MacOS 14.6):

Screenshot 2024-08-30 at 11 32 55

Why we don't see it now

There're 2 reasons.

  1. You definitely won't see any popups, if you've already run the app previously and accepted/denied the notifications.

    This can be checked in Settings → Notifications. If you see Status here, then all notifications will already be allowed or blocked.

    Screenshot 2024-08-30 at 12 10 21
  2. Seems that we don't do anything about notifications when clicking Start using Status 🙂

    Call stack The button is pressed here: https://github.com/status-im/status-desktop/blob/ee770257c585bcffd72a315ecd974f284cac3e03/ui/app/AppLayouts/Onboarding/views/AllowNotificationsView.qml#L73 https://github.com/status-im/status-desktop/blob/ee770257c585bcffd72a315ecd974f284cac3e03/src/app/modules/startup/internal/notification_state.nim#L11-L13 https://github.com/status-im/status-desktop/blob/ee770257c585bcffd72a315ecd974f284cac3e03/src/app/modules/startup/controller.nim#L643-L644 https://github.com/status-im/status-desktop/blob/ee770257c585bcffd72a315ecd974f284cac3e03/src/app/boot/app_controller.nim#L480-L487 I don't see anything related to specific notifications here (but I didn't dig much).
igor-sirotin commented 2 weeks ago

btw, I couldn't make MacOS to reset notification settings for Status app. It should be possible somehow with tccutil, but it didn't work for me.

Useful links: