🐛 Bug: Node position override not applied (saved to wrong source row)
Summary
When using Override Node Position, the UI accepts and saves the override, but the node does not move on the map.
Investigation shows the override is saved to a different database row (sourceId = 'default') than the one used for rendering (sourceId != 'default').
Environment
- MeshMonitor: 4.2.0
- Deployment: Docker
- Database: PostgreSQL (external/shared instance)
- Meshtastic connection: LAN node
- Host OS: TrueNAS SCALE
Steps to Reproduce
- Open MeshMonitor UI
- Select a node (example:
!38911199)
- Click Override Node Position
- Move the node and save
- Refresh the map
Expected Behavior
- Node moves to the overridden position
- Override persists across refresh/restart
- Database reflects override on the active node record
Actual Behavior
- UI accepts and saves override
- No visible change on the map
- Behavior persists after refresh and container restart
Database Evidence
The nodes table contains multiple rows per node, separated by sourceId.
Example query:
SELECT
"nodeNum",
"nodeId",
"positionOverrideEnabled",
"latitudeOverride",
"longitudeOverride",
"sourceId"
FROM nodes
WHERE "nodeId" = '!38911199'
ORDER BY "sourceId";
Result:
nodeNum | nodeId | overrideEnabled | latitudeOverride | longitudeOverride | sourceId
----------+------------+----------------+-------------------+--------------------+--------------------------------------
949031321 | !38911199 | false | NULL | NULL | cafb61a3-cc99-484c-a4db-3e543a7584b3
949031321 | !38911199 | true | 36.62958541301912 | -87.38718621039722 | default
Key Finding
-
Override is saved to:
-
Map renders node from:
➡️ The override is never applied to the row used for rendering, so it has no visible effect.
Workaround
Manually applying the override to the live-source row fixes the issue:
UPDATE nodes
SET
"positionOverrideEnabled" = true,
"latitudeOverride" = 36.62958541301912,
"longitudeOverride" = -87.38718621039722,
"positionOverrideIsPrivate" = false,
"updatedAt" = FLOOR(EXTRACT(EPOCH FROM NOW()) * 1000)
WHERE "nodeId" = '!38911199'
AND "sourceId" != 'default';
After restarting MeshMonitor, the node moves correctly.
Suspected Cause
- Multiple rows exist per node (
nodeId, nodeNum) across different sourceId values
- Override logic writes only to
sourceId = 'default'
- Rendering logic uses a different row (live source)
- No reconciliation between override data and active node source
Suggested Fix
One of the following:
- Apply override to all rows matching
nodeId
- Apply override specifically to the active/live source row
- Ensure rendering prioritizes rows where
positionOverrideEnabled = true
- Consolidate or deduplicate node records across sources
Impact
- Overrides appear broken to users
- Requires manual database intervention
- Confusing UX (UI shows success but nothing changes)
Additional Notes
- Issue reproducible across multiple nodes
- Not related to storage, permissions, or container configuration
- Likely affects PostgreSQL deployments due to multi-source row handling
🐛 Bug: Node position override not applied (saved to wrong source row)
Summary
When using Override Node Position, the UI accepts and saves the override, but the node does not move on the map.
Investigation shows the override is saved to a different database row (
sourceId = 'default') than the one used for rendering (sourceId != 'default').Environment
Steps to Reproduce
!38911199)Expected Behavior
Actual Behavior
Database Evidence
The
nodestable contains multiple rows per node, separated bysourceId.Example query:
Result:
Key Finding
Override is saved to:
Map renders node from:
➡️ The override is never applied to the row used for rendering, so it has no visible effect.
Workaround
Manually applying the override to the live-source row fixes the issue:
After restarting MeshMonitor, the node moves correctly.
Suspected Cause
nodeId,nodeNum) across differentsourceIdvaluessourceId = 'default'Suggested Fix
One of the following:
nodeIdpositionOverrideEnabled = trueImpact
Additional Notes