Skip to content

GH#2136: fix: lift BerlinDB 100-site cap in customer site lists - #2139

Open
superdav42 wants to merge 3 commits into
mainfrom
feature/auto-20261121-114033-gh2136
Open

superdav42 wants to merge 3 commits into
mainfrom
feature/auto-20261121-114033-gh2136

Conversation

@superdav42

@superdav42 superdav42 commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Pass number=0 to Customer::get_sites() in account summary selector and My Sites list so customers with >100 sites see all of them; <=100 unchanged.

Files Changed

inc/ui/class-account-summary-element.php, inc/ui/class-my-sites-element.php

Runtime Testing

  • Risk level: Medium
  • Verification: self-assessed — phpcs/phpstan pre-commit hooks; no test added

Resolves #2136


aidevops.sh v3.39.189 plugin for OpenCode v1.19.5 with claude-sonnet-5-5 spent 1m and 1,666 tokens on this as a headless worker.

Summary by CodeRabbit

  • Bug Fixes
    • Account summaries and the My Sites view now display all customer sites instead of a limited set.
    • When no site is currently selected outside the admin area, the account summary now includes the available customer sites.

@superdav42 superdav42 added the origin:worker Auto-created by pulse labelless backfill (t2112) label Nov 21, 2026
@superdav42

Copy link
Copy Markdown
Collaborator Author

Completion Summary

  • What: Pass number=0 to Customer::get_sites() in account summary selector and My Sites list so customers with >100 sites see all of them; <=100 unchanged.
  • Issue: fix: customer site lists stop at 100 sites (BerlinDB default number) #2136
  • Files changed: inc/ui/class-account-summary-element.php, inc/ui/class-my-sites-element.php
  • Testing: phpcs/phpstan pre-commit hooks; no test added
  • Key decisions: none

aidevops.sh v3.39.189 plugin for OpenCode v1.19.5 with claude-sonnet-5-5 spent 1m and 1,666 tokens on this as a headless worker.

@ultimate-multisite ultimate-multisite Bot added the status:in-review Non-draft PR ready for review/merge label Nov 21, 2026
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 27d905f8-7b24-4b13-8abe-c28937f2127f
Commits

Reviewing files that changed from the base of the PR and between d59e7ae and 2934188.

Files selected for processing: 2

  • inc/ui/class-account-summary-element.php
  • inc/ui/class-my-sites-element.php

No actionable comments were generated in the recent review.

Walkthrough

The My Sites list and the account summary selector now pass number => 0 when requesting customer sites. The account summary change applies when no site is selected and the request is outside the admin area.

Changes: Customer site lists

Layer / File(s) Summary
Request all customer sites
inc/ui/class-my-sites-element.php, inc/ui/class-account-summary-element.php
My_Sites_Element::get_sites() and the account summary empty-state path pass number => 0 to the customer site query.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested labels: bug

Merge Risk: Minimal · previous review d59e7

Customers with more than 100 sites should now see all of them in the account summary selector and My Sites list. Behavior for customers with 100 or fewer sites is unchanged. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: lifting BerlinDB's 100-site cap in customer site lists by passing number => 0 to get_sites(). The raw summary confirms both the account summary element and the My Site…
Linked Issues check Passed Issue #2136 requires that customers with more than 100 sites can see and select all sites in the account summary selector and the My Sites list, and that customers with 100 or fewer sites see no chang…
Out of Scope Changes check Passed The PR changes two files: the account summary selector call and the My Sites customer query. Both changes are the exact call sites named in issue #2136 and are required by its objectives. The change t…
Full details: Title check

Explanation

The title names the main change: lifting BerlinDB's 100-site cap in customer site lists by passing number => 0 to get_sites(). The raw summary confirms both the account summary element and the My Sites element make this change, so the title matches the changeset. The 'GH#2136: fix:' prefix is an issue reference and a type tag, which does not hurt clarity. No search was needed for this check.

Full details: Linked Issues check

Explanation

Issue #2136 requires that customers with more than 100 sites can see and select all sites in the account summary selector and the My Sites list, and that customers with 100 or fewer sites see no change. At head, inc/ui/class-account-summary-element.php passes ['number' => 0] to Customer::get_sites() in the no-site branch of output(), which feeds the site selector template. At head, inc/ui/class-my-sites-element.php passes ['number' => 0] to $this->customer->get_sites() in get_sites(). Per the issue's SQL evidence, 'number' => 0 removes the LIMIT clause, and the PR avoids the 'number' => -1 pattern that returns one row. The issue's optional magic-link element (class-magic-link-url-element.php) is not in its files scope and is not required. The issue does not require an automated test; the verification steps are manual or SQL-logging checks. No coding requirement is unmet.

Full details: Out of Scope Changes check

Explanation

The PR changes two files: the account summary selector call and the My Sites customer query. Both changes are the exact call sites named in issue #2136 and are required by its objectives. The change to the My Sites list is also named in the PR objectives and in the issue's description of the same cap. The PR does not touch unrelated code, and the change of the existing comment is limited to the new argument. No unrelated change was found in the reviewed head content.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0af0908b-61f3-4967-b0d7-cf30f2025387
Commits

Reviewing files that changed from the base of the PR and between 1534904 and d59e7ae.

Files selected for processing: 2

  • inc/ui/class-account-summary-element.php
  • inc/ui/class-my-sites-element.php

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@github-actions

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@github-actions

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@github-actions

Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

origin:worker Auto-created by pulse labelless backfill (t2112) status:in-review Non-draft PR ready for review/merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: customer site lists stop at 100 sites (BerlinDB default number)

1 participant