From d48d15f09a45e74fc19ea41074124e88af6ab268 Mon Sep 17 00:00:00 2001 From: Hyemin Lee Date: Fri, 10 Jul 2026 10:06:27 +0900 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=EB=8C=80=EC=8B=9C=EB=B3=B4?= =?UTF-8?q?=EB=93=9C=20=ED=8E=98=EC=9D=B4=EC=A7=80=EB=8B=B9=20=EC=A0=80?= =?UTF-8?q?=EC=9E=A5=EC=86=8C=2010=EA=B0=9C=EB=A1=9C=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PAGE_SIZE 20 → 10. 한 화면에 부담 없이 보이도록. 페이저는 기존대로 동적 계산(ceil(total/PAGE_SIZE)). 테스트도 10/페이지 기준으로 갱신. Co-Authored-By: Claude Opus 4.8 (1M context) --- app/routes/dashboard.py | 2 +- tests/test_dashboard.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/routes/dashboard.py b/app/routes/dashboard.py index c983993..5ac502b 100644 --- a/app/routes/dashboard.py +++ b/app/routes/dashboard.py @@ -23,7 +23,7 @@ from ..pulp_client import PulpClient router = APIRouter() -PAGE_SIZE = 20 +PAGE_SIZE = 10 def _load_repos( diff --git a/tests/test_dashboard.py b/tests/test_dashboard.py index 31ff001..58f9f8d 100644 --- a/tests/test_dashboard.py +++ b/tests/test_dashboard.py @@ -133,10 +133,11 @@ def test_repos_table_paginates(): page1 = client.get( "/repos/table", params={"sort": "name", "dir": "asc", "page": 1} ).text - page2 = client.get( - "/repos/table", params={"sort": "name", "dir": "asc", "page": 2} + page3 = client.get( + "/repos/table", params={"sort": "name", "dir": "asc", "page": 3} ).text - assert "repo-01" in page1 and "repo-20" in page1 - assert "repo-21" not in page1 - assert "repo-21" in page2 and "repo-25" in page2 - assert "1 / 2" in page1 + # PAGE_SIZE=10 → 25개는 3페이지 (10/10/5) + assert "repo-01" in page1 and "repo-10" in page1 + assert "repo-11" not in page1 + assert "repo-21" in page3 and "repo-25" in page3 + assert "1 / 3" in page1