-
Notifications
You must be signed in to change notification settings - Fork 177
Persistent nodedb #780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements persistence for the node database by separating node-related functionality from the monolithic device store into a dedicated nodeDB store. The refactoring improves data organization and enables persistent storage of node information.
Key Changes
- Extracted node-related methods from the device store into a separate nodeDB store with persistence
- Refactored device context to use device IDs instead of device objects
- Rewrote the JSON serializer to support additional data types like Map and Uint8Array
Reviewed Changes
Copilot reviewed 84 out of 85 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
packages/web/src/core/stores/nodeDBStore/index.ts | New persistent nodeDB store with Map storage and Uint8Array support |
packages/web/src/core/stores/utils/indexDB.ts | Generic JSON serializer with custom type handlers for persistence |
packages/web/src/core/stores/deviceStore/index.ts | Removed node-related methods, now focuses on device-specific functionality |
packages/web/src/core/stores/index.ts | Central export file with new useNodeDB and useDevice hooks |
packages/web/src/core/subscriptions.ts | Updated to use separate device and nodeDB stores |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Description
This is a draft PR that adds persistence of node database. This is the first step towards safe persistence of messages, telemetry and so on.
This is very much a rough draft, I just wanted it here so that we can keep track on the progress, what remains and what should (and should not) be part of this PR.
Still remaining before this can be merged:
Related Issues
Changes Made
Major:
Minor:
Testing Done
Screenshots (if applicable)
Checklist
CONTRIBUTING_I18N_DEVELOPER_GUIDE.md for more details)