Stu Mason
Stu Mason

Activity

StuMason/cleanconnect
TidyLinker.com
TypeScript
Pull Request Closed

PR #122 closed: fix: address all PR review issues from #121

Summary

Fixes every issue raised in the PR #121 review:

  • Route order bug (critical): /nudge/bulk and /nudge/launch-announcement now registered before {user} parameterised routes — they were previously unreachable
  • Profile nudge missing_item bug: auto-detects what's actually missing (bio, services, or both) instead of always defaulting to "a bio"
  • NudgeButton spam prevention: disabled state now uses sentIds tracking instead of hardcoded processing={false}
  • BulkNudgeRequest form request: extracted inline validation to proper form request class
  • DRY: adminUserIds: computed once in index() and passed through to funnel/action methods
  • DRY: unconverted scope: EmailSignup::unconverted() scope replaces triplicated filter logic in DashboardController, NudgeController, and artisan command
  • N+1 fix: eager load roles on recent registrations query
  • DB facade: replaced DB::table('messages')->count() with Message::count()
  • Enum usage: NotifyMatchingCleanersTest now uses VerificationStatus::Verified enum instead of raw strings
  • PHPDoc: added to all NudgeController methods
  • Test coverage: new NudgeControllerTest with auth, each nudge type, bulk validation, and route reachability tests

Test plan

  • php artisan test tests/Feature/Admin — 83 passed
  • php artisan test tests/Feature/SendLaunchAnnouncementTest.php — 5 passed
  • php artisan test tests/Feature/Listeners/NotifyMatchingCleanersTest.php — passed
  • npm run build — clean
  • npm run lint — clean
  • vendor/bin/pint — clean
+384
additions
-218
deletions
9
files changed