| 2026-06-02 |
Fix bugs, migrate favorites store to Composition API, DRY state loader, add page tests, replace CSS vars with kit classes
Eugene Sukhodolskiy
committed
9 hours ago
|
Move unassign into a dedicated confirm dialog and fix icon
...
- Revert useAreaAssign composable back to pure assign logic; remove
submitUnassignCore and unassign state that leaked into the assign modal.
- DeviceDetailPage, ScriptDetailPage, AreaDetailPage:
* Remove the Unassign button from the assign modal footer.
* Add a separate GnModal confirm dialog for unassign (like Remove).
* Dropdown action now opens the confirm dialog instead of firing
immediately.
* Replace non-existent ph-map-pin-slash icon with ph-x-circle.
Eugene Sukhodolskiy
committed
9 hours ago
|
Add unassign action to area, device and script detail pages
...
- useAreaAssign composable: add submitUnassignCore and loading/error states.
- DeviceDetailPage: add 'Unassign from area' button inside assign modal and
in the actions dropdown when device has an area_id.
- ScriptDetailPage: same for scripts (non-scope) with area_id.
- AreaDetailPage: add 'Unassign from parent' in assign modal and dropdown
when area has a parent_id > 0.
Eugene Sukhodolskiy
committed
10 hours ago
|
Fix area assignment button on detail pages
...
- Rename submitAssign -> submitAssignCore in useAreaAssign composable
to avoid name collision with local page handlers.
- Rename local page handlers -> handleAssignSubmit on Area, Device,
and Script detail pages so event bindings call the wrapper correctly.
- Fix AppEmptyState.vue to forward #action slot into GnEmptyState's
#actions slot so the Assign button renders for unassigned items.
Eugene Sukhodolskiy
committed
11 hours ago
|
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.
Eugene Sukhodolskiy
committed
12 hours ago
|
Add toast notifications for mutations (Phase 3)
...
- Wrap RouterView in GnToastProvider in App.vue
- Replace inline rebootError alert in DeviceDetailPage with toast
- Replace inline resultAlert in ScriptDetailPage and ScriptsActionsPage with toast
- Add success toasts after successful edit, assign, remove, rename, create, setup
- Keep inline GnAlert inside modals for form-level errors
Eugene Sukhodolskiy
committed
12 hours ago
|
Add global error handling (Phase 2)
...
- Create useGlobalErrorHandler composable that wires up three
global error-catching surfaces:
1. app.config.errorHandler — Vue runtime errors (render,
watchers, lifecycle hooks, event handlers).
2. window 'unhandledrejection' — rejected promises without catch.
3. window 'error' — synchronous JS runtime errors.
- Create AppErrorBoundary component wrapping RouterView to catch
Vue errors in child components and show fallback UI (AppErrorState
with Retry) instead of a blank screen.
- Apply the boundary in App.vue so every routed page is protected.
All 126 Vitest tests pass.
Eugene Sukhodolskiy
committed
12 hours ago
|
| 2026-06-01 |
Vue client: add shared area assignment to scripts and devices
...
- Add useAreaAssign composable for reusable area assignment logic
- Add AreaBadgeLink and AreaAssignSection shared components
- Integrate area assignment into ScriptDetailPage (actions/regular)
- Integrate area assignment into DeviceDetailPage
- Update scriptsStore with assignToArea / unassignFromArea + reactivity fixes
- Update API modules: scripts.placeInArea, devices.assignToArea
- Update list views: show area badges in actions/regular cards and tables
- Add tests and mock handlers for script area operations
- Update AppShell nav and routes for detail pages
- Add prism-theme.css for code highlighting
- 125 tests passing, build green
Eugene Sukhodolskiy
committed
21 hours ago
|