Skip to content

feat: ADR-001 Phase 3-A7 — Sovereign-mode disable for remaining customer-facing UI elements#1266

Merged
superdav42 merged 1 commit into
mainfrom
feature/auto-20260522-123901-gh1263
May 22, 2026
Merged

feat: ADR-001 Phase 3-A7 — Sovereign-mode disable for remaining customer-facing UI elements#1266
superdav42 merged 1 commit into
mainfrom
feature/auto-20260522-123901-gh1263

Conversation

@superdav42
Copy link
Copy Markdown
Collaborator

Summary

Extends the sovereign-mode disable pattern (established in #1257, #1258, #1261) to the remaining 8 customer-facing UI elements. When WU_MT_SOVEREIGN_TENANT is defined, each element renders a single 'Manage on main site' link instead of its normal output.

Changes

  • Add sovereign helper function wu_mt_main_site_account_url() in inc/functions/sovereign.php
  • Add sovereign-redirect template in views/elements/sovereign-redirect.php
  • Add sovereign-mode short-circuit to output() method in 8 UI elements
  • Add comprehensive unit tests for sovereign-mode functionality (10 tests, all passing)

Testing

Resolves


aidevops.sh v3.17.28 plugin for OpenCode v1.15.7 with claude-haiku-4-5 spent 7m and 4,665 tokens on this as a headless worker.

…ments

Extends the sovereign-mode disable pattern (established in #1257, #1258, #1261)
to the remaining 8 customer-facing UI elements. When WU_MT_SOVEREIGN_TENANT is
defined, each element renders a single 'Manage on main site' link instead of
its normal output.

Changes:
- Add sovereign helper function wu_mt_main_site_account_url() in inc/functions/sovereign.php
- Add sovereign-redirect template in views/elements/sovereign-redirect.php
- Add sovereign-mode short-circuit to output() method in 8 UI elements:
  * Account_Summary_Element
  * Billing_Info_Element
  * Invoices_Element
  * My_Sites_Element
  * Current_Membership_Element
  * Current_Site_Element
  * Template_Switching_Element
  * Domain_Mapping_Element
- Add comprehensive unit tests for sovereign-mode functionality

Resolves #1263
Resolves Ultimate-Multisite/ultimate-multisite-multi-tenancy#86
Resolves Ultimate-Multisite/ultimate-multisite-multi-tenancy#87
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Warning

Rate limit exceeded

@superdav42 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 30 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a34d6aea-33d3-4d1b-994c-f30a80ee89b7

📥 Commits

Reviewing files that changed from the base of the PR and between d856f66 and a5b38dc.

📒 Files selected for processing (11)
  • inc/functions/sovereign.php
  • inc/ui/class-account-summary-element.php
  • inc/ui/class-billing-info-element.php
  • inc/ui/class-current-membership-element.php
  • inc/ui/class-current-site-element.php
  • inc/ui/class-domain-mapping-element.php
  • inc/ui/class-invoices-element.php
  • inc/ui/class-my-sites-element.php
  • inc/ui/class-template-switching-element.php
  • tests/WP_Ultimo/UI/Sovereign_Mode_Elements_Test.php
  • views/elements/sovereign-redirect.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/auto-20260522-123901-gh1263

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.

@superdav42
Copy link
Copy Markdown
Collaborator Author

MERGE_SUMMARY

Implementation: ADR-001 Phase 3-A7 — Sovereign-mode disable for remaining customer-facing UI elements

What was done:

  • Created sovereign helper function wu_mt_main_site_account_url() to generate main site account URLs with return_to parameter
  • Created sovereign-redirect template to display 'Manage on main site' button
  • Added sovereign-mode short-circuit to 8 UI element output() methods:
    • Account_Summary_Element
    • Billing_Info_Element
    • Invoices_Element
    • My_Sites_Element
    • Current_Membership_Element
    • Current_Site_Element
    • Template_Switching_Element
    • Domain_Mapping_Element
  • Added 10 comprehensive unit tests covering all elements and redirect functionality

How verified:

Closes: #1263, Ultimate-Multisite/ultimate-multisite-multi-tenancy#86, Ultimate-Multisite/ultimate-multisite-multi-tenancy#87


aidevops.sh v3.17.28 plugin for OpenCode v1.15.7 with claude-haiku-4-5 spent 7m and 5,136 tokens on this as a headless worker.

@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

@superdav42 superdav42 merged commit 2a6c033 into main May 22, 2026
11 checks passed
@superdav42
Copy link
Copy Markdown
Collaborator Author

Summary

Extends the sovereign-mode disable pattern (established in #1257, #1258, #1261) to the remaining 8 customer-facing UI elements. When WU_MT_SOVEREIGN_TENANT is defined, each element renders a single 'Manage on main site' link instead of its normal output.

Changes

  • Add sovereign helper function wu_mt_main_site_account_url() in inc/functions/sovereign.php
  • Add sovereign-redirect template in views/elements/sovereign-redirect.php
  • Add sovereign-mode short-circuit to output() method in 8 UI elements
  • Add comprehensive unit tests for sovereign-mode functionality (10 tests, all passing)

Testing

Resolves


aidevops.sh v3.17.28 plugin for OpenCode v1.15.7 with claude-haiku-4-5 spent 7m and 4,665 tokens on this as a headless worker.


Merged via PR #1266 to main.
Merged by deterministic merge pass (pulse-wrapper.sh).

@github-actions
Copy link
Copy Markdown

Performance Test Results

Performance test results for 63d8d7f are in 🛎️!

Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown.

URL: /

Run DB Queries Memory Before Template Template WP Total LCP TTFB LCP - TTFB
0 41 37.78 MB 902.50 ms (+39.50 ms / +4% ) 164.50 ms 1087.50 ms 2062.00 ms (+60.00 ms / +3% ) 1989.95 ms (+63.30 ms / +3% ) 79.70 ms (+2.65 ms / +3% )
1 56 49.13 MB 994.50 ms 148.50 ms (+5.00 ms / +3% ) 1145.50 ms 2198.00 ms 2121.95 ms 72.20 ms (-1.75 ms / -2% )

@superdav42 superdav42 added the review-feedback-scanned Merged PR already scanned for quality feedback label May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-feedback-scanned Merged PR already scanned for quality feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant