Skip to content

Add optional pushProvisioned hint to notification preferences view#82

Merged
anilcancakir merged 2 commits into
mainfrom
feat/notifications-push-hint
Jul 25, 2026
Merged

Add optional pushProvisioned hint to notification preferences view#82
anilcancakir merged 2 commits into
mainfrom
feat/notifications-push-hint

Conversation

@anilcancakir

Copy link
Copy Markdown
Contributor

What

Adds an optional pushProvisioned parameter (default true, backward-compatible) to the notification preferences view. When false, the view surfaces an info hint telling the user push is not yet configured for the app.

Part of the notification-delivery phase-2 rollout: the uptizm backend now exposes meta.push_provisioned on the notification-channel index, and the uptizm client renders this hint when the app has no OneSignal app_id provisioned.

Notes

Client counterpart: anilcancakir/uptizm notification-delivery rollout.

Thread an optional, backward-compatible pushProvisioned flag (default
true) into the notification preferences view. When a host passes false,
a subtle heads-up renders beneath the push channel toggle so the user
knows push cannot deliver until the integration is provisioned. Existing
consumers that do not thread the flag are unaffected.
Copilot AI review requested due to automatic review settings July 23, 2026 22:37

Copilot AI 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.

Pull request overview

Adds an opt-in pushProvisioned flag to the notification preferences view so host apps can indicate whether push delivery is actually provisioned; when not provisioned, the UI shows a subtle hint under the push channel label to set user expectations during the notification-delivery phase-2 rollout.

Changes:

  • Added an optional pushProvisioned constructor parameter (default true) to keep existing callers backward-compatible.
  • Rendered a “push not yet configured” hint under the push channel label when pushProvisioned == false.

Comment thread lib/src/ui/views/notifications/magic_starter_notification_preferences_view.dart Outdated
Comment thread lib/src/ui/views/notifications/magic_starter_notification_preferences_view.dart Outdated
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The push-not-provisioned hint shipped with hardcoded English copy and
sat inside the label's ExcludeSemantics, so it was untranslatable and
invisible to a screen reader.

It now reads trans('notifications.channel_push_unconfigured') like every
other string in the view, with the key added to the published en lang
stub. The exclusion moved down to wrap only the channel label (its
reason is unchanged: the switch carries the same text as its
semanticLabel, so an E2E getByLabel must not resolve the paragraph); the
hint sits outside it because it says something the switch label does
not. Three tests cover it: rendered when unprovisioned, absent by
default, and outside the exclusion.
@anilcancakir
anilcancakir merged commit 3273fab into main Jul 25, 2026
2 checks passed
@anilcancakir
anilcancakir deleted the feat/notifications-push-hint branch July 25, 2026 17:10
anilcancakir added a commit that referenced this pull request Jul 25, 2026
…g flag (#83)

MagicStarterNotificationController reads meta.push_provisioned off both preference responses into pushProvisionedNotifier, and the preferences view renders the push heads-up while it is false. The view's pushProvisioned param becomes bool? and means override: null (the default) reads the backend flag.

#82 shipped that param with no producer, and the most likely host could not even pass it (the starter's own route builds the view). The flag now travels with the data it describes, from magic-starter-laravel#14.

Degradation: the flag starts true and only moves on a response that actually carries a bool, so a backend predating meta.push_provisioned never renders a false 'push not configured' claim. The matrix builder listens to both notifiers merged, so a flag that changes on a save rebuilds the toggles too.
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