• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Freegle / Iznik / 24440
72%

Build:
DEFAULT BRANCH: master
Ran 03 Jul 2026 03:43AM UTC
Jobs 4
Files 1365
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Jul 2026 03:12AM UTC coverage: 71.62% (+0.005%) from 71.615%
24440

push

circleci

edwh
fix(browse): sort & show "Closest" by the server distance so the order matches the badges

On the Nearby feed with "Closest" sort the list came out unsorted relative
to the distance badges (e.g. 8mi, 7mi, 13mi, 9mi, 9mi, 9mi). The client was
computing distance TWICE, from two different reference points, and ignoring
the authoritative per-post distance the server already returns:

  - the sort (sortBrowseMessages) ordered by getDistance(MAP CENTRE -> post
    lat/lng); the map centre is not the viewer's location and drifts as the
    map is panned/fitted, and
  - the badge (useMessageDisplay) showed milesAway(ME -> post lat/lng).

Different reference points => the list was genuinely ordered by distance-from-
map-centre while each badge showed distance-from-me, so it looked unsorted.

Since PR #932 the server stamps `distance` (blurred great-circle miles from
the viewer) on every browse-feed post - the same value the distance slider
already filters on. Use that single value everywhere:

  - sort "Closest" by m.distance (posts with no distance sort last, then fall
    back to recency), so the map centre is no longer needed by the sort; and
  - the distance badge now looks the server value up by id from the nearby
    store (distanceById getter) and prefers it, falling back to the client
    calc only off the feed (search, My Posts, ModTools).

Badge, list order and slider are now driven by one number and can't disagree.

Verification: sort/display/store specs updated + a regression check that the
list follows the server distance rather than a lat/lng re-derivation. Full
vitest suite green (13784 passing).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AsgvoSgfeUwBMBbxKJHSNy

12184 of 16105 branches covered (75.65%)

Branch coverage included in aggregate %.

61 of 63 new or added lines in 4 files covered. (96.83%)

129960 of 182366 relevant lines covered (71.26%)

37.94 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
98.93
-1.07% iznik-nuxt3/composables/useMessageDisplay.js
Jobs
ID Job ID Ran Files Coverage
24440 vitest - 24440 03 Jul 2026 03:43AM UTC 743
69.33
CircleCI Job 24440
24440 playwright - 24440 03 Jul 2026 03:43AM UTC 74
22.83
CircleCI Job 24440
24440 go - 24440 03 Jul 2026 03:43AM UTC 144
83.88
CircleCI Job 24440
24440 laravel - 24440 03 Jul 2026 03:43AM UTC 477
68.76
CircleCI Job 24440
Source Files on build 24440
  • Tree
  • List 1365
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • CircleCI Build #24440
  • ec684cdb on github
  • Prev Build on master (#24431)
  • Next Build on master (#24449)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc