Commit graph

115 commits

Author SHA1 Message Date
Winston Lowe
1fba5312a2
Refactor storage classes to include companion's public key (#277)
* Refactor storage classes to include public key handling and improve data loading/saving logic

* Remove redundant publicKeyHex handling from ContactDiscoveryStore and fix key reference in saveContacts method

* Remove unused app_logger import from ContactDiscoveryStore

* Add warning log for empty publicKeyHex in saveChannelMessages method

* Add warning log for empty publicKeyHex in clearMessages method

* Migrate legacy storage keys to scoped keys across multiple stores

* Remove legacy unscoped keys during migration in storage classes

* Update lib/storage/contact_store.dart

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-12 00:14:48 -07:00
zjs81
a1b77bb29b
Merge pull request #269 from zjs81/dev-latLonFix
Changed contacts latitude and longitude fields to be null until parsed and set
2026-03-07 13:53:09 -07:00
zjs81
e4285774a0 Merge branch 'main' into feature/usb 2026-03-07 13:03:15 -07:00
zjs81
b2da695102 Run dart format 2026-03-07 13:01:27 -07:00
zjs81
e1327a93c7 Fix contact sync fallback when channel 0 never arrives
On web BLE, contact sync is deferred until channel 0 arrives via
_handleChannelInfo. If channel 0 times out or channel sync completes
without it, _pendingInitialContactsSync stays true and contacts never
load. Add fallback in _cleanupChannelSync to trigger getContacts() if
the flag is still set when channel sync ends.
2026-03-07 13:00:23 -07:00
zjs81
fef73b7b62 Refactor USB screen, add debug logging, fix UI issues
- Rewrite UsbScreen to mirror ScannerScreen patterns (status bar,
  tap-to-connect port list, bottom FABs, SnackBar errors)
- Extract MeshCoreUsbManager from MeshCoreConnector for cleaner
  USB transport ownership
- Add debug logging throughout USB connection flow (connector,
  manager, web/native services)
- Print debug logs to console in debug mode even when app debug
  log setting is disabled
- Localize remaining hardcoded strings (Web Serial Device fallback
  label, USB status bar keys, companion firmware timeout hint)
- Fix Swedish misspelling in translations (stöderliga → stödda)
- Guard Linux notification init against missing D-Bus session bus
- Fix SNRIndicator hit-test error by adding minimum size constraints
- Update USB flow tests for new UI patterns
2026-03-07 12:38:28 -07:00
Winston Lowe
84ec139ce6 Add latitude and longitude fields to contact handling in MeshCoreConnector 2026-03-07 11:02:47 -08:00
Winston Lowe
b748b96237
Enhance contact handling logic in MeshCoreConnector to support conditional addition based on auto-add settings (#268) 2026-03-07 01:45:53 -08:00
Winston Lowe
c2671ac2ae
Refactor data handling of contacts (#267)
* Refactor data handling in MeshCoreConnector and BufferReader for improved readability and efficiency

* Update lib/connector/meshcore_connector.dart

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix pointer tracking in BufferReader's readCString method

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-07 01:23:46 -08:00
just-stuff-tm
0565cee461 Enhance message merging logic and improve USB port listing 2026-03-06 20:38:03 -05:00
just-stuff-tm
ab2b509d6a Merge branch 'main' into feature/usb 2026-03-06 20:31:05 -05:00
zjs81
8eb6f32fef
Merge pull request #239 from zjs81/dev-notifyListener
Implements a debounced notification listener in MeshCoreConnector
2026-03-06 14:52:27 -07:00
zjs81
d96cd34771
Merge pull request #251 from zjs81/dev-discoverScreen
Contact discovery
2026-03-06 11:59:24 -07:00
just_stuff_tm
524558c511 clean 2026-03-05 02:26:37 -05:00
just_stuff_tm
21ff765e41 Refactor USB permission handling and reset initial channel sync flag 2026-03-05 02:26:37 -05:00
just_stuff_tm
44c0670dae Refine USB transport flow
- replace Android USB dependency with app-owned USB host implementation\n- restore BLE-first scanner flow with USB secondary action\n- tighten Web Serial key handling and disconnect logging\n\nTODO (follow-up):\n- review non-English localization copy for tone and consistency\n- trim remaining unused/awkward localization strings introduced during USB UI changes
2026-03-05 02:26:37 -05:00
Ben Allfree
e6c9a3fea7 wip 2026-03-05 02:25:46 -05:00
just_stuff_tm
f5154b0033 Improve sender name resolution for room server messages by handling missing room-contact keys 2026-03-05 02:25:46 -05:00
just_stuff_tm
4c7ee3b3b0 Enhance USB serial services with debug logging and reset functionality
- Introduced debug logging in USB serial services for better traceability.
- Added reset method to UsbSerialFrameDecoder to clear buffered data.
- Updated tests to verify the reset functionality of the decoder.
2026-03-05 02:25:46 -05:00
just_stuff_tm
c2f544eeba I restored the Web BLE behavior in [meshcore_connector.dart] to the earlier Windows/Chrome-working state aligned with the logic that was present around commit fcef3de57837983a300634aa3e0a77622e945cc2,
What is back:
- Web BLE resets handshake state before connect
- skips `requestMtu()` on web
- retries `discoverServices()` once on the transient web disconnect case
- uses the non-blocking web `setNotifyValue(true)` workaround again
- skips the immediate `SELF_INFO` wait/refresh stack on web BLE
- defers contact loading on web BLE until after channel `0`
- uses the Web-specific bounded `SELF_INFO` retry timer
- re-enables initial channel-sync gating for web BLE
2026-03-05 02:25:05 -05:00
just_stuff_tm
98cdac4309 Refactor MeshCoreConnector to streamline connection handling and remove web-specific logic for contact synchronization... Back to the way it was before.. For some reason the fix worked on my machine but wwhen i built web from upstream it didnt work 2026-03-05 02:25:05 -05:00
just_stuff_tm
d6d11eaad2 Update active USB port key and label on connection, notify listeners 2026-03-05 02:25:05 -05:00
just_stuff_tm
3cef9e81b6 Remove unawaited background service start during USB connection initialization 2026-03-05 02:25:05 -05:00
just_stuff_tm
5216e00807 Refactor USB port handling to introduce display labels and improve state management 2026-03-05 02:25:05 -05:00
just_stuff_tm
781090243c Enhance USB functionality by adding request port label management and platform support checks 2026-03-05 02:25:05 -05:00
just_stuff_tm
dcad5c586d Refactor USB connection handling to use scheduled closure and improve error management in USB services 2026-03-05 02:25:05 -05:00
just_stuff_tm
c041e05972 Improve error message for unavailable RX characteristic in USB communication 2026-03-05 02:25:05 -05:00
just_stuff_tm
2d1160d992 Enhance BLE connection handling and improve USB connection messaging
- Wrapped BLE scan and connection methods in try-catch blocks to handle errors gracefully and provide debug output.
- Added retry logic for service discovery on web platforms after transient disconnections.
- Updated USB connection messages in multiple languages to reflect active support on Android and desktop platforms.
- Improved loading indicators for contacts screen to show a spinner during data loading.
2026-03-05 02:25:05 -05:00
just_stuff_tm
ee3af52c0f Add initial contacts sync handling for web Bluetooth transport 2026-03-05 02:25:05 -05:00
just_stuff_tm
98f7c3b088 Refactor USB handling to improve connection management and error cleanup 2026-03-05 02:25:05 -05:00
just_stuff_tm
f462815775 Refactor USB connection handling and improve notification setup 2026-03-05 02:25:05 -05:00
just_stuff_tm
5f4333398e Enhance Bluetooth scanning and notification handling for web platform 2026-03-05 02:25:05 -05:00
just_stuff_tm
c23a1da430 Add web serial support and USB tests 2026-03-05 02:25:05 -05:00
just_stuff_tm
22a53439b1 Initialize USB Supoport for Andriod and Desktop 2026-03-05 02:25:05 -05:00
Winston Lowe
7d8e049745
Enhance message parsing and error handling in MeshCoreConnector (#260)
* Enhance readString method to include Latin-1 fallback for decoding errors

* Refactor _parseContactMessage to improve error handling and message parsing logic

* Update lib/connector/meshcore_connector.dart

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-04 22:56:39 -08:00
Winston Lowe
d53465d13b persist discovered contacts when all are removed 2026-03-03 17:57:56 -08:00
Winston Lowe
a0efbbe4bd Persist Discovered Contacts when updated 2026-03-03 17:44:28 -08:00
Winston Lowe
38856c67e5 feat: Add functionality to delete all discovered contacts
- Implemented a new method to remove all discovered contacts from the list.
- Added confirmation dialog for deleting all discovered contacts in the discovery screen.
- Updated localization files to include new strings for deleting all discovered contacts.
- Refactored contact import logic to streamline the process.
- Enhanced the discovery handling to notify users appropriately based on settings.
2026-03-02 10:23:14 -08:00
Winston Lowe
8d73602509 add flags for manual contact addition and telemetry mode handling 2026-03-01 14:36:04 -08:00
Winston Lowe
fcab69f9f0 refactor(connector): adjust frame length check and simplify contact handling logic
refactor(settings): extract settings sending logic into a separate method
refactor(ble_debug_log_service): remove unused command case for radio settings
refactor(app_bar): update compact width threshold for app bar display
2026-03-01 13:05:57 -08:00
Winston Lowe
b02225c02e refactor(connector): remove unused radio settings frame and update command constant 2026-03-01 10:41:31 -08:00
Winston Lowe
12bf46bba1 feat(localization): update contact settings translations for multiple languages
- Translated contact settings and related strings in Slovenian, Swedish, Ukrainian, Chinese, Dutch, Polish, Portuguese, Russian, and Slovak.
- Added new strings for discovered contacts actions such as adding, copying, and deleting contacts.
- Enhanced the DiscoveryContact model to include a rawPacket field for better data handling.
- Updated the contacts screen to support new actions in the context menu for discovered contacts.
- Improved the contact discovery store to handle the serialization of the new rawPacket field.
2026-03-01 10:13:17 -08:00
Winston Lowe
75610695c2 Add contact settings and discovery features
- Implemented contact settings in localization files for Swedish, Ukrainian, and Chinese.
- Added new DiscoveryContact model to handle discovered contacts.
- Created DiscoveryScreen to display discovered contacts with filtering and sorting options.
- Integrated contact discovery storage to persist discovered contacts.
- Updated settings screen to include options for automatic contact addition.
- Enhanced app bar and list filter widgets for better user experience.
- Fixed variable naming inconsistencies in contact model.
2026-02-28 19:11:11 -08:00
Winston Lowe
2a62390903 Implement debounced notification listener updates in MeshCoreConnector 2026-02-25 21:58:35 -08:00
Ben Allfree
75d25f6312 Merge branch 'main' into chrome/main 2026-02-24 22:51:51 -08:00
Ben Allfree
d88786bb0f ble filtering 2026-02-24 22:41:03 -08:00
ericz
5a70ed48cf favorites handling only 2026-02-24 23:56:30 +01:00
Ben Allfree
4975b5366e formatting fixes 2026-02-22 11:34:37 -08:00
Ben Allfree
8e07440114 BLE fix 2026-02-22 08:38:22 -08:00
Ben Allfree
71129bdf4d chrome BLE load fix 2026-02-22 08:37:07 -08:00