The first paragraph of CLAUDE.md reads "If a module grows large, split it into a submodule structure. Prefer composing small, single-purpose units over monolithic files."
However, we somewhat didn't honor this enough. Take a look at the following areas of our codebase.
Web/Frontend
4778 lines of code in web/public/assets/js/app/main.js
1565 lines of code in web/public/assets/js/app/node-page.js
1380 lines of code in web/public/assets/js/app/node-page-charts.js
Web/Backend
2371 lines of code in web/lib/potato_mesh/application/data_processing.rb
1650 lines of code in web/lib/potato_mesh/application/federation.rb
Data/Ingestor
1294 lines of code in data/mesh_ingestor/protocols/meshcore.py
980 lines of code in data/mesh_ingestor/interfaces.py
Please come up with a sensible refactoring strategy for these 7 files across the 3 areas mentioned.
We can for now safely ignore the Rust and Dart code as these parts of the codebase are stale and need some work in future sessions in any case.
/plan refactoring of large files into sensible modules. a.k.a "Refactor main JS #745"
Fix https://github.com/l5yth/potato-mesh/issues/745
The first paragraph of CLAUDE.md reads "If a module grows large, split it into a submodule structure. Prefer composing small, single-purpose units over monolithic files."
However, we somewhat didn't honor this enough. Take a look at the following areas of our codebase.
Web/Frontend
- 4778 lines of code in web/public/assets/js/app/main.js
- 1565 lines of code in web/public/assets/js/app/node-page.js
- 1380 lines of code in web/public/assets/js/app/node-page-charts.js
Web/Backend
- 2371 lines of code in web/lib/potato_mesh/application/data_processing.rb
- 1650 lines of code in web/lib/potato_mesh/application/federation.rb
Data/Ingestor
- 1294 lines of code in data/mesh_ingestor/protocols/meshcore.py
- 980 lines of code in data/mesh_ingestor/interfaces.py
Please come up with a sensible refactoring strategy for these 7 files across the 3 areas mentioned.
We can for now safely ignore the Rust and Dart code as these parts of the codebase are stale and need some work in future sessions in any case.
<!-- github-comment-id:4263178739 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
5000 LOC
/plan refactoring of large files into sensible modules. a.k.a "Refactor main JS #745"
Fix https://github.com/l5yth/potato-mesh/issues/745
The first paragraph of CLAUDE.md reads "If a module grows large, split it into a submodule structure. Prefer composing small, single-purpose units over monolithic files."
However, we somewhat didn't honor this enough. Take a look at the following areas of our codebase.
Web/Frontend
Web/Backend
Data/Ingestor
Please come up with a sensible refactoring strategy for these 7 files across the 3 areas mentioned.
We can for now safely ignore the Rust and Dart code as these parts of the codebase are stale and need some work in future sessions in any case.