Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Groups pagination multiplies the offset twice, causing empty pages after page 1

オープン 初心者向け
#541 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
backend, frontend

調査の方向性

Groups ルートファイル apps/start/src/routes/_app.$organizationId.$projectId.groups.tsx の約52行目から始めて、そこでカーソルが計算される箇所を確認し、group.service.ts の約140行目、オフセットが cursor * take になっている箇所と比較してください。Profiles ページが同じ規約でどのようにカーソルを計算しているかも確認してください。2ページ目が cursor=1 を送信し、次の50件のグループを返せば完了です。また、Group Members ページのカーソルの不一致は、修正するか、対象外であることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

Description

The Groups list shows data on page 1, but subsequent pages are empty even though more groups exist.

I reproduced this in production. Manually changing the pagination parameters returns the expected data.

Steps to reproduce

  1. Open the Groups list in a project with more than 100 groups, for example 120.
  2. Navigate to page 2 or page 3.
  3. Inspect the /api/trpc/group.list requests:
    • Page 2 sends take=50, cursor=50.
    • Page 3 sends take=50, cursor=100.
  4. Replay the requests with cursor=1 and cursor=2, respectively. Both return data in my production instance.

Expected behavior

With a page size of 50:

  • Page 2 should skip 50 rows.
  • Page 3 should skip 100 rows.

Root cause

The Groups frontend sends:
cursor: (page - 1) * PAGE_SIZE

The backend calculates:
OFFSET = cursor * take

This produces offsets of 2500 and 5000 instead of 50 and 100.

The Profiles frontend correctly sends cursor: page - 1, using the same backend pagination convention.

Suggested fix

Change the Groups frontend to cursor: page - 1.

The Group Members page has the same parameter mismatch based on source inspection, but I have not tested that page in production.

Environment

  • Deployed version / image digest: [fill in]
  • Source inspected: v2.3.0 and main at 7c4d22a

Source references

主要言語
TypeScript
スター
7.1k
フォーク
516
平均マージ
34分
マージ済み PR(30日)
3

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Openpanel-dev/openpanel のほかの issue

Openpanel-dev/openpanel の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。