chore: mock-server fleet expansion + docs screenshot refresh pipeline#4624
Open
robertsLando wants to merge 9 commits into
Open
chore: mock-server fleet expansion + docs screenshot refresh pipeline#4624robertsLando wants to merge 9 commits into
robertsLando wants to merge 9 commits into
Conversation
…gories Replaces the single-node `server_config.js` with a `mock-server/` directory that the upstream `mock-server` CLI merges at startup. The 31 nodes cover lighting, sensors, notifications, locks, thermostats, covers, energy, multi-channel, and miscellaneous (siren / indicator / scene controller / configurable parameters) — broad enough to drive realistic dev workflows and docs screenshots without hardware. - Pin node 2 (Window Covering CC, parameter 3) in its own file with a CI-contract comment so the e2e MQTT round-trip in `test-application.yml` keeps working. - Bump the workflow's post-`npm start` `sleep` from 25s to 45s to give the backend room to interview the larger fleet. - Update the three `.github/` doc references that pointed at `server_config.js`. Also adds an initial `.claude/skills/refresh-docs-screenshots/` scaffold (SKILL.md + manifest + seed `scenes.json`) for regenerating the PNGs under `docs/_images/` against the new fleet via Claude-in-Chrome. The selectors are best-effort and need an interactive shake-down before they're trustworthy — see the failure-modes section in SKILL.md.
5 tasks
Coverage Report for CI Build 26155599214Coverage decreased (-1.0%) to 17.619%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
The 31-node fleet made the backend interview slow enough that node 2's value was not published over MQTT before the e2e round-trip test hit its 1-minute timeout. Restore the original single-node server_config.js and keep both mock servers behind two scripts: - npm run fake-stick -> server_config.js (single node, used by CI) - npm run fake-stick:fleet -> mock-server/ (31-node demo fleet) Revert the workflow post-start sleep 45 -> 25 and update the docs.
server_config.js duplicated node 2 of the demo fleet — both defined a Window Covering device with User Code and Schedule Entry Lock. Drop server_config.js and point `npm run fake-stick` straight at mock-server/002-window-covering-pinned.cjs, which mock-server loads as a valid single-node config. The window-covering node now lives in exactly one file, used both standalone (fake-stick) and merged (fake-stick:fleet).
- eslint: ignore .claude/ — the screenshots skill's capture.mjs uses top-level await, which the app's flat config (tuned for the Vue 3 app) cannot parse. The skill is isolated tooling with its own package.json, so the app lint should not cover it (consistent with .github/ already being ignored). - e2e: node 2 in 002-window-covering-pinned.cjs carries a Node Naming CC, so with nodeNames:true the gateway published MQTT topics as zwave/<location>/<name>/... and the test's hardcoded zwave/nodeID_2/... topics never matched. Set the workflow gateway config to nodeNames:false + ignoreLoc:true so topics are keyed by node id (zwave/2/...) regardless of the node's name, and update the test topics. Verified locally end-to-end with a mosquitto round-trip.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related parts: a richer mock-server fleet, and a Playwright-driven pipeline that uses it to regenerate the docs screenshots.
Mock-server fleet
mock-server/directory of 10.cjsfiles / 31 mock nodes thatnpx mock-servermerges at startup. Coverage: lighting (binary/dimmer/RGB/RGBW/fan), sensors (contact/temp+humidity/multi-sensor), notifications (motion/smoke/water/CO), locks (basic + keypad with full Schedule Entry Lock), thermostats (heat-only + HVAC), covers (shutter/blinds/garage), energy (electric/gas/solar w/ Energy Production CC), multi-channel (4-outlet strip + dual dimmer), misc (siren/indicator/scene controller/configurable parameters).fake-stickinto two scripts:npm run fake-stick— single node, loaded straight frommock-server/002-window-covering-pinned.cjs(fast, deterministic; this is what the e2e workflow uses).npm run fake-stick:fleet— the full 31-node fleet (the wholemock-server/directory; for dev / screenshots).server_config.js— its node 2 (a Window Covering blinds device with User Code + Schedule Entry Lock) was duplicated by002-window-covering-pinned.cjs. That fleet file is now the single source of truth and doubles as the single-node config..github/workflows/test-application.yml) is unchanged:npm run fake-stickstill resolves to one node, so CI interviews fast and the MQTT round-trip on node 2's Window Covering CC parameter 3 (zwave/nodeID_2/106/0/targetValue/3) behaves exactly as before..github/instruction files and theAGENTS.md/CLAUDE.mdquick-reference command lists for the two scripts.Docs screenshot pipeline
refresh-docs-screenshotsClaude Code skill:SKILL.mdorchestration +capture.mjs(Playwright/Chromium capture script) +manifest.json(per-image recipe: route, theme, viewport, dialog steps) + seed data (fakeNodes.seed.json, a zero-node mock-server stub,scenes.json). Playwright is isolated in the skill's ownpackage.json/package-lock.jsonso the heavy Chromium download doesn't leak into every contributor's rootnpm install.docs/_images/with this tooling —control_panel,control_panel_dark,settings,settings_dark,debug,mesh_diagram,mesh-selected,route_health_result,nodes_manager,scenes,gateway_values_table,edit_gateway_value,config_updates_dialog,config_updates_icon.control_panel.pngis new; the unusedunknown-device.pngis dropped.Supporting code changes
ZwaveClient.getNodeNeighbors— guard thegetNode()result. It can beundefined(node removed mid-request, or a UI-only fake node), which previously threw on.protocol.NodePanel.refreshNodeNeighbors— the passive on-open neighbor refresh now passesinfoSnack: false, errorSnack: falsetoapiRequestinstead of wrapping the call in a bare swallow-everything try/catch, so it doesn't flash the per-request toast.ZwaveGraph.vue— exposes thevis-networkinstance onwindow.__zwGraphwhenlocalStorage.exposeZwaveGraphis set, so the capture script can deterministically select a mesh node (canvas hit-testing is non-deterministic under physics layout). No-op in normal usage.App.vue— listens for azwave:dismiss-snackbarsDOM event and clears all open toasts;capture.mjsfires it before each screenshot so transient snackbars never leak into a shot. No-op when the event is never dispatched.Verification
npm run fake-stickboots a single node from002-window-covering-pinned.cjs;npm run fake-stick:fleetboots all 31 — both verified listening ontcp://:::5555.Outbound Right) supported, so the e2e MQTT round-trip is unaffected.npx eslint mock-server/is clean.capture.mjsend-to-end against the local stack.Test plan
chore: Test Application— the e2e workflow itself is untouched;npm run fake-stickstill loads a single node, so this is a no-op for CI behavior.docs/_images/*.pngfor visual correctness.npm run fake-stick:fleet+npm run dev:server+npm run devand walk the Control Panel to confirm the fleet renders with realistic names/locations.Out of scope (intentionally deferred)
troubleshoot_*.png) — needs a docs-content decision.