Wire ItemTagNotifier to AASM complete event#61
Merged
Conversation
On idled → completed transition, ItemTag#after_commit fires ItemTagNotifier to all shopkeepers in the shop's account except the completer (completed_by). idle! does not fire. Closes the AASM-trigger half of issue #58 PR #2 scope. APNs/FCM provider credentials still need provisioning (bin/rails credentials:edit) before delivery is enabled in production. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Closes the AASM-trigger half of issue #58 PR #2 scope.
ItemTagnow firesItemTagNotifieron thecompleteAASM event viaafter_commit. Recipients are all shopkeepers in the shop's account, excluding the completer (completed_by).idle!does not fire.Out of scope
.p8+ FCM service account JSON: still need provisioning (bin/rails credentials:edit).ApplicationPushNotification.enableddefaults to!Rails.env.test?, so the trigger is a no-op in tests and a runtime no-op in dev/prod until credentials are configured.Test plan
item_tag_test.rb:complete!fires notifier; recipient is the non-completer shopkeepercomplete!fires to all shopkeepers whencompleted_byis unsetcomplete!is a no-op when account has only the completeridle!does not fire the notifierbin/rails test— 423 runs, 884 assertions, 0 failuresbin/rubocop— 243 files, 0 offensesbin/brakeman— 0 warnings🤖 Generated with Claude Code