fix: DID sync between Web5 and Federation, cloud peer names

- Web5 loads node DID from backend on mount (authoritative, survives rotation)
- Federation rotation updates localStorage so Web5 picks up new DID
- Cloud peer names: peerDisplayName() "Node-XXXX" instead of raw DID
- Cloud hides onion addresses from peer cards
- Sync timeout increased to 180s with better error message

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-19 20:59:42 +00:00
parent ffc8e25c17
commit 539dd53677
2 changed files with 9 additions and 0 deletions

View File

@@ -865,6 +865,8 @@ async function rotateDid() {
}>({ method: 'node.rotate-did', params: { password: rotatePassword.value } })
selfDid.value = result.new_did
// Sync with Web5 view's localStorage DID
try { localStorage.setItem('neode_did', result.new_did) } catch { /* noop */ }
rotateSuccess.value = `DID rotated. Notifying peers...`
// Notify federation peers

View File

@@ -3768,6 +3768,13 @@ async function deleteIdentity() {
onMounted(() => {
web5AnimationDone = true
// Load the authoritative node DID from the backend (survives rotation)
rpcClient.getNodeDid().then(res => {
if (res.did && res.did !== storedDid.value) {
storedDid.value = res.did
try { localStorage.setItem('neode_did', res.did) } catch { /* noop */ }
}
}).catch(() => { /* use cached localStorage value */ })
loadPeers()
loadReceivedMessages()
loadIdentities()