[Blocker] feat: Backend V2 Multi-Store Isolation + Store Name Sync Fix
Published on May 10, 2026
# Membangun Benteng Data: POS Multi-Toko yang Kokoh dan Rapi
Aku
---
### Raw Commit Data
## GitHub Update
**Repository:** [MKWcorp/POS-DRW-Skincare](https://github.com/MKWcorp/POS-DRW-Skincare)
**Author:** MKWcorp
**Date:** 5/11/2026, 6:35:49 AM
**Commit:** [`30e894d`](https://github.com/MKWcorp/POS-DRW-Skincare/commit/30e894d1cf4fdf6dd67f995d16e2b7903d47a98d)
### Commit Message
feat: Backend V2 Multi-Store Isolation + Store Name Sync Fix
Major Updates (May 11, 2026):
š Backend V2 Multi-Store Isolation:
- Enforce store_id REQUIRED in all sync endpoints (push/pull/snapshot)
- Updated sync_api.dart: storeId parameter now non-nullable
- Updated activity_log_pull_orchestrator: Enforce storeId requirement
- _resolveCurrentSyncScope() throws STORE_CONTEXT_REQUIRED if missing
- Graceful error handling: sync paused when store not selected
- Build verified: 0 compile errors, ready for production
šŖ Store Name Sync Fix:
- Backend: New endpoint PATCH /api/pos/mobile/stores/:storeId
- Mobile: Added updateStoreName() to MobileStoreManagementRepository
- Store Settings: Now updates BOTH reseller profile AND stores table
- Multiple Store: Auto-refresh via provider invalidation
- Backend validates: admin/owner role, activity log STORE_NAME_UPDATED
š Activity Log Multi-Store (Phase 1-3):
- Phase 1: Fixed userRole capture (StoreRole vs customer tier)
- Phase 2: Added Store + Role filters to Activity Log Viewer UI
- Phase 3: Backend V2 integration complete
- Documentation: ACTIVITY_LOG_MULTI_STORE_ANALYSIS.md marked READY
š Bug Fixes:
- Store isolation: Snapshot scope key cleared on logout
- Store switch: ALWAYS clear data (prevent contamination)
- Multiple Store: Enhanced auto-refresh on navigation return
š Documentation:
- Created BACKEND_PROMPT_STORE_NAME_UPDATE.md
- Created STORE_NAME_SYNC_FIX_PLAN.md
- Updated ACTIVITY_LOG_MULTI_STORE_ANALYSIS.md
- Updated AGENTS.md with comprehensive changes
Files Changed: 86 modified, 7 new files
Build Status: ā
0 errors, production-ready
---
_This story was imported from historical commits._