feat(gotjunk): Multi-device cart reservation with 5-min timeout #173
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
Implemented cross-device cart coordination with 5-minute reservation timeout. When user swipes right on Browse, item is reserved for 5 minutes and hidden from ALL users' Browse feeds. Countdown timer displays in cart fullscreen view. On expiration, item automatically returns to Browse feed across all devices.
Architecture
Reservation Flow:
Multi-Device Coordination:
Files Changed
Created:
frontend/services/cartReservation.ts(146 lines) - Service module following WSP 49 patternfrontend/components/CartCountdown.tsx(76 lines) - Color-coded countdown timer componentModified:
frontend/types.ts- Added CartReservation interfacefrontend/services/firestoreSync.ts- Added updateCartReservation()firestore.rules- Added isValidReservationUpdate() validatorfrontend/App.tsx- Right-swipe handler, browse filter, countdown integration, expiration handlerModLog.md- DocumentationTesting
npm run build(962.69 KB bundle)Test Plan:
WSP Compliance
🤖 Generated with Claude Code