fix(ui): refresh Contact Info path display in real-time

Path info in Contact Info modal was stale due to 60s server cache
and no refresh after path operations. Now:
- Invalidate contacts cache after reset_path, change_path, path_update
- Emit 'path_changed' socket event on PATH_UPDATE from device
- UI listens and re-renders Contact Info when path changes
- Reset to FLOOD button immediately refreshes the path display

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-03-27 20:29:26 +01:00
parent 292d1d91af
commit 5df9b4b4a2
3 changed files with 61 additions and 0 deletions
+1
View File
@@ -2322,6 +2322,7 @@ def reset_contact_to_flood(pubkey):
dev_result = dm.reset_path(pubkey)
logger.info(f"reset_path({pubkey[:12]}...) result: {dev_result}")
if dev_result.get('success'):
invalidate_contacts_cache()
return jsonify({'success': True}), 200
return jsonify({'success': False, 'error': dev_result.get('error', 'Device reset failed')}), 500
except Exception as e: