Skip to content

chore(wren-ui): fix page size selector not working on SQL pairs table#2156

Open
okayhooni wants to merge 1 commit intoCanner:mainfrom
okayhooni:hotfix/paging_on_sql_pairs
Open

chore(wren-ui): fix page size selector not working on SQL pairs table#2156
okayhooni wants to merge 1 commit intoCanner:mainfrom
okayhooni:hotfix/paging_on_sql_pairs

Conversation

@okayhooni
Copy link

@okayhooni okayhooni commented Mar 13, 2026

Problem

The page size dropdown on the SQL Pairs management page (/knowledge/question-sql-pairs) is visible but non-functional — selecting 20, 50, or 100 has no effect and the table always shows 10 rows.

image

Cause

pageSize: 10 was hardcoded in the Ant Design Table pagination config, which overrides user selection on every render.

Fix

Replace pageSize with defaultPageSize and explicitly enable showSizeChanger with pageSizeOptions so the dropdown works as expected.

Summary by CodeRabbit

  • New Features
    • Added configurable page size selector in table pagination, allowing users to display 10, 20, 50, or 100 items per page with a default of 10 items.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 70fb21e4-992d-4697-971c-9122c24471aa

📥 Commits

Reviewing files that changed from the base of the PR and between eea642f and 8465cf4.

📒 Files selected for processing (1)
  • wren-ui/src/pages/knowledge/question-sql-pairs.tsx

Walkthrough

The pagination configuration in the ManageQuestionSQLPairs component was enhanced to support configurable page size selection while maintaining the default page size of 10 and preserving the existing behavior of hiding pagination on a single page.

Changes

Cohort / File(s) Summary
Pagination Configuration
wren-ui/src/pages/knowledge/question-sql-pairs.tsx
Enhanced table pagination with dynamic page size selection (10, 20, 50, 100) while retaining existing defaults and single-page hiding behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Hop, skip, and new pages to flip!
Ten, twenty, fifty—take your pick!
A hundred rows at your command,
Pagination options across the land! 📊✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main fix: enabling the non-functional page size selector on the SQL pairs table by correcting the pagination configuration.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

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.

1 participant