-
Notifications
You must be signed in to change notification settings - Fork 201
Persists device and app stores across sessions #860
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?
Conversation
@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 device and app stores, ensuring that this information is retained across sessions. It modernizes the store architecture with feature flag-controlled persistence and improves the factory reset functionality to properly clear all stored data.
Key changes include:
- Added comprehensive persistence support for device and app stores using IndexedDB
- Enhanced factory reset dialog to clear all stores and reload the client
- Refactored store utilities to support both arrays and maps for data retention management
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/web/src/pages/Dashboard/index.tsx | Temporarily commented out device listing functionality |
packages/web/src/core/stores/utils/evictOldestEntries.ts | Extended utility to handle both arrays and maps with function overloads |
packages/web/src/core/stores/nodeDBStore/nodeDBStore.test.tsx | Fixed optional chaining for test assertion |
packages/web/src/core/stores/nodeDBStore/nodeDBStore.mock.ts | Added missing mock methods for node cleanup |
packages/web/src/core/stores/nodeDBStore/index.ts | Restructured data types and extracted IDB key constant |
packages/web/src/core/stores/messageStore/index.ts | Restructured data types and extracted IDB key constant |
packages/web/src/core/stores/index.ts | Updated import paths with explicit file extensions |
packages/web/src/core/stores/deviceStore/types.ts | Extracted type definitions to separate file |
packages/web/src/core/stores/deviceStore/index.ts | Implemented comprehensive device store persistence |
packages/web/src/core/stores/deviceStore/deviceStore.test.ts | Added extensive test coverage for device store functionality |
packages/web/src/core/stores/deviceStore/deviceStore.mock.ts | Added missing myNodeNum property to mock |
packages/web/src/core/stores/appStore/types.ts | Extracted RasterSource type definition |
packages/web/src/core/stores/appStore/index.ts | Implemented app store persistence with feature flag support |
packages/web/src/core/stores/appStore/appStore.test.ts | Added comprehensive test coverage for app store |
packages/web/src/core/services/featureFlags.ts | Added feature flags for device and app persistence |
packages/web/src/core/services/dev-overrides.ts | Enabled new persistence features in development |
packages/web/src/components/Dialog/FactoryResetDeviceDialog/FactoryResetDeviceDialog.tsx | Enhanced to clear all stores and force client reload |
packages/web/src/components/Dialog/FactoryResetDeviceDialog/FactoryResetDeviceDialog.test.tsx | Updated tests for new factory reset behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/web/src/components/Dialog/FactoryResetDeviceDialog/FactoryResetDeviceDialog.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Description
This PR implements persistence for device and app stores, ensuring that this information is retained across sessions.
Related Issues
Changes Made
Testing Done
Adds new unit tests to verify state and persistence functionality of the app and device store.
Screenshots (if applicable)
Checklist
CONTRIBUTING_I18N_DEVELOPER_GUIDE.md for more details)