Persistent nodedb#780
Conversation
- Created a new index file in the core stores directory to export all stores from a single module. - Updated imports to use consolidated store exports.
|
@philon- is attempting to deploy a commit to the Meshtastic Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull Request Overview
This PR introduces persistent storage for the node database, separating it from the device store as a preparatory step for comprehensive persistence of messages and telemetry. The refactoring creates a dedicated NodeDB store with proper IndexedDB persistence while maintaining a clean separation of concerns between device management and node data.
Key Changes
- Refactored device store: Extracted all node-related functionality into a separate, persistent NodeDB store
- Enhanced persistence layer: Rewrote JSON serialization to support Maps, Uint8Arrays, and other complex data types with extensible handlers
- Improved device context: Replaced direct Device object passing with device ID-based context for better data flow management
Reviewed Changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/web/src/core/stores/nodeDBStore/ | New persistent NodeDB store with comprehensive node management and error handling |
| packages/web/src/core/stores/utils/indexDB.ts | Enhanced serialization framework supporting multiple data types with extensible handlers |
| packages/web/src/core/stores/utils/useDeviceContext.ts | New context system for device ID-based data access |
| packages/web/src/core/stores/deviceStore/index.ts | Removed node-related methods, focused on device-specific functionality |
| packages/web/src/core/subscriptions.ts | Updated to work with separate NodeDB store and enhanced PKI validation |
| Multiple component files | Updated imports and method calls to use new NodeDB store |
Comments suppressed due to low confidence (1)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
really like this idea -- will help a lot with initial connection |
|
We can merge this now, but it looks like two tests are failing. Its up to you if you want to fix these tests first then merge or merge and fix them on main. |
Of course... forgot to mock the featureFlag in tests |
Description
This is a PR that adds persistence of node database. This is the first step towards safe persistence of messages, telemetry and so on.
More testing is needed before merging
Future work:
Related Issues
Changes Made
Major:
Minor:
Testing Done
Screenshots (if applicable)
Checklist
CONTRIBUTING_I18N_DEVELOPER_GUIDE.md for more details)