11 Commits
Author SHA1 Message Date
Brenda Wallace 48296925b5 Refactor crop merging functionality to enhance plan generation and UI presentation 2026-11-02 19:22:15 +13:00
Brenda Wallace 2324a55c09 Implement crop merging functionality with controller, service, views, and specs 2026-11-02 19:22:15 +13:00
Brenda Wallace 41cbf29f78 Refactor admin crops spec for clarity and consistency in test structure 2026-11-02 16:32:06 +13:00
Brenda Wallace f38477572b Add recently edited crops feature with pagination and UI updates 2026-11-02 16:32:06 +13:00
84cba260bb Add user behaviour detection service for spam scoring (#5185)
* Add user behaviour detection service for spam scoring

Implement UserBehaviourDetectionService to evaluate members for spam indicators:
- Check email confirmation status
- Inspect bio, posts, and comments for spam-related keywords (such as "Sports Betting")
- Display spam score on admin member screens with badges and tooltips

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

* Calculate and persist spam_score on member updates

- Add `spam_score` integer column to members table with migration and schema update
- Add `update_spam_score!` method to Member model
- Call `update_spam_score!` on successful member updates in RegistrationsController#update and MembersController#finish_signup
- Use persisted member `spam_score` in Admin::MembersHelper#spam_score_badge

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

* Renumber migration to resolve duplicate version conflict

- Renumber migration from 20261031020000 to 20261031060000
- Update db/schema.rb version to 2026_10_31_060000

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-31 21:29:03 +10:30
Brenda Wallace 5313578d98 Add ReminderEvent tracking for planting and harvest reminders
- Update the growstuff rake tasks to log ReminderEvent when planting and harvest reminders are sent.
- Create a factory for ReminderEvent to facilitate testing.
- Implement model specs for ReminderEvent, including validations and weekly counts.
- Add request specs for Admin::ReminderStatsController to verify reminder statistics.
- Enhance unsubscribe specs to ensure ReminderEvent is logged correctly on unsubscriptions.
- Update task specs for growstuff to verify ReminderEvent counts for sent reminders.
2026-10-31 19:29:54 +13:00
Brenda Wallace c830624a75 Crop job admin 2026-10-24 18:40:10 +13:00
Brenda Wallace bd4a55331e admin screen for crop job templates 2026-10-24 18:40:10 +13:00
Brenda Wallace 85b5ff9ecd Add feature flags, with job ideas as the first
Admins switch features on and off at /admin/features, kept in Flipper.
Job ideas (the page, the banners and the overlay) only show while its
flag is on. Features are off until switched on.

Closes #5050
2026-10-24 18:01:56 +13:00
d491df87fc Filter deleted members by default and enable bulk ban on admin members (#5060)
* Filter deleted members by default and enable bulk ban on admin members

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

* Drop instagram

* Default sort

* Update specs

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-24 14:30:50 +10:30
Brenda Wallace 6332f26c58 Merge pull request #4994 from Growstuff/crop-job-templates-admin
Admin for crop job templates, a tidier crop wrangling page, and crop and template seeds
2026-10-23 13:26:33 +10:30