Skip to content

refactor(admin): split grade table into pending/graded with pagination#3753

Merged
KATO-Hiro merged 3 commits into
stagingfrom
#3752
Jun 27, 2026
Merged

refactor(admin): split grade table into pending/graded with pagination#3753
KATO-Hiro merged 3 commits into
stagingfrom
#3752

Conversation

@KATO-Hiro

@KATO-Hiro KATO-Hiro commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

close #3752

Summary by CodeRabbit

  • New Features

    • 管理画面のタスク採点一覧が、検索・並び替え・ページネーション付きの新しい表示に切り替わりました。
    • タスクを「Pending」と「採点済み」で分けて表示できるようになりました。
    • 一覧からグレードの更新操作ができるようになりました。
  • Bug Fixes

    • 検索結果の表示やページ分割の挙動を改善し、一覧が正しく絞り込まれるようになりました。
    • ページネーションのボタン表示を調整しました。
  • Tests

    • 検索条件に応じた一覧表示のテストを追加しました。

KATO-Hiro and others added 2 commits June 27, 2026 09:51
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b63d2a03-0455-4fa1-8bbf-e0413408e649

📥 Commits

Reviewing files that changed from the base of the PR and between 714e379 and 9af7caf.

📒 Files selected for processing (5)
  • src/routes/(admin)/tasks/+page.svelte
  • src/routes/(admin)/tasks/grade/+page.svelte
  • src/routes/(admin)/tasks/grade/_components/TaskGradeTable.svelte
  • src/routes/(admin)/tasks/grade/_utils/grade_table_filter.test.ts
  • src/routes/(admin)/tasks/grade/_utils/grade_table_filter.ts

📝 Walkthrough

Walkthrough

管理画面のタスクグレード一覧を、pending と graded に分けて共通テーブルで表示する構成へ変更し、検索・ページング・グレード更新の表示をまとめました。別途、管理タスク一覧のページネーションボタンのスタイルも調整されています。

Changes

管理画面グレード一覧の分割

Layer / File(s) Summary
検索フィルタ関数と検証
src/routes/(admin)/tasks/grade/_utils/grade_table_filter.ts, src/routes/(admin)/tasks/grade/_utils/grade_table_filter.test.ts
filterGradeTableTasks を追加し、空クエリ時の requireSearch 分岐と非空クエリ時の全件返却をテストで確認。
一覧テーブルと行内更新
src/routes/(admin)/tasks/grade/_components/TaskGradeTable.svelte
検索入力、並び替え、フィルタ、ページング、各行の表示、?/setTaskGrade への更新フォームをまとめて実装。
ページの2セクション化
src/routes/(admin)/tasks/grade/+page.svelte
data.tasks を pending と graded に分けて TaskGradeTable を2回描画し、requireSearch を切り替える。

管理タスク一覧のページネーション調整

Layer / File(s) Summary
PaginationNav の境界線指定
src/routes/(admin)/tasks/+page.svelte
paginationNav 内の PaginationNav にボタン境界線の class を追加。

Sequence Diagram(s)

sequenceDiagram
  participant Page as +page.svelte
  participant Table as TaskGradeTable
  participant Filter as filterGradeTableTasks
  participant Nav as PaginationNav
  participant GradeAction as setTaskGrade

  Page->>Table: pendingTasks / gradedTasks を渡す
  Table->>Filter: tasks, query, requireSearch
  Table->>Nav: currentPage と totalPages
  Table->>GradeAction: POST でグレード更新
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

pending と graded が
すっきり並んで ぴかり ✨
検索ひとつで道が分かれ
ページめくれば次の景色
グレードの星が静かに整う

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルは pending/graded 分割とページネーション追加という主要変更を簡潔に表しています。
Linked Issues check ✅ Passed #3752 の pending とグレードありを分ける要件に一致しており、ページネーション追加も目的に沿っています。
Out of Scope Changes check ✅ Passed 変更はグレード管理ページの分割とページネーション周辺に収まっており、明確な逸脱は見当たりません。
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch #3752

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@KATO-Hiro KATO-Hiro left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KATO-Hiro KATO-Hiro merged commit af3034a into staging Jun 27, 2026
3 checks passed
@KATO-Hiro KATO-Hiro deleted the #3752 branch June 27, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[refactor] グレード管理ページで pending と グレードあり の問題を分けましょう

1 participant