Repository navigation
release/v0.4.22 - #107
Merged
Merged
release/v0.4.22#107
Conversation
Android pushes never worked with store-level FCM credentials and some iOS devices were rejected, because of several stacked defects: - configureFcm put the service account JSON into credentials.private_key, so no valid Firebase client was ever built from a store channel - FcmChannel required the platform-wide Firebase project to be configured - credentials were always resolved from the store, never the network app - one APNs environment per channel rejected sandbox/dev build tokens - registerDevice never reassigned a token to the latest customer and did not normalize platform casing - mail/database errors ran before push and stopped it; failures and dead tokens were never handled or logged Introduce Push\StorefrontPushChannel with isolated Firebase/APNs clients, network-first credential resolution with wrong-app and wrong-environment retries, dead token pruning, and high priority payloads. Order notifications share a StorefrontOrderNotification base class. Add a customers/unregister-device endpoint and an admin test push action.
Codecov requires full patch coverage. Cover the FCM and APNs transport send paths, PushMessage setters, APNs environment short-circuit, explicit push routes, and pruning/logging failure handling. Read device attributes with data_get so devices returned by a custom push route do not need to be Eloquent models, and drop two unreachable branches.
Storefront order notifications were already stored in the core
notifications table, but customers had no way to read them. Add
storefront/v1/notifications endpoints for the authenticated customer to
list (filter by unread/type, limit/offset), count unread, read, mark as
read, mark all as read and delete their notifications, scoped to the
storefront app (store, or network and its member stores).
Add customer notification preferences (order update pushes, promotions)
stored on the contact meta and honored by the notifications, and
broadcast new notifications in realtime on contact.{uuid} through a
broadcast channel that never fails the send.
…asts Also drop null values from inbox item data, and read notification data through the model's array cast.
…ration Add promotions owned by a store or network: automatic or code based percentage, fixed amount, free delivery and buy X get Y discounts, with product/category/store targeting, minimum subtotal and item conditions, first order only, date ranges and weekly schedule windows, usage limits (total, per customer, per code), budgets, maximum discounts, stacking and priorities. Checkout prices the cart's promotions when a checkout is created, stores them on the checkout options and reserves each use under a row lock, so the amount charged (cash, Stripe, QPay) always matches the discount shown. Capture records a discount transaction item and order meta and redeems the reservations; multi-store orders split the discount per store. Stale reservations are released by a scheduled command. Cart endpoints apply, remove and preview codes; the public API lists the storefront's live deals; the console API manages promotions and generates codes.
…campaigns # Conflicts: # server/src/routes.php
Customer segments are rule based audiences of a store's or network's customers (order count bounds, ordered or lapsed within N days, joined within N days, minimum spend, reachable by push, explicit customers). Campaigns send a title/body with an optional image and deep link to a segment (or explicit recipients, or everyone) by push and/or inbox, now or at a scheduled time. storefront:dispatch-campaigns claims due campaigns atomically and queues delivery in batches; customers who turned promotions off are skipped. Promotions can be announced with a campaign that goes out when the promotion starts, and announcements for promotions that stopped running are canceled. The console API manages segments (with live audience previews) and campaigns (send now, cancel, audience count). The existing promotional push action now sends a tracked campaign.
…ampaigns Promotions now has Promotions, Campaigns, Segments and Push Notifications tabs (and sidebar entries). Promotions: list with type, trigger, status, schedule, redemptions and discount given; a form for discounts, conditions, targeting, limits and stacking; activate/pause/end; promo code generation and management; and announcing a promotion to a segment. Segments: rule builder with a live count of matching customers. Campaigns: message, audience, channels and deep link, saved as a draft, sent now or scheduled, with send and cancel actions.
after:starts_at failed validation whenever starts_at was empty.
This was referenced Sep 28, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #107 +/- ##
=============================================
Coverage 100.00% 100.00%
- Complexity 1772 2281 +509
=============================================
Files 135 182 +47
Lines 7778 9080 +1302
=============================================
+ Hits 7778 9080 +1302
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add Ukrainian translation
fix: rebuild push notifications on a single storefront push channel
feat: customer notifications inbox API
feat: promotions engine with codes, stacking and checkout integration
feat: customer segments and campaigns
feat: console screens for promotions, promo codes, segments and campaigns
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release branch for v0.4.22: reliable push notifications, a customer notifications inbox, promotions, segments and campaigns.
What this branch carries
0.4.22inpackage.json,composer.jsonandextension.json.RELEASE.mdwritten for v0.4.22.The feature PRs below are retargeted to this branch and merge into it.
Merge order
Several PRs are stacked, so they must merge in this order. After each merge the next one's diff shrinks to its own changes.
needs-human-review.needs-human-reviewandneeds-product-decision(see its Risk section).mainfires the tag job, which pushesv0.4.22and chains intocreate-release.ymland the publish jobs.Before merging this PR
Related, released separately
user_devicespush metadata columns.Upgrade steps
See
RELEASE.md: run migrations, and make sure the scheduler and a queue worker are running.