* feat(region-routing): P1 tagging + region_routes primitive + read/write API + preview launcher - config.py: add Coverage.region_tagging (bool=False); add RegionRouteMatrix dataclass (enabled, cells) above NotificationsConfig; add region_routes field to NotificationsConfig; add explicit hydration branch for region_routes in _dict_to_dataclass mirroring destinations pattern. - coverage_area.py: add MonitoringArea.name (str|None=None, frozen); update areas_from_config to preserve name; refactor inline geom extraction from classify_event_areas into shared _event_geom_json helper; add matching_area_names(geom_json, areas)->list[str] (additive, all named matches, config-order, deduped; gate unchanged); add event_region_names convenience wrapper. - coverage_filter.py: add region_tagging ctor kwarg; stamp event.region/ regions before the gate when region_tagging=True and areas non-empty and not event.regions (never clobbers satpass preset). - pipeline/__init__.py: wire region_tagging into CoverageFilter construction. - notification_routes.py: add GET /notifications/regions (named coverage area names, config-order, deduped); GET /notifications/region-routing (matrix as JSON); POST /notifications/region-routing (explicit RMW — only region_routes changes, toggles/rules/destinations survive). - scripts/preview_dashboard.py: mesh-free launcher — dashboard API only, no mesh connector, no broadcast loop; vite runs separately. All 87 coverage tests pass; 300 total pass; 6 pre-existing failures unchanged (adapter config count mismatch + MeshCore EventType.NEW_CONTACT). * feat(region-routing): manual region x family matrix editor page Adds RegionRoutingMatrix.tsx — a plain editor over the region_routes config primitive. Rows = families (via useFamilies()), cols = regions (from GET /api/notifications/regions). Each cell exposes MT channel (ChannelPicker single + includeDisabled), MC channel name (text input), min_severity select (routine/priority/critical/immediate), and an enabled checkbox. Only cells where MT or MC is set are included in the sparse POST payload. Master enable toggle maps to top-level enabled. MT budget guard warns when more than 7 distinct MT indices are in use. Sticky family column; horizontal scroll for wide region sets. Registers route /region-routing in App.tsx and adds "Region Routing" nav entry (Map icon) under the Meshtastic section in Layout.tsx, immediately after Routing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(region-routing): regions endpoint reads saved (disk) coverage so routing columns are dynamic without a bot restart; preview reloads config after writes * feat(routing): unify MT/MC routing into per-family cards; region routing as an in-card expand; remove rules/destinations UI + standalone page * refactor(routing): move Meshtastic Routing from /notifications to /meshtastic/routing (mirror /meshcore/routing); redirect legacy path * feat(region-routing): dispatcher honors region_routes matrix (authoritative-on-match, per-region cooldown, per-channel dedup); non-matrix path unchanged Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(region-routing): matrix dedup key must match boot-restore 2-tuple form (prevents restart re-broadcast flood); regression test --------- Co-authored-by: Matt Johnson <mj@k7zvx.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| iterator.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| yallist.js | ||
yallist
Yet Another Linked List
There are many doubly-linked list implementations like it, but this one is mine.
For when an array would be too big, and a Map can't be iterated in reverse order.
basic usage
var yallist = require('yallist')
var myList = yallist.create([1, 2, 3])
myList.push('foo')
myList.unshift('bar')
// of course pop() and shift() are there, too
console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo']
myList.forEach(function (k) {
// walk the list head to tail
})
myList.forEachReverse(function (k, index, list) {
// walk the list tail to head
})
var myDoubledList = myList.map(function (k) {
return k + k
})
// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo']
// mapReverse is also a thing
var myDoubledListReverse = myList.mapReverse(function (k) {
return k + k
}) // ['foofoo', 6, 4, 2, 'barbar']
var reduced = myList.reduce(function (set, entry) {
set += entry
return set
}, 'start')
console.log(reduced) // 'startfoo123bar'
api
The whole API is considered "public".
Functions with the same name as an Array method work more or less the same way.
There's reverse versions of most things because that's the point.
Yallist
Default export, the class that holds and manages a list.
Call it with either a forEach-able (like an array) or a set of arguments, to initialize the list.
The Array-ish methods all act like you'd expect. No magic length, though, so if you change that it won't automatically prune or add empty spots.
Yallist.create(..)
Alias for Yallist function. Some people like factories.
yallist.head
The first node in the list
yallist.tail
The last node in the list
yallist.length
The number of nodes in the list. (Change this at your peril. It is not magic like Array length.)
yallist.toArray()
Convert the list to an array.
yallist.forEach(fn, [thisp])
Call a function on each item in the list.
yallist.forEachReverse(fn, [thisp])
Call a function on each item in the list, in reverse order.
yallist.get(n)
Get the data at position n in the list. If you use this a lot,
probably better off just using an Array.
yallist.getReverse(n)
Get the data at position n, counting from the tail.
yallist.map(fn, thisp)
Create a new Yallist with the result of calling the function on each item.
yallist.mapReverse(fn, thisp)
Same as map, but in reverse.
yallist.pop()
Get the data from the list tail, and remove the tail from the list.
yallist.push(item, ...)
Insert one or more items to the tail of the list.
yallist.reduce(fn, initialValue)
Like Array.reduce.
yallist.reduceReverse
Like Array.reduce, but in reverse.
yallist.reverse
Reverse the list in place.
yallist.shift()
Get the data from the list head, and remove the head from the list.
yallist.slice([from], [to])
Just like Array.slice, but returns a new Yallist.
yallist.sliceReverse([from], [to])
Just like yallist.slice, but the result is returned in reverse.
yallist.toArray()
Create an array representation of the list.
yallist.toArrayReverse()
Create a reversed array representation of the list.
yallist.unshift(item, ...)
Insert one or more items to the head of the list.
yallist.unshiftNode(node)
Move a Node object to the front of the list. (That is, pull it out of wherever it lives, and make it the new head.)
If the node belongs to a different list, then that list will remove it first.
yallist.pushNode(node)
Move a Node object to the end of the list. (That is, pull it out of wherever it lives, and make it the new tail.)
If the node belongs to a list already, then that list will remove it first.
yallist.removeNode(node)
Remove a node from the list, preserving referential integrity of head and tail and other nodes.
Will throw an error if you try to have a list remove a node that doesn't belong to it.
Yallist.Node
The class that holds the data and is actually the list.
Call with var n = new Node(value, previousNode, nextNode)
Note that if you do direct operations on Nodes themselves, it's very easy to get into weird states where the list is broken. Be careful :)
node.next
The next node in the list.
node.prev
The previous node in the list.
node.value
The data the node contains.
node.list
The list to which this node belongs. (Null if it does not belong to any list.)