Skip to content

Commit 4b64a75

Browse files
committed
chore(release): bump version to 1.16.0, major refactor, fix LinkAnalysisPanel click-through
1 parent 6578707 commit 4b64a75

7 files changed

Lines changed: 576 additions & 527 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.16.0] - 2026-02-26
9+
10+
### Changed
11+
12+
- **Major Codebase Refactoring**: Executed a comprehensive restructuring of both frontend and backend architectures to improve modularity, maintainability, and testing.
13+
- **Frontend Core**: Decomposed large monoliths (`MapContainer.jsx`, `Sidebar.jsx`) into focused sub-components. Implemented Facade pattern for global context (`RFContext.jsx`).
14+
- **Backend API**: Refactored `server.py` into modular API routers (`analysis.py`, `elevation.py`, `tasks.py`, `optimization.py`).
15+
- **Math & Physics Modules**: Split `rfMath.js` into targeted utility files (`fspl.js`, `fresnel.js`, `lora.js`, `bullington.js`, etc.) while maintaining backward compatibility.
16+
- **State & Hooks**: Standardized Web Worker communication with `useWorkerState.js` and abstracted tile fetching logic.
17+
- **Data Processing**: Consolidated all CSV parsing, importing, and exporting logic into dedicated utilities.
18+
19+
### Fixed
20+
21+
- **Link Analysis UI**: Resolved a click-through bug where adjusting settings in the Link Analysis floating panel would inadvertently interact with the map underneath and place new nodes.
22+
823
## [1.15.5] - 2026-02-15
924

1025
### Fixed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# meshRF 📡 v1.15.5
1+
# meshRF 📡 v1.16.0
22

33
A professional-grade RF propagation and link analysis tool designed for LoRa Mesh networks (Meshtastic, Reticulum, Sidewinder). Built with **React**, **Leaflet**, and a high-fidelity physics core combining a **Python Geodetic Engine** with **High-Performance WASM Modules**.
44

REFACTORING_REPORT.md

Lines changed: 0 additions & 86 deletions
This file was deleted.

RELEASE_NOTES.md

Lines changed: 20 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,41 @@
1-
# MeshRF v1.15.5 - Stability & Reliability Patch
1+
# MeshRF v1.16.0 - Major Refactoring & Modularization
22

3-
**Release Date**: February 15, 2026
4-
**Type**: Patch Release
5-
**Focus**: Critical bugfixes, memory leak prevention, and WASM binding corrections
3+
**Release Date**: February 26, 2026
4+
**Type**: Minor Release (Architecture Update)
5+
**Focus**: Codebase restructuring, modularization, and maintainability improvements.
66

77
---
88

99
## 🎯 Overview
1010

11-
This patch addresses **18 critical stability issues** discovered through systematic code review, including infinite loops, memory leaks, race conditions, silent failures, and a critical WASM binding bug that prevented the ITM propagation model from functioning correctly.
11+
This release focuses entirely on **structural architecture and technical debt reduction**. The codebase has undergone a major refactor to decompose monolithic files, separate concerns, and establish a cleaner foundation for future feature development. All existing functionality has been preserved and verified against automated test suites.
1212

1313
---
1414

15-
## 🐛 Critical Fixes
15+
## 🏗️ Refactoring Highlights
1616

17-
### Backend (Python - 7 fixes)
17+
### Frontend Architecture
1818

19-
| Issue | Impact | Fix |
20-
| -------------------------------- | ----------------------------------- | ----------------------------------------- |
21-
| **SSE Infinite Loop** | Open HTTP connections indefinitely | Added 600-poll max timeout (5 min) |
22-
| **Silent Exception Swallowing** | Errors hidden, debugging impossible | Structured logging with error summaries |
23-
| **False-Positive Perfect Links** | Misleading "100% clearance" reports | Evaluation flag prevents 0-point analysis |
24-
| **ThreadPoolExecutor Leaks** | Thread count grows unbounded | `shutdown()` + `__del__()` methods |
25-
| **Missing Timeouts** | Indefinite blocking on tile fetches | 30s timeout with `TimeoutError` handling |
26-
| **Unbounded tile_locks** | Memory exhaustion over time | OrderedDict LRU cache (1000 limit) |
27-
| **Wrong HTTP Status Codes** | 500 errors for client mistakes | Differentiated 400 vs 500 responses |
19+
- **Component Decomposition**: Massive components like `MapContainer.jsx` and `Sidebar.jsx` have been broken down into specialized layers (`LinkLayerManager`, `CoverageLayerManager`) and sections (`HardwareSection`, `EnvironmentSection`).
20+
- **State Management**: Implemented Facade pattern for React Context (`RFContext.jsx` wrapping isolated domains).
21+
- **RF Math Modularization**: Split the monolithic `rfMath.js` into isolated mathematics modules (`fspl.js`, `bullington.js`, `earth.js`, etc.) located in `src/utils/math/`.
22+
- **Worker & Data Hooks**: Standardized Web Worker interactions via `useWorkerState.js` and extracted map tile fetching to `tileFetcher.js`.
2823

29-
### Frontend (React/JS - 10 fixes)
24+
### Backend API Structure
3025

31-
| Issue | Impact | Fix |
32-
| ----------------------------- | ---------------------------------------------- | ----------------------------------- |
33-
| **Stale Message Listeners** | Duplicate worker handlers, memory leaks | Moved handler into `useEffect` |
34-
| **Stale Closures** | Infinite re-render loops | Restored `configRef` pattern |
35-
| **Document Listener Leaks** | Chrome tab memory growth | `cleanupRef` tracking |
36-
| **Missing HTTP Error Checks** | Unhandled promise rejections | `response.ok` validation |
37-
| **Silent WASM Failures** | Tools silently break | `wasmError` state + user feedback |
38-
| **Scan Double-Submit** | Duplicate Celery tasks | `isScanning` guard |
39-
| **Missing Imports** | Runtime ReferenceErrors | Added `useRef`, `useEffect` |
40-
| **Infinite Loop (Post-Fix)** | Max update depth exceeded | Removed `runAnalysis` from deps |
41-
| **Model Selection** | Changing propagation model doesn't recalculate | Added `propagationSettings` to deps |
42-
43-
### WASM/C++ (1 fix)
44-
45-
| Issue | Impact | Fix |
46-
| ------------------------------ | -------------------------------------------- | --------------------------------------------------------- |
47-
| **LinkParameters Constructor** | "Module.LinkParameters is not a constructor" | Changed `value_object``class_` with `.constructor<>()` |
48-
49-
---
50-
51-
## 📦 Deployment
52-
53-
### Updated Files
54-
55-
- **Backend**: `server.py`, `rf_physics.py`, `core/algorithms.py`, `tile_manager.py`
56-
- **Frontend**: `useViewshedTool.js`, `LinkLayer.jsx`, `LinkAnalysisPanel.jsx`, `rfService.js`, `useRFCoverageTool.js`, `useSimulationStore.js`
57-
- **WASM**: `libmeshrf/src/bindings.cpp`, `meshrf.wasm` (109KB), `meshrf.js` (48KB)
58-
59-
### Verification
60-
61-
- ✅ Frontend build successful
62-
- ✅ Python syntax validated
63-
- ✅ WASM module compiled (100%)
64-
- ✅ Runtime errors resolved
65-
66-
---
67-
68-
## 🚀 Upgrade Instructions
69-
70-
### Development
71-
72-
```bash
73-
# Frontend (uses Vite HMR - no restart needed)
74-
# Code changes already live via volume mount
75-
76-
# Backend - restart to reload Python modules
77-
docker restart rf_engine_dev
78-
79-
# Hard refresh browser to load new WASM
80-
Ctrl + Shift + R (Windows/Linux)
81-
Cmd + Shift + R (Mac)
82-
```
83-
84-
### Production
85-
86-
```bash
87-
# Pull latest code
88-
git pull origin main
89-
90-
# Rebuild containers
91-
docker-compose build
92-
93-
# Restart stack
94-
docker-compose up -d
95-
```
96-
97-
---
98-
99-
## 🔍 Testing Recommendations
100-
101-
1. **Link Analysis**: Test ITM (Longley-Rice) propagation model - should no longer throw constructor errors
102-
2. **Long-Running Scans**: Verify SSE endpoints timeout gracefully after 5 minutes
103-
3. **Memory Monitoring**: Check thread count and Redis tile cache remain bounded
104-
4. **Error Visibility**: Confirm viewshed errors appear in logs instead of being silently swallowed
105-
5. **Multi-Click Protection**: Spam-click "Start Scan" button - should only run once
106-
107-
---
108-
109-
## 📊 Impact Summary
110-
111-
| Category | Fixes | Severity |
112-
| ------------------- | ----- | ----------- |
113-
| **Infinite Loops** | 1 | 🔴 Critical |
114-
| **Memory Leaks** | 3 | 🔴 Critical |
115-
| **Silent Failures** | 4 | 🟠 High |
116-
| **Race Conditions** | 2 | 🟠 High |
117-
| **Error Handling** | 4 | 🟡 Medium |
118-
| **Import Errors** | 3 | 🟡 Medium |
119-
120-
**Total**: 18 issues resolved
26+
- **API Routing**: `server.py` has been decomposed into dedicated FastAPI routers (`routers/analysis.py`, `routers/elevation.py`, etc.).
27+
- **Tile Manager Extraction**: Separated `tile_manager.py` logic into `cache_layer.py`, `elevation_client.py`, and `grid_processor.py`.
12128

12229
---
12330

124-
## 🙏 Acknowledgments
31+
## 📊 Impact & Stability
12532

126-
All issues identified through systematic code review and production debugging. Special attention given to resource management (threads, listeners, locks) and React hook dependency management.
33+
- **Components Extracted/Created**: 25+
34+
- **Lines of Code Relocated**: ~4,000+
35+
- **Test Status**: All backend (`pytest`) and frontend (`vitest`) test suites are passing.
36+
- **Docker Containers**: Rebuilt and stable.
12737

12838
---
12939

13040
**Full Changelog**: [CHANGELOG.md](CHANGELOG.md)
131-
**Previous Release**: [v1.15.4](https://github.com/d3mocide/MeshRF/releases/tag/v1.15.4)
41+
**Previous Release**: [v1.15.5](https://github.com/d3mocide/MeshRF/releases/tag/v1.15.5)

docker-compose.dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
container_name: meshrf_dev
77
command: npm run dev -- --host
88
ports:
9-
- "5173:5173" # Vite Dev Port
9+
- "3100:5173" # Vite Dev Port
1010
volumes:
1111
- .:/app
1212
- /app/node_modules

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "meshrf",
33
"private": true,
4-
"version": "1.15.5",
4+
"version": "1.16.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

0 commit comments

Comments
 (0)