PR Review Command Center — interactive dashboard for AI code review negotiation

Fix pagination offset logic in user listings API
#4821 · feat/pagination-fix · opened 2h ago by env-author
REQUEST_CHANGES
Cumulative reward
0.62
Turn
2 / 3
Reviewer processing…
Episode status
Running
AI turn active
Diff view
Negotiation timeline
Manual override
src/api/users.py +8 −4 lines
···@@ -42,12 +42,16 @@ def get_users(page, limit):
42 query = db.session.query(User)
43- offset = page * limit
43+ offset = (page - 1) * limit
44 results = query.offset(offset).limit(limit).all()
45- return results
45+ if not results and page > 1:
46+ raise PageOutOfRangeError(page)
47+ return paginate_response(results, page, limit)
48
49- # TODO: add error handling
49+ # Handled via PageOutOfRangeError + paginate_response
Behind the scenes — raw logs
[START] episode_id=ep_4821 task=medium seed=42 [ENV] observation: diff loaded, 8 hunks [STEP] turn=1 action=REQUEST_CHANGES reward=0.35 [AI] tokens_used=312 latency_ms=840 [STEP] turn=2 action=REQUEST_CHANGES reward=0.62 [AI] tokens_used=289 latency_ms=760 [STATE] {"page":2,"max_turns":3,"cumulative_reward":0.62,"done":false}