Summary
In `pkg/radar/nearby.go`, the sort comparator converts a float64 distance difference to int:
```go
return int(distanceToA - distanceToB)
```
`unit.Length` is `float64`. When two groups are within 1 unit of distance from each other, the subtraction result truncates to 0, making the sort consider them equal. This produces unstable sort results and potentially incorrect ordering of nearby groups.
Location
`pkg/radar/nearby.go:40`
Suggested Fix
Use `cmp.Compare(distanceToA, distanceToB)` which handles float64 comparison correctly.
🤖 Generated with Claude Code
Summary
In `pkg/radar/nearby.go`, the sort comparator converts a float64 distance difference to int:
```go
return int(distanceToA - distanceToB)
```
`unit.Length` is `float64`. When two groups are within 1 unit of distance from each other, the subtraction result truncates to 0, making the sort consider them equal. This produces unstable sort results and potentially incorrect ordering of nearby groups.
Location
`pkg/radar/nearby.go:40`
Suggested Fix
Use `cmp.Compare(distanceToA, distanceToB)` which handles float64 comparison correctly.
🤖 Generated with Claude Code