# LocalSyncManager Module Status

This audit tracks the LocalSyncManager refactor rollout across dashboard modules and highlights readiness for the shared search helper.

## Upgraded Modules

Modules below already rely on the singleton exported by `services/syncservice`. They can adopt the shared search helper without additional sync refactoring.

- `FrontEnd/js/modules/Dashboard.js`
- `FrontEnd/js/modules/Inventory/InventoryManagement.js`
- `FrontEnd/js/modules/Invoices/Invoices.js`
- `FrontEnd/js/modules/Invoices/InvoicePreview.js`
- `FrontEnd/js/modules/ModuleBuilder/ModuleManager.js`
- `FrontEnd/js/modules/PageConfigBuilder/PageConfigBuilder.js`
- `FrontEnd/js/modules/Access/UserAccessManager.js`
- `FrontEnd/js/modules/Settings/index.js`
- `FrontEnd/js/modules/Settings/GroupMemberships.js`
- `FrontEnd/js/modules/Settings/TaxGroups.js`
- `FrontEnd/js/modules/Settings/TaxTypes.js`
- `FrontEnd/js/modules/Settings/UserGroups.js`
- `FrontEnd/js/modules/Organisations/Organisation.js`
- `FrontEnd/js/modules/UiActions/ActionBuilder.js`
- `FrontEnd/js/modules/Profile/UserProfile.js`
- `FrontEnd/js/modules/Procurement/Rfqs.js`
- `FrontEnd/js/modules/POS/POS.js`
- `FrontEnd/js/modules/POS/multiplePaymentModal.js`
- `FrontEnd/js/modules/Payroll/GeneratePayroll.js`

### Search Helper Integrated

The following upgraded modules now delegate record lookups to `services/searchHelper`, avoiding manual `fetchAll` filters and benefiting from policy-defined indexes:

- `FrontEnd/js/modules/Inventory/InventoryManagement.js` (barcode receive/transfer/repack flows)
- `FrontEnd/js/modules/PageConfigBuilder/PageConfigBuilder.js` (module seeding checks)
- `FrontEnd/js/modules/Profile/UserProfile.js` (current user bootstrap)
- `FrontEnd/js/modules/POS/POS.js` (barcode input and live product search)
- `FrontEnd/js/modules/Procurement/Rfqs.js` (scoring notes, shortlists, awards caches)

## Legacy Modules

These modules still instantiate `core/localsyncmanager` directly or manage IndexedDB stores on their own. Migrate them to `services/syncservice` before wiring in the search helper or policy-driven features.

- `FrontEnd/js/modules/Calendar.js`
- `FrontEnd/js/modules/KanbanBoard.js`
- `FrontEnd/js/modules/KanbanBoardManager.js`
- `FrontEnd/js/modules/BoardColumnsManager.js`
- `FrontEnd/js/modules/Certificates/Certificates.js`
- `FrontEnd/js/modules/TableBuilder/TableManager.js`
- `FrontEnd/js/modules/ModuleBuilder/ModuleBuilder.js`
- `FrontEnd/js/modules/Procurement/RfqTemplateBuilder.js`
- `FrontEnd/js/modules/POS/openPOS.js`
- `FrontEnd/js/modules/TenantConfig/TenantModules.js`
- `FrontEnd/js/modules/TenantConfig/FeatureFlags.js`
- `FrontEnd/js/modules/quotations/quotations.js`
- `FrontEnd/js/modules/Graphs/GraphBuilder.js`

## Search Helper Adoption Checklist

1. Confirm the module uses the singleton `getManager()` helper.
2. Define policy search metadata (`searchIndex.columns`) if the table requires custom fields.
3. Call `services/searchHelper.search()` for combined local/remote lookups.
4. Listen for `search:*` events on the event bus to update UI state (spinners, counts, empty-state messaging).
5. Add or update Jest tests covering module-level search flows.

## Next Steps

- Prioritise migrating calendar and kanban flows since they block high-traffic search scenarios.
- Align documentation and training materials once each module family switches to the shared helper.
- Revisit advanced indexing once all legacy modules run through the singleton manager.
