diff --git a/app/models.py b/app/models.py index a2315c3..42efecc 100644 --- a/app/models.py +++ b/app/models.py @@ -672,6 +672,14 @@ class RepeaterNeighborsResponse(BaseModel): neighbors: list[NeighborInfo] = Field( default_factory=list, description="List of neighbors seen by repeater" ) + reported_count: int | None = Field( + default=None, + description=( + "Total neighbor count reported by the repeater firmware, independent of " + "how many entries were actually returned. May exceed len(neighbors) when a " + "multi-chunk fetch is incomplete (dropped follow-up query / duty-cycle throttle)." + ), + ) class RepeaterAclResponse(BaseModel): diff --git a/app/routers/repeaters.py b/app/routers/repeaters.py index 7317b84..2eaedfe 100644 --- a/app/routers/repeaters.py +++ b/app/routers/repeaters.py @@ -265,7 +265,8 @@ async def repeater_neighbors(public_key: str) -> RepeaterNeighborsResponse: ) ) - return RepeaterNeighborsResponse(neighbors=neighbors) + reported_count = neighbors_data.get("neighbours_count") if neighbors_data else None + return RepeaterNeighborsResponse(neighbors=neighbors, reported_count=reported_count) @router.post("/{public_key}/repeater/acl", response_model=RepeaterAclResponse) diff --git a/frontend/src/components/repeater/RepeaterNeighborsPane.tsx b/frontend/src/components/repeater/RepeaterNeighborsPane.tsx index 2947687..157d572 100644 --- a/frontend/src/components/repeater/RepeaterNeighborsPane.tsx +++ b/frontend/src/components/repeater/RepeaterNeighborsPane.tsx @@ -203,7 +203,13 @@ export function NeighborsPane({ return (