gnexus-ui-kit installation method.Deliverable:
webclient-vue/docs/.webclient-vue/.gnexus-ui-kit.Deliverable:
GET /api/v1/areas/list.Build the smallest complete app slice:
sh_fav_areas./areas/favorites page.Acceptance criteria:
/ redirects to /areas/favorites./areas/favorites calls the backend areas list endpoint.webclient/src/js code is imported.Implement without mutations first:
Deliverable:
Implement user actions:
Deliverable:
Deliverable:
Install and configure testing stack for Vite + Vue:
Unit test targets (no DOM, fast, isolated):
| Target | What to test |
|---|---|
api/client.js |
apiRequest success path, error path, network failure, abort |
api/http.js |
requestHttp URL building, proxy wrapping, timeout abort, JSON parse |
api/mappers.js |
unifyDeviceFields normalizes snake_case → camelCase |
stores/favorites.js |
localStorage read/write, toggle, add, remove |
stores/areas.js |
buildAreaTree handles roots, children, self-reference, cycles |
stores/devices.js |
makeDeviceStatePatch, normalizeStatusSuccess, normalizeStatusError |
Deliverable:
npm test runs unit tests.coverage/.Test Vue components in isolation with mocked dependencies:
| Component | What to test |
|---|---|
AppEmptyState |
renders title and message, slots work |
AppErrorState |
renders title/message, retry button fires event |
AppLoadingState |
renders label |
AppShell |
renders nav items, brand, content slot |
AreaTreeNode |
toggles expand, emits rename/remove/unassign, cycle detection |
DeviceConnectionBadge |
maps status → correct variant |
DeviceStateCell |
maps state → correct badge/loader |
AreaFavoritesPage |
loads areas, filters favorites, handles empty |
DevicesListPage |
loads devices + states, renders table rows, stale badge |
ScriptsActionsPage |
loads actions, run button triggers API, shows alert |
Mock strategy:
createTestingPinia().vi.mock() or MSW (mock service worker).Deliverable:
End-to-end user flows with mocked backend:
| Flow | Steps |
|---|---|
| Area lifecycle | Load areas → Create area → Rename → Remove |
| Device discovery | Scan network → Select device → Setup → Appears in list |
| Script execution | Load actions → Run script → See result alert |
| Navigation | Visit each route → Assert correct page renders |
Use MSW (Mock Service Worker) to intercept fetch and return fixture data.
Deliverable:
webclient/ available as fallback.gnexus-ui-kit as an updatable dependency: package/git dependency preferred, submodule only if necessary.proxy.php or use direct backend API from the new dev server.proxy.php compatibility in the API client, but allow direct backend URL through environment variables.gnexus-ui-kit through local adapter components, not direct imports across feature code.