-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
A state synchronization issue has been identified where the ProductList screen displays stale data (review counts and ratings) after a user successfully submits a review. Currently, the application fails to update the local cache or state upon navigating back to the product list, requiring a manual refresh or full reload to see the changes.
Correcting this is critical to ensure users receive immediate feedback and to maintain the integrity of social proof (reviews/ratings) across the platform.
Ownership, Deadline & Effort
- Team Owner: Engineering
- Individual Owner: @MehmetBegun
- Deadline: 2026-01-26 24:00 (End of day, explicitly stated)
- Estimated Effort: 4 hours
Deliverables
- State Synchronization Fix: Updated logic to ensure
ProductListdata is refreshed or updated upon successful review submission. - Verification Report: Confirmation that
reviewCountandaverageRatingare consistent with backend data without manual refresh. - Platform Validation: Proof of fix on at least one platform (Web, Android, or iOS).
Scope
In Scope:
- Identifying the specific state management or caching mechanism causing the stale data.
- Implementing a trigger to update or invalidate the product list cache after a successful review.
- Ensuring the
averageRatingcalculation (if done client-side) or fetch reflects the latest backend data. - Verifying state consistency during navigation.
Out of Scope:
- UI/UX redesign or layout changes to the product cards.
- New feature development for the Reviews module.
- Backend API changes (unless a data gap is discovered during investigation).
Acceptance Criteria
-
ProductListreflects the updatedreviewCountimmediately after a successful review submission. -
averageRatingvalues match the latest backend response. - No stale data remains visible after navigating back to the
ProductList. - The fix is verified to work without requiring a manual "pull-to-refresh."
- The solution does not introduce redundant API calls for unrelated products in the list.
Domain-Specific Notes: Engineering
- Caching: If using a library like React Query or SWR, ensure the specific product cache key is invalidated or updated via optimistic updates.
- Navigation: Verify if the navigation listener (e.g.,
onFocusorcomponentDidMount) needs to trigger a partial re-fetch. - Data Consistency: Ensure the data types for
reviewCountandratingmatch between the Review submission response and the Product List schema.
Validation / Review Requirements
- Validation: Manual end-to-end test: Submit a review and verify the count change on the list immediately upon return.
- Required Reviewers: Frontend Lead or Senior Mobile Engineer.
- Definition of Done: Code is merged into the main branch and the bug is verified on a physical device or emulator.
Additional Context
- Current Behavior: Users must manually refresh the page to see their review reflected in the total count.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working