Skip to content

fix(PacketDetailsModal): don't let a failed companion lookup discard advert names - #87

Open
npdgm wants to merge 1 commit into
openhop-dev:devfrom
npdgm:fix/path-view-companion-503
Open

fix(PacketDetailsModal): don't let a failed companion lookup discard advert names#87
npdgm wants to merge 1 commit into
openhop-dev:devfrom
npdgm:fix/path-view-companion-503

Conversation

@npdgm

@npdgm npdgm commented Jul 30, 2026

Copy link
Copy Markdown

Problem

On a repeater with no companion bridge configured, every hop in the packet details modal's "Repeater Path View" shows "Unknown contact", even though the neighbors are known and displayed correctly on the Monitoring/Neighbors page.

Cause

In refreshContactLookup(), the advert lookups each have an individual .catch(() => null), but the /companion/contacts call does not. Without a companion bridge the backend legitimately returns 503 "No companion bridges configured", which rejects the outer Promise.all — and the silent best-effort catch {} then discards the successfully fetched adverts too. contactLookupEntries stays empty, so no path hash ever resolves to a name.

Present since the feature was introduced in 5d674a7.

Fix

Catch the companion lookup the same way as the advert lookups. extractArrayPayload(null) already returns [], so no other change is needed.

Testing

  • Verified live on an affected repeater (no companion bridge): with the patch, path hops resolve to advert names with their key-match confidence; without it, all hops show "Unknown contact" while DevTools shows /api/companion/contacts → 503 and /adverts_by_contact_type → 200.
  • npm run type-check passes. The two ESLint no-unused-vars errors in this file pre-exist on dev and are untouched.

…advert names

On a repeater with no companion bridge configured, /api/companion/contacts
returns 503. The call had no individual .catch(), so the whole Promise.all
rejected and the successfully fetched adverts were discarded, leaving every
hop in the Repeater Path View as "Unknown contact".

Catch the companion lookup like the advert lookups so advert-based name
resolution still applies. extractArrayPayload(null) already yields [].

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant