mirror of
https://github.com/pe1hvh/meshcore-gui.git
synced 2026-08-07 01:13:18 +02:00
fix(bbs_service): resolve NameError in _abbrev_table that crashed !h and !help(#v1.14.1)
_abbrev_table used a list comprehension inline inside a generator expression filter. In Python 3, list comprehensions have their own scope, so the loop variable 'cu' was not visible to the outer 'if' condition — causing a NameError on every !h / !help DM command. Extract the comprehension to a local variable 'cats_upper' so both the iteration and the filter operate on the same pre-built list.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# BBS channel reply sent as broadcast when sender is unknown
|
||||
|
||||
**Component:** BBS service
|
||||
**Version:** 1.14.1
|
||||
**Priority:** Low
|
||||
**Type:** Known Limitation
|
||||
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
When a node sends `!bbs` on the BBS channel but is not yet known to the BBS node,
|
||||
the help text reply is broadcast to the entire channel instead of sent privately
|
||||
to the sender.
|
||||
|
||||
---
|
||||
|
||||
## Workaround
|
||||
|
||||
Ensure the sender has been in RF contact with the BBS node at least once before
|
||||
using the BBS. Under normal operating conditions this happens automatically.
|
||||
|
||||
---
|
||||
|
||||
## Possible solution
|
||||
|
||||
When the BBS node receives `!bbs` from an unknown sender, reply on the channel
|
||||
with a short message instructing the sender to send a direct ADVERT request first.
|
||||
Once the ADVERT is received, the BBS node knows the sender's identity and can
|
||||
deliver all further replies as private messages.
|
||||
@@ -27,6 +27,7 @@ Leaflet Runtime (Browser)
|
||||
│
|
||||
├─ Map instance (persistent)
|
||||
├─ Marker registry
|
||||
├─ Contact cluster layer
|
||||
├─ Theme state
|
||||
└─ Viewport state
|
||||
```
|
||||
@@ -100,6 +101,8 @@ Responsibilities:
|
||||
* initialize the Leaflet map once
|
||||
* maintain persistent map instance
|
||||
* manage marker registry
|
||||
* maintain a persistent contact cluster layer
|
||||
* keep the own-device marker outside clustering
|
||||
* apply snapshots incrementally
|
||||
* manage map theme and viewport state
|
||||
|
||||
@@ -109,6 +112,7 @@ Key design rules:
|
||||
map is created once
|
||||
markers updated incrementally
|
||||
snapshots never recreate the map
|
||||
clustering is attached only after maxZoom is known
|
||||
```
|
||||
|
||||
---
|
||||
@@ -154,8 +158,8 @@ Theme state is managed in the browser runtime and restored on reconnect.
|
||||
Markers are keyed by **stable node id**.
|
||||
|
||||
```
|
||||
device marker
|
||||
contact markers
|
||||
device marker (standalone)
|
||||
contact markers (clustered)
|
||||
```
|
||||
|
||||
Updates are applied incrementally:
|
||||
@@ -175,9 +179,11 @@ This prevents marker flicker during the refresh loop.
|
||||
Developers must **not**:
|
||||
|
||||
* recreate the Leaflet map inside the dashboard refresh loop
|
||||
* call `L.map(...)` from snapshot handlers, retry loops or timer callbacks
|
||||
* embed theme state in snapshots
|
||||
* call Leaflet APIs directly from Python
|
||||
* force viewport resets during normal snapshot updates
|
||||
* place the device marker inside the contact cluster layer
|
||||
|
||||
Violating these rules will reintroduce:
|
||||
|
||||
@@ -203,10 +209,10 @@ When the NiceGUI connection temporarily drops:
|
||||
|
||||
Possible improvements without breaking the architecture:
|
||||
|
||||
* marker clustering
|
||||
* heatmap layers
|
||||
* route overlays
|
||||
* tile provider switching
|
||||
* richer cluster icons or spiderfy tuning
|
||||
|
||||
All extensions must remain **browser-managed**.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user