MiniMax M3 · Heavy
fix-proper-handling-of-group-memberships-discourse-cursor
Discourse · Ruby · L · 300–799 lines · 6 files
The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Haiku 5.5.
- Gold bugs found
- 2 of 10
- Comments published
- 3
- Comments matching a bug
- 2
- Comments not matching
- 1
- Cost of this PR
- $0.309
Published comments (3)
Group member PUT/DELETE routes missing :id segment — `delete "members"` and `put "members"` resolve as collection actions, so calls like `Discourse.ajax('/admin/groups/' + id + '/members.json')` miss the route. Add `on: :member` so they generate `/admin/groups/:id/members`. **Also found in:** - `app/controllers/admin/groups_controller.rb:65-96`
totalPages off-by-one when user_count is a multiple of limit — `totalPages` computes one extra page whenever `user_count` is an exact multiple of `limit`, so `showingLast` stays true on the last real page. Replace `Math.floor(...) + 1` with `Math.ceil(...)` so the count matches reality.
Race condition between next/previous clicks corrupts displayed model state — Out-of-order responses from `findMembers` overwrite `offset`, `user_count`, and `members` of the faster click, so the rendered page no longer matches `currentPage`. Guard `next`/`previous` against re-entry (e.g. a `loadingMembers` flag) and drop stale responses in `setProperties`. **Also found in:** - `app/assets/javascripts/discourse/models/group.js:20-38`