refactor: device connection logic, added nonce to get config only#946
Conversation
|
@danditomaso is attempting to deploy a commit to the Meshtastic Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new MeshService class to centralize connection management and configuration flow for mesh devices. The service manages the lifecycle of device connections, batches node information during initial configuration for performance, and implements a two-stage configuration flow with heartbeat management.
Key changes:
- New
MeshServiceclass for managing mesh device connections and configuration - Refactored node handling to batch-process nodes during initial configuration and process individually afterward
- Added
pruneStaleNodesfunctionality to nodeDB store with 14-day retention policy - Updated connection status handling and event subscriptions
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/web/src/core/services/MeshService.ts | New service class for connection lifecycle management, configuration flow, and heartbeat handling |
| packages/web/src/pages/Connections/useConnections.ts | Integrated MeshService for connection management, updated setupMeshDevice to handle batched nodes |
| packages/web/src/core/subscriptions.ts | Removed individual node handling logic, now delegated to MeshService |
| packages/web/src/core/stores/nodeDBStore/index.ts | Added pruneStaleNodes method with 14-day retention, removed old eviction logic |
| packages/web/src/core/stores/nodeDBStore/nodeDBStore.mock.ts | Updated mock to include new pruneStaleNodes method |
| packages/core/src/utils/transform/decodePacket.ts | Updated config complete handling to emit event for MeshService |
| packages/core/src/utils/eventSystem.ts | Added onConfigComplete event dispatcher |
| packages/web/src/components/DeviceInfoPanel.tsx | Extended status color mapping for new connection states |
| packages/web/src/components/Dialog/AddConnectionDialog/AddConnectionDialog.tsx | Type improvement: using ConnectionType instead of string literal union |
| packages/web/src/components/PageComponents/Map/Markers/NodeMarker.tsx | Removed unused label parameter |
| packages/web/src/pages/Connections/index.tsx | Removed extra blank line |
| .gitignore | Added .DS_Store exclusion |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
* Add badge indicator on layers icon. (#894) * feat: indicate number of layers enabled. * Update packages/web/src/components/PageComponents/Map/Tools/MapLayerTool.tsx Co-authored-by: Copilot <[email protected]> * fix: reduced code duplication in layers component * fixed unread message bubble --------- Co-authored-by: Copilot <[email protected]> * fix(actions): improve main to stable release workflow (#895) * fix(actions): improve main to stable release workflow * Update .github/workflows/update-stable-from-master.yml Co-authored-by: Copilot <[email protected]> * Update .github/workflows/update-stable-from-master.yml Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix(ui): logic on waypoint layer component caused 0 to be shown in UI (#896) * fix(ui): logic on waypoint layer component caused 0 to be shown in UI * Update packages/web/src/components/PageComponents/Map/Popups/WaypointDetail.tsx Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * chore(i18n): New Crowdin Translations by GitHub Action (#899) Co-authored-by: Crowdin Bot <[email protected]> * Update readme with new widgets (#901) * chore: add new widgets to readme * add docs url * Update README.md Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * feat(i18n): add fr localization support (#902) * feat: add fr support * fix(i18n): ensure langs are sorted before being displayed. * feat(ci): add CI workflow to automatically close issue after 60 days (#897) * feat(ci): add CI workflow to automatically close issue after 60 days * run once pe github issue to run once per day * chore(deps): bump vite from 7.1.9 to 7.1.11 (#903) Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.1.9 to 7.1.11. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v7.1.11/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 7.1.11 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update inactive issue workflow schedule and settings (#905) * Update inactive issue workflow schedule and settings * Update .github/workflows/inactive-issue.yml Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Persists device and app stores across sessions (#860) * Persistence for device and app data * esphemeral -> ephemeral Co-authored-by: Copilot <[email protected]> * devices -> app Co-authored-by: Copilot <[email protected]> * Additional waypoint methods, update mock, update tests --------- Co-authored-by: philon- <[email protected]> Co-authored-by: Copilot <[email protected]> * Fix description for historyReturnWindow (#907) It's not number of records but the time window... * Feat(config): Align settings menu to match android/ios (#906) * feat: aligned settings menu to match android/ios * updated sidebar text size. * Update packages/web/public/i18n/locales/en/config.json Co-authored-by: Copilot <[email protected]> * Update packages/web/public/i18n/locales/en/config.json Co-authored-by: Copilot <[email protected]> * Update packages/web/src/components/PageComponents/Settings/User.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/components/PageComponents/ModuleConfig/Telemetry.tsx Co-authored-by: Copilot <[email protected]> * linting/formatting fixes * fixed formatting issue --------- Co-authored-by: Copilot <[email protected]> * chore: add new folders to biome config (#910) * chore(i18n): New Crowdin Translations by GitHub Action (#908) Co-authored-by: Crowdin Bot <[email protected]> * fix: use correct deprecated GPS coordinate format enum (#917) The Config_DisplayConfig_GpsCoordinateFormat export doesn't exist in the protobufs package. The correct export is Config_DisplayConfig_DeprecatedGpsCoordinateFormat, which matches what's used in the validation schema. Added TODO comment explaining that this field is deprecated since protobufs 2.7.4 and should be migrated to DeviceUIConfig.gps_format when DeviceUI settings are implemented. * style: fix line wrapping for GPS coordinate format enum (#918) - Split long enum reference across multiple lines to improve code readability - Maintains consistent code formatting standards without changing functionality * feat(state): enable deviceStore persistance (#922) * fix(core): ensure core package works in browser (#923) * fix(core): ensure core package works in browser * style(core): revert new line removal * fix: add @serialport/bindings-cpp to onlyBuiltDependencies (#914) * feat(ui): Add UI library (#900) * feat: scaffold UI library * Update packages/ui/src/components/theme-provider.tsx Co-authored-by: Copilot <[email protected]> * add lock file * lint/formatting fixes --------- Co-authored-by: Copilot <[email protected]> * fix: added skelton loader for message items (#927) * feat(connections): Add connections page (replaces new device dialog) (#919) * feat(conn): add connection screen and logic * fixes from code review * force https * code review fixes * add http for self testing * enable deviceStore persistance * added translations * disabled feature flag * i18n updates * chore: add new folders to biome config (#910) * chore(i18n): New Crowdin Translations by GitHub Action (#908) Co-authored-by: Crowdin Bot <[email protected]> * fix: use correct deprecated GPS coordinate format enum (#917) The Config_DisplayConfig_GpsCoordinateFormat export doesn't exist in the protobufs package. The correct export is Config_DisplayConfig_DeprecatedGpsCoordinateFormat, which matches what's used in the validation schema. Added TODO comment explaining that this field is deprecated since protobufs 2.7.4 and should be migrated to DeviceUIConfig.gps_format when DeviceUI settings are implemented. * style: fix line wrapping for GPS coordinate format enum (#918) - Split long enum reference across multiple lines to improve code readability - Maintains consistent code formatting standards without changing functionality * fix(core): ensure core package works in browser (#923) * fix(core): ensure core package works in browser * style(core): revert new line removal * fix: add @serialport/bindings-cpp to onlyBuiltDependencies (#914) * feat(ui): Add UI library (#900) * feat: scaffold UI library * Update packages/ui/src/components/theme-provider.tsx Co-authored-by: Copilot <[email protected]> * add lock file * lint/formatting fixes --------- Co-authored-by: Copilot <[email protected]> * formatting/linting fixes * fixed some paring logic * fixed connection issue with serial --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Crowdin Bot <[email protected]> Co-authored-by: Kamil Dzieniszewski <[email protected]> Co-authored-by: Azarattum <[email protected]> Co-authored-by: Ben Allfree <[email protected]> Co-authored-by: Copilot <[email protected]> * fix(ci): add ui library to excluded list (#928) * fix(config): update change registry channel value (#929) * fix(config): update change registry channel value * format/linting * chore(i18n): New Crowdin Translations by GitHub Action (#924) Co-authored-by: Crowdin Bot <[email protected]> * fix(connections): ensure connections reflect actual status. (#930) * fix(connection): support port on HTTP connection (#935) * feat(docker): add arm v7 support (#934) * feat(ui): match avatar color other platforms (#933) * feat(ui): match avatar color other platforms * Update packages/web/src/components/UI/Avatar.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/components/DeviceInfoPanel.tsx Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix(ui): fix add connection dialog typo (#938) * fix(i18n): Correct 'disconnected' typo in connections.json (#943) * fix(i18n): Correct 'disconnected' typo in connections.json * fix(i18n): Correct typo 'checkConnetion' to 'checkConnection' * Fix(i18n): Correct typo in connection test description --------- Co-authored-by: philon- <[email protected]> * chore(i18n): New Crowdin Translations by GitHub Action (#941) Co-authored-by: Crowdin Bot <[email protected]> * Add 'packages/web' to excluded directories (#947) * refactor: device connection logic, added nonce to get config only (#946) * refactor: device connection logic, added nonce to get config only on connect. * Update packages/web/src/core/services/MeshService.ts Co-authored-by: Copilot <[email protected]> * Update packages/web/src/pages/Connections/useConnections.ts Co-authored-by: Copilot <[email protected]> * code review fixes * fixes from code review * ui fixes * refactored meshService, moved code into deviceStore. Fixed some connnection issues * formatting fixes --------- Co-authored-by: Copilot <[email protected]> * fix: removed duplicate images (#951) * feat: add devcontainer (#953) * fix(ui): add language switcher to connections page (#954) * fix(ui): add language switcher to connections page * desciption length fix * Update packages/web/src/pages/Connections/index.tsx Co-authored-by: Copilot <[email protected]> * add new language picker key --------- Co-authored-by: Copilot <[email protected]> * chore(i18n): New Crowdin Translations by GitHub Action (#958) Co-authored-by: Crowdin Bot <[email protected]> * fix: interpolate longName and shortName in PKI backup download (#959) This caused {{shortName}} and {{longName}} to appear unformatted in the exported key files: ``` === MESHTASTIC KEYS FOR {{longName}} ({{shortName}}) === Private Key: <censored> Public Key: <censored> === END OF KEYS === ``` The fix simply replicates the behaviour used elsewhere in PKIIBackupDialog. * fix(ui): removed internet hosted fonts from app (#955) * fix(ui): removed internet hosted fonts from app * Update packages/web/src/components/generic/Mono.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/components/UI/Typography/Code.tsx Co-authored-by: Copilot <[email protected]> * removed unsupported font extention * formatter fix --------- Co-authored-by: Copilot <[email protected]> * chore(i18n): New Crowdin Translations by GitHub Action (#962) Co-authored-by: Crowdin Bot <[email protected]> * fix(ui): correct typo in languagePicker key and adjust description width (#961) Fixed typo 'languagePickeer' to 'languagePicker' in DeviceInfoPanel and corrected responsive width class from 'md:w-6' to 'md:w-5/6' in Connections page description. * chore(deps-dev): bump happy-dom from 20.0.0 to 20.0.2 (#968) Bumps [happy-dom](https://github.com/capricorn86/happy-dom) from 20.0.0 to 20.0.2. - [Release notes](https://github.com/capricorn86/happy-dom/releases) - [Commits](capricorn86/happy-dom@v20.0.0...v20.0.2) --- updated-dependencies: - dependency-name: happy-dom dependency-version: 20.0.2 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(ui): add "never" i18n string, fix "Favorite" tooltip (#965) * fix(ui): add "never" i18n string, fix "Favorite" tooltip * format * format --------- Co-authored-by: Pmmlabs <[email protected]> * feat: add fixed position coordinate picker (#909) * chore: remove unused logo SVG files * feat: add interactive fixed position picker with map interface - Created new FixedPositionPicker component with clickable map for setting device coordinates - Added form field type for fixed position picker that appears when fixedPosition toggle is enabled - Implemented position request functionality to retrieve current device location * feat: display altitude unit based on user's display settings - Added dynamic altitude unit (Meters/Feet) that respects the user's imperial/metric display preference - Updated altitude field description to show the appropriate unit instead of hardcoded "Meters" * refactor: replace any type with MapLayerMouseEvent in map click handler * refactor: improve accessibility and code quality in FixedPositionPicker - Replace hardcoded IDs with useId() hook for proper accessibility - Use Number.isNaN() instead of isNaN() for more reliable type checking - Add radix parameter to parseInt() and remove unnecessary fragment wrapper * refactor: simplify fixed position picker integration - Removed dedicated FixedPositionPicker form field type in favor of toggle's additionalContent prop - Moved FixedPositionPicker to render conditionally within toggle field instead of as separate dynamic field - Streamlined form field types by eliminating FixedPositionPickerFieldProps * style: format code with consistent line breaks and import ordering * refactor: simplify fixed position picker container styling * feat: disable fixed position toggle when GPS is enabled * refactor: use ComponentRef instead of ElementRef in Switch component * refactor: replace interactive map picker with inline coordinate fields for fixed position - Removed FixedPositionPicker component with map interface - Added latitude, longitude, and altitude fields directly to position form - Moved coordinate validation into PositionValidationSchema with proper min/max bounds - Updated translation strings to include coordinate ranges and improved altitude description - Coordinates now sent via setFixedPosition admin message on form submit when fixedPosition is enabled * refactor: simplify toggle field by removing additionalContent prop and unused field spreading - Removed additionalContent prop and its JSDoc documentation from ToggleFieldProps - Removed rendering of additionalContent below toggle switch - Cleaned up Controller render function by removing unused rest spread operator - Renamed field destructuring to controllerField for clarity * refactor: improve fixed position handling and add position broadcast request - Restructure onSubmit to save config before sending admin message - Add position broadcast request after setting fixed position to immediately update display - Add comprehensive debug logging throughout submission flow - Extract coordinate exclusion logic earlier in submission process for clarity - Add 1 second delay before requesting position broadcast to allow fixed position processing * feat: add max length constraint to latitude and longitude fields - Set fieldLength.max to 10 for both latitude and longitude inputs - Prevents excessive decimal precision while maintaining 7 decimal places (±1.1cm accuracy) * feat(ui): add SNR, RSSI, hops info for messages (#963) * feat(ui): add SNR, RSSI, hops, MQTT info for messages * review fixes * zeros for new fields * Move label under the message --------- Co-authored-by: Pmmlabs <[email protected]> * feat(map): add heatmap layer (#969) * feat: add heatmap layer * Update packages/web/src/components/PageComponents/Map/Layers/HeatmapLayer.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/components/PageComponents/Map/Tools/MapLayerTool.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/pages/Map/index.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/pages/Map/index.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/components/PageComponents/Map/Layers/HeatmapLayer.tsx Co-authored-by: Copilot <[email protected]> * lint/formatting fixes --------- Co-authored-by: Copilot <[email protected]> * Revert "feat(ui): add SNR, RSSI, hops info for messages (#963)" (#974) This reverts commit 020e9d6. * Update README with Buf CLI installation instructions (#981) Added instructions for installing the Buf CLI. * Channel bandwidth is kHz, not MHz (#983) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Crowdin Bot <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jeremy Gallant <[email protected]> Co-authored-by: philon- <[email protected]> Co-authored-by: Wessel <[email protected]> Co-authored-by: Kamil Dzieniszewski <[email protected]> Co-authored-by: Azarattum <[email protected]> Co-authored-by: Ben Allfree <[email protected]> Co-authored-by: jsacrist <[email protected]> Co-authored-by: zeo <[email protected]> Co-authored-by: Kamil Dzieniszewski <[email protected]> Co-authored-by: Alexey Stepanov <[email protected]> Co-authored-by: Pmmlabs <[email protected]> Co-authored-by: rj-xy <[email protected]>
* Add badge indicator on layers icon. (#894) * feat: indicate number of layers enabled. * Update packages/web/src/components/PageComponents/Map/Tools/MapLayerTool.tsx Co-authored-by: Copilot <[email protected]> * fix: reduced code duplication in layers component * fixed unread message bubble --------- Co-authored-by: Copilot <[email protected]> * fix(actions): improve main to stable release workflow (#895) * fix(actions): improve main to stable release workflow * Update .github/workflows/update-stable-from-master.yml Co-authored-by: Copilot <[email protected]> * Update .github/workflows/update-stable-from-master.yml Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix(ui): logic on waypoint layer component caused 0 to be shown in UI (#896) * fix(ui): logic on waypoint layer component caused 0 to be shown in UI * Update packages/web/src/components/PageComponents/Map/Popups/WaypointDetail.tsx Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * chore(i18n): New Crowdin Translations by GitHub Action (#899) Co-authored-by: Crowdin Bot <[email protected]> * Update readme with new widgets (#901) * chore: add new widgets to readme * add docs url * Update README.md Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * feat(i18n): add fr localization support (#902) * feat: add fr support * fix(i18n): ensure langs are sorted before being displayed. * feat(ci): add CI workflow to automatically close issue after 60 days (#897) * feat(ci): add CI workflow to automatically close issue after 60 days * run once pe github issue to run once per day * chore(deps): bump vite from 7.1.9 to 7.1.11 (#903) Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.1.9 to 7.1.11. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v7.1.11/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 7.1.11 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update inactive issue workflow schedule and settings (#905) * Update inactive issue workflow schedule and settings * Update .github/workflows/inactive-issue.yml Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Persists device and app stores across sessions (#860) * Persistence for device and app data * esphemeral -> ephemeral Co-authored-by: Copilot <[email protected]> * devices -> app Co-authored-by: Copilot <[email protected]> * Additional waypoint methods, update mock, update tests --------- Co-authored-by: philon- <[email protected]> Co-authored-by: Copilot <[email protected]> * Fix description for historyReturnWindow (#907) It's not number of records but the time window... * Feat(config): Align settings menu to match android/ios (#906) * feat: aligned settings menu to match android/ios * updated sidebar text size. * Update packages/web/public/i18n/locales/en/config.json Co-authored-by: Copilot <[email protected]> * Update packages/web/public/i18n/locales/en/config.json Co-authored-by: Copilot <[email protected]> * Update packages/web/src/components/PageComponents/Settings/User.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/components/PageComponents/ModuleConfig/Telemetry.tsx Co-authored-by: Copilot <[email protected]> * linting/formatting fixes * fixed formatting issue --------- Co-authored-by: Copilot <[email protected]> * chore: add new folders to biome config (#910) * chore(i18n): New Crowdin Translations by GitHub Action (#908) Co-authored-by: Crowdin Bot <[email protected]> * fix: use correct deprecated GPS coordinate format enum (#917) The Config_DisplayConfig_GpsCoordinateFormat export doesn't exist in the protobufs package. The correct export is Config_DisplayConfig_DeprecatedGpsCoordinateFormat, which matches what's used in the validation schema. Added TODO comment explaining that this field is deprecated since protobufs 2.7.4 and should be migrated to DeviceUIConfig.gps_format when DeviceUI settings are implemented. * style: fix line wrapping for GPS coordinate format enum (#918) - Split long enum reference across multiple lines to improve code readability - Maintains consistent code formatting standards without changing functionality * feat(state): enable deviceStore persistance (#922) * fix(core): ensure core package works in browser (#923) * fix(core): ensure core package works in browser * style(core): revert new line removal * fix: add @serialport/bindings-cpp to onlyBuiltDependencies (#914) * feat(ui): Add UI library (#900) * feat: scaffold UI library * Update packages/ui/src/components/theme-provider.tsx Co-authored-by: Copilot <[email protected]> * add lock file * lint/formatting fixes --------- Co-authored-by: Copilot <[email protected]> * fix: added skelton loader for message items (#927) * feat(connections): Add connections page (replaces new device dialog) (#919) * feat(conn): add connection screen and logic * fixes from code review * force https * code review fixes * add http for self testing * enable deviceStore persistance * added translations * disabled feature flag * i18n updates * chore: add new folders to biome config (#910) * chore(i18n): New Crowdin Translations by GitHub Action (#908) Co-authored-by: Crowdin Bot <[email protected]> * fix: use correct deprecated GPS coordinate format enum (#917) The Config_DisplayConfig_GpsCoordinateFormat export doesn't exist in the protobufs package. The correct export is Config_DisplayConfig_DeprecatedGpsCoordinateFormat, which matches what's used in the validation schema. Added TODO comment explaining that this field is deprecated since protobufs 2.7.4 and should be migrated to DeviceUIConfig.gps_format when DeviceUI settings are implemented. * style: fix line wrapping for GPS coordinate format enum (#918) - Split long enum reference across multiple lines to improve code readability - Maintains consistent code formatting standards without changing functionality * fix(core): ensure core package works in browser (#923) * fix(core): ensure core package works in browser * style(core): revert new line removal * fix: add @serialport/bindings-cpp to onlyBuiltDependencies (#914) * feat(ui): Add UI library (#900) * feat: scaffold UI library * Update packages/ui/src/components/theme-provider.tsx Co-authored-by: Copilot <[email protected]> * add lock file * lint/formatting fixes --------- Co-authored-by: Copilot <[email protected]> * formatting/linting fixes * fixed some paring logic * fixed connection issue with serial --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Crowdin Bot <[email protected]> Co-authored-by: Kamil Dzieniszewski <[email protected]> Co-authored-by: Azarattum <[email protected]> Co-authored-by: Ben Allfree <[email protected]> Co-authored-by: Copilot <[email protected]> * fix(ci): add ui library to excluded list (#928) * fix(config): update change registry channel value (#929) * fix(config): update change registry channel value * format/linting * chore(i18n): New Crowdin Translations by GitHub Action (#924) Co-authored-by: Crowdin Bot <[email protected]> * fix(connections): ensure connections reflect actual status. (#930) * fix(connection): support port on HTTP connection (#935) * feat(docker): add arm v7 support (#934) * feat(ui): match avatar color other platforms (#933) * feat(ui): match avatar color other platforms * Update packages/web/src/components/UI/Avatar.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/components/DeviceInfoPanel.tsx Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * fix(ui): fix add connection dialog typo (#938) * fix(i18n): Correct 'disconnected' typo in connections.json (#943) * fix(i18n): Correct 'disconnected' typo in connections.json * fix(i18n): Correct typo 'checkConnetion' to 'checkConnection' * Fix(i18n): Correct typo in connection test description --------- Co-authored-by: philon- <[email protected]> * chore(i18n): New Crowdin Translations by GitHub Action (#941) Co-authored-by: Crowdin Bot <[email protected]> * Add 'packages/web' to excluded directories (#947) * refactor: device connection logic, added nonce to get config only (#946) * refactor: device connection logic, added nonce to get config only on connect. * Update packages/web/src/core/services/MeshService.ts Co-authored-by: Copilot <[email protected]> * Update packages/web/src/pages/Connections/useConnections.ts Co-authored-by: Copilot <[email protected]> * code review fixes * fixes from code review * ui fixes * refactored meshService, moved code into deviceStore. Fixed some connnection issues * formatting fixes --------- Co-authored-by: Copilot <[email protected]> * fix: removed duplicate images (#951) * feat: add devcontainer (#953) * fix(ui): add language switcher to connections page (#954) * fix(ui): add language switcher to connections page * desciption length fix * Update packages/web/src/pages/Connections/index.tsx Co-authored-by: Copilot <[email protected]> * add new language picker key --------- Co-authored-by: Copilot <[email protected]> * chore(i18n): New Crowdin Translations by GitHub Action (#958) Co-authored-by: Crowdin Bot <[email protected]> * fix: interpolate longName and shortName in PKI backup download (#959) This caused {{shortName}} and {{longName}} to appear unformatted in the exported key files: ``` === MESHTASTIC KEYS FOR {{longName}} ({{shortName}}) === Private Key: <censored> Public Key: <censored> === END OF KEYS === ``` The fix simply replicates the behaviour used elsewhere in PKIIBackupDialog. * fix(ui): removed internet hosted fonts from app (#955) * fix(ui): removed internet hosted fonts from app * Update packages/web/src/components/generic/Mono.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/components/UI/Typography/Code.tsx Co-authored-by: Copilot <[email protected]> * removed unsupported font extention * formatter fix --------- Co-authored-by: Copilot <[email protected]> * chore(i18n): New Crowdin Translations by GitHub Action (#962) Co-authored-by: Crowdin Bot <[email protected]> * fix(ui): correct typo in languagePicker key and adjust description width (#961) Fixed typo 'languagePickeer' to 'languagePicker' in DeviceInfoPanel and corrected responsive width class from 'md:w-6' to 'md:w-5/6' in Connections page description. * chore(deps-dev): bump happy-dom from 20.0.0 to 20.0.2 (#968) Bumps [happy-dom](https://github.com/capricorn86/happy-dom) from 20.0.0 to 20.0.2. - [Release notes](https://github.com/capricorn86/happy-dom/releases) - [Commits](capricorn86/happy-dom@v20.0.0...v20.0.2) --- updated-dependencies: - dependency-name: happy-dom dependency-version: 20.0.2 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(ui): add "never" i18n string, fix "Favorite" tooltip (#965) * fix(ui): add "never" i18n string, fix "Favorite" tooltip * format * format --------- Co-authored-by: Pmmlabs <[email protected]> * feat: add fixed position coordinate picker (#909) * chore: remove unused logo SVG files * feat: add interactive fixed position picker with map interface - Created new FixedPositionPicker component with clickable map for setting device coordinates - Added form field type for fixed position picker that appears when fixedPosition toggle is enabled - Implemented position request functionality to retrieve current device location * feat: display altitude unit based on user's display settings - Added dynamic altitude unit (Meters/Feet) that respects the user's imperial/metric display preference - Updated altitude field description to show the appropriate unit instead of hardcoded "Meters" * refactor: replace any type with MapLayerMouseEvent in map click handler * refactor: improve accessibility and code quality in FixedPositionPicker - Replace hardcoded IDs with useId() hook for proper accessibility - Use Number.isNaN() instead of isNaN() for more reliable type checking - Add radix parameter to parseInt() and remove unnecessary fragment wrapper * refactor: simplify fixed position picker integration - Removed dedicated FixedPositionPicker form field type in favor of toggle's additionalContent prop - Moved FixedPositionPicker to render conditionally within toggle field instead of as separate dynamic field - Streamlined form field types by eliminating FixedPositionPickerFieldProps * style: format code with consistent line breaks and import ordering * refactor: simplify fixed position picker container styling * feat: disable fixed position toggle when GPS is enabled * refactor: use ComponentRef instead of ElementRef in Switch component * refactor: replace interactive map picker with inline coordinate fields for fixed position - Removed FixedPositionPicker component with map interface - Added latitude, longitude, and altitude fields directly to position form - Moved coordinate validation into PositionValidationSchema with proper min/max bounds - Updated translation strings to include coordinate ranges and improved altitude description - Coordinates now sent via setFixedPosition admin message on form submit when fixedPosition is enabled * refactor: simplify toggle field by removing additionalContent prop and unused field spreading - Removed additionalContent prop and its JSDoc documentation from ToggleFieldProps - Removed rendering of additionalContent below toggle switch - Cleaned up Controller render function by removing unused rest spread operator - Renamed field destructuring to controllerField for clarity * refactor: improve fixed position handling and add position broadcast request - Restructure onSubmit to save config before sending admin message - Add position broadcast request after setting fixed position to immediately update display - Add comprehensive debug logging throughout submission flow - Extract coordinate exclusion logic earlier in submission process for clarity - Add 1 second delay before requesting position broadcast to allow fixed position processing * feat: add max length constraint to latitude and longitude fields - Set fieldLength.max to 10 for both latitude and longitude inputs - Prevents excessive decimal precision while maintaining 7 decimal places (±1.1cm accuracy) * feat(ui): add SNR, RSSI, hops info for messages (#963) * feat(ui): add SNR, RSSI, hops, MQTT info for messages * review fixes * zeros for new fields * Move label under the message --------- Co-authored-by: Pmmlabs <[email protected]> * feat(map): add heatmap layer (#969) * feat: add heatmap layer * Update packages/web/src/components/PageComponents/Map/Layers/HeatmapLayer.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/components/PageComponents/Map/Tools/MapLayerTool.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/pages/Map/index.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/pages/Map/index.tsx Co-authored-by: Copilot <[email protected]> * Update packages/web/src/components/PageComponents/Map/Layers/HeatmapLayer.tsx Co-authored-by: Copilot <[email protected]> * lint/formatting fixes --------- Co-authored-by: Copilot <[email protected]> * Revert "feat(ui): add SNR, RSSI, hops info for messages (#963)" (#974) This reverts commit 020e9d6. * Update README with Buf CLI installation instructions (#981) Added instructions for installing the Buf CLI. * Channel bandwidth is kHz, not MHz (#983) * fix channel importing bug (#1005) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Crowdin Bot <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jeremy Gallant <[email protected]> Co-authored-by: philon- <[email protected]> Co-authored-by: Wessel <[email protected]> Co-authored-by: Kamil Dzieniszewski <[email protected]> Co-authored-by: Azarattum <[email protected]> Co-authored-by: Ben Allfree <[email protected]> Co-authored-by: jsacrist <[email protected]> Co-authored-by: zeo <[email protected]> Co-authored-by: Kamil Dzieniszewski <[email protected]> Co-authored-by: Alexey Stepanov <[email protected]> Co-authored-by: Pmmlabs <[email protected]> Co-authored-by: rj-xy <[email protected]>
Description
This pull request introduces a new
MeshServiceclass to centralize mesh device connection, configuration, and node management logic, replacing scattered event handling and improving the flow for configuration and node updates. It also updates the node database retention strategy to prune stale nodes by age rather than a fixed count, and refactors event handling and status mapping throughout the codebase for consistency and maintainability.MeshService introduction and connection flow improvements:
MeshServiceclass (packages/web/src/core/services/MeshService.ts) to manage device connection lifecycle, configuration state, heartbeat, and node batching, providing a unified event-driven API for mesh device interactions.MeshServiceand its events. [1] [2]Node database retention and pruning:
nodeDBStoreto prune nodes not heard from in the last 14 days, replacing the previous fixed-count eviction strategy. Added a newpruneStaleNodesmethod and integrated pruning into nodeDB initialization and access. [1] [2] [3]pruneStaleNodesmethod. [1] [2]Event and status handling enhancements:
onConfigCompleteevent to the core event system (eventSystem.ts) and updated packet decoding to dispatch this event, enabling the two-stage configuration flow managed byMeshService. [1] [2]Checklist
CONTRIBUTING_I18N_DEVELOPER_GUIDE.md for more details)