Phase 5: Extract reusable useAsyncRequest composable for stores
- Add src/composables/useAsyncRequest.js to manage isLoading/error/AbortController
- Convert Pinia stores to Setup Stores: areas, devices, scripts, scanning
- Use useAsyncRequest for all simple list/detail loaders
- Fix API modules to forward options/signal (areas.devices, areas.scripts,
  devices.detail, scripts.scopeCode) — previously AbortControllers were
  created but signals were never passed to fetch
- Keep batch loadDeviceStates and reboot/runScript as custom logic
- Use immutable Set updates for reactive rebootingIds/runningAliases
- Update modules.spec.js assertions for new optional arguments
- Add 9 unit tests for useAsyncRequest

All 139 tests pass.
1 parent f028f7f commit 0843dc5a7e8c5f79bef2594ade235db66c90faa4
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 8 hours ago
Showing 10 changed files
View
webclient-vue/src/api/__tests__/modules.spec.js
View
webclient-vue/src/api/modules/areas.js
View
webclient-vue/src/api/modules/devices.js
View
webclient-vue/src/api/modules/scripts.js
View
webclient-vue/src/composables/__tests__/useAsyncRequest.spec.js 0 → 100644
View
webclient-vue/src/composables/useAsyncRequest.js 0 → 100644
View
webclient-vue/src/stores/areas.js
View
webclient-vue/src/stores/devices.js
View
webclient-vue/src/stores/scanning.js
View
webclient-vue/src/stores/scripts.js