• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zwave-js / zwave-js-ui / 18649018373
19%

Build:
DEFAULT BRANCH: master
Ran 20 Oct 2025 10:20AM UTC
Jobs 1
Files 68
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Oct 2025 10:19AM UTC coverage: 20.28% (-0.005%) from 20.285%
18649018373

push

github

web-flow
fix: refresh route data after rebuilding node routes to update UI (#4422)

## Problem

When rebuilding routes for a node with priority or custom return routes,
those routes are deleted during the rebuild process. However, the UI was
not automatically updated to reflect this change, requiring users to
manually press the Get 🔁 button to see the current state.

## Solution

This PR updates the UI after `rebuildNodeRoutes` completes by reading
from Z-Wave JS's cleared cache. When routes are rebuilt, Z-Wave JS
clears the cache for custom SUC return routes and priority SUC return
routes (but NOT the application route). The fix reads from this cleared
cache to update the UI state:

1. Calls `getCustomSUCReturnRoute(nodeId)` - Uses
`getCustomSUCReturnRoutesCached` to read the cleared cache for custom
SUC return routes
2. Calls `getPrioritySUCReturnRoute(nodeId)` - Uses
`getPrioritySUCReturnRouteCached` to read the cleared cache for priority
SUC return routes

Since the cache is cleared during rebuild, the cached methods return
`null` or `[]`, correctly reflecting that the SUC return routes were
deleted. The application route (priority route from controller to node)
is NOT deleted during rebuild and is left untouched. This approach
avoids querying the controller and instead relies on the cache state as
recommended by @AlCalzone.

## Testing

- All existing tests pass (103 tests)
- Code follows existing patterns and conventions
- Linting passes
- TypeScript compilation succeeds

## Impact

Users will now see immediate UI updates when rebuilding routes deletes
priority or custom SUC return routes, eliminating the need to manually
press the Get button to refresh the route data.

Fixes zwave-js/zwave-js-ui#4295

<!-- START COPILOT CODING AGENT SUFFIX -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Rebuilding routes for a node with priority (return)
routes deletes... (continued)

333 of 441 branches covered (75.51%)

Branch coverage included in aggregate %.

0 of 6 new or added lines in 1 file covered. (0.0%)

4033 of 21088 relevant lines covered (19.12%)

1.2 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
6
0.0
0.0% api/lib/ZwaveClient.ts
Jobs
ID Job ID Ran Files Coverage
1 18649018373.1 20 Oct 2025 10:20AM UTC 68
20.28
GitHub Action Run
Source Files on build 18649018373
  • Tree
  • List 68
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • de64c222 on github
  • Prev Build on master (#18586894561)
  • Next Build on master (#18715718057)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc