TidyLinker.com
TypeScript
Pull Request Merged
PR #123 merged: fix: review cleanup — route bugs, missing controller, tests, DRY
Summary
Fixes all issues from the #121 review plus the missing FeaturedCleanerController that didn't make it into the #120 squash merge.
Bugs fixed:
- Route order:
/nudge/bulkand/nudge/launch-announcementmoved before{user}params (were unreachable) - Profile nudge auto-detects missing bio/services instead of always defaulting to "a bio"
- NudgeButton removed dead
processingprop —sentIdsrender guard already prevents spam EmailSignup::count()no longer called twice in getPreLaunchData
Missing from #120 squash merge:
- FeaturedCleanerController + admin page + Homepage sidebar nav item
Standards fixes:
- BulkNudgeRequest form request (authorize checks isAdmin)
adminUserIdscomputed once and passed throughMessage::count()instead ofDB::table('messages')- Eager load
roleson recent registrations (N+1 fix) - Eager load
cleanerProfile.servicesfor bulk profile nudges EmailSignup::unconverted()scope with subquery replaces triplicated filter logicVerificationStatusenum in NotifyMatchingCleanersTest- PHPDoc on all NudgeController methods
Test coverage:
- NudgeControllerTest: auth, all 4 nudge types, bulk validation, route reachability
Test plan
- 83 tests passed (322 assertions)
- Pint, Prettier, ESLint clean
-
npm run buildclean
+654
additions
-142
deletions
16
files changed