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/bulkand/nudge/launch-announcementnow 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
sentIdstracking instead of hardcodedprocessing={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
roleson recent registrations query - DB facade: replaced
DB::table('messages')->count()withMessage::count() - Enum usage:
NotifyMatchingCleanersTestnow usesVerificationStatus::Verifiedenum instead of raw strings - PHPDoc: added to all NudgeController methods
- Test coverage: new
NudgeControllerTestwith 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