Path tracing. This adds support to ping and trace route repeaters and room server.#108
Conversation
and added a trace route builder traceRouteBytes
refactored repeater hub along with contacts screen to use shortPubKeyHex. Added localization strings for path tracing, english only.
Disabled autofocus of password.
|
bugbot run |
|
@cursor review |
- Translate path trace strings to all 14 supported locales - Regenerate localization Dart files - Fix translate.py to also detect empty string values as missing
|
Hey, nice feature! Path tracing will be super useful. A few things I noticed while reviewing: Quick winsTypo (line 31): Trailing space (line 34): Misleading variable name (line 81): final timeoutMs = frameBuffer.readUInt32LE();SimplificationLines 123-126 - comparing single bytes via // Current
if (listEquals(
repeater.publicKey.sublist(0, 1),
Uint8List.fromList([neighbourData]),
))
// Simpler
if (repeater.publicKey[0] == neighbourData)Performance (optional)Lines 119-130 - the nested loop is O(contacts × pathLength). For large meshes this could be optimized with a lookup map: // Build lookup once
final contactsByFirstByte = <int, Contact>{};
for (final c in connector.contacts.where((c) => c.type != advTypeChat)) {
contactsByFirstByte[c.publicKey[0]] = c;
}
// Match path
for (final neighbourData in pathData) {
final contact = contactsByFirstByte[neighbourData];
if (contact != null) pathContacts[neighbourData] = contact;
}QuestionLines 196-198 - is the empty onTap: () {
// Handle item tap
},Overall looks good! The trace UI with SNR indicators is a nice touch. |
The functionality right now is all placed on contacts in the contacts list.
I want to expend the functionality with a map.