This document translates current global helpers into target Vue concepts.
| Current Global | Current Role | Target Vue Concept |
|---|---|---|
Screens |
Hash routing, route loading/error state, reinit. | Vue Router plus route-level components and query invalidation. |
SmartHomeApi |
Callback API wrapper. | Promise-based API client with normalized result shape. |
DataProvider |
Simple raw data cache. | Pinia stores or composable query cache. |
FavoritesStore |
LocalStorage favorite area ids. | useFavoritesStore backed by localStorage. |
Helper.template |
HTML string factories. | Vue components and slots. |
Helper.states |
Button/card loading mutations. | Component props/state. |
Helper.unification |
Field and date normalization. | API mappers and formatting utilities. |
Modals |
Global modal factory. | Dialog/modal components managed by store or local state. |
Toasts |
Global toast factory. | Toast service/store from UI kit or app shell. |
confirmPopup |
Confirmation dialog. | Reusable confirm dialog service. |
advancedSelect |
Searchable select. | UI kit select/autocomplete component. |
editableString |
Inline editing. | Reusable InlineEditableText component. |
useAreasStoreResponsibilities:
State:
areasareasByIdisLoadingerroruseDevicesStoreResponsibilities:
State:
devicesdevicesByIddeviceStatusByIddeviceStatusLoadingByIddeviceStatusErrorByIduseScriptsStoreResponsibilities:
State:
actionsregularscopesuseFavoritesStoreResponsibilities:
sh_fav_areas.has, add, remove, toggle, getAll.Compatibility:
AppShellOwns:
SectionSidebarProps:
itemsactiveRouteUsed by:
DataTableRequired features:
DeviceStateProps:
deviceIddeviceTypeinitialConnectionStatusRequired behavior:
lost, show offline state and do not request live status.ActionScriptCardProps:
Events:
rundetailsRequired behavior:
InlineEditableTextProps:
modelValuemultilinevalidateEvents:
savecancelRequired behavior:
PlaceInAreaProps:
targetType: area | device | actiontargetIdcurrentAreaIdRequired behavior:
targetType = area.Device status loading should use an explicit concurrency limiter.
Default:
4 concurrent live status requests.Requirements:
lost devices.The API layer should classify errors as:
http_error - non-2xx response.api_error - backend returned status: false.timeout - client timeout or aborted request due to timeout.network_error - fetch/proxy/network failure.invalid_response - response shape does not match expected contract.consumer_error - UI/component bug; log it, but never report it as network failure.