Skip to content

Remove RS Unified Comments experimental toggle - #23170

Merged
nbradbury merged 7 commits into
trunkfrom
remove-rs-comments-flag
Aug 4, 2026
Merged

Remove RS Unified Comments experimental toggle#23170
nbradbury merged 7 commits into
trunkfrom
remove-rs-comments-flag

Conversation

@nbradbury

@nbradbury nbradbury commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Description

The RS comments screens now show automatically for any site with an application password, mirroring how RS Posts and Pages already work. Removes the Feature.RS_UNIFIED_COMMENTS toggle and its two strings — the RS comments UI itself is unchanged.

That left the posts, pages, and comments gates as three byte-identical copies of site != null && site.hasApplicationPassword(), so they now use a single SiteUtils.canUseWpRs(@Nullable SiteModel) call.

Testing instructions

Comments on a site with an application password:

  1. Go to Me → Experimental Features
  • Verify there is no "RS Unified Comments" row
  1. Go to My Site → Comments
  • Verify the Compose RS comments list opens (tabs: All, Pending, Unreplied, Approved, Spam, Trashed) without enabling anything

…ble sites

The RS comments screens now show automatically for any site with an
application password, mirroring how RS Posts and Pages work. Removes the
Feature.RS_UNIFIED_COMMENTS toggle and its strings; the RS comments UI
itself is unchanged.

The gate no longer needs a Context, which leaves ActivityLauncherEntryPoint
without consumers, so it's deleted too.
@dangermattic

dangermattic commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot

wpmobilebot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress Android by scanning the QR code below to install the corresponding build.

App NameWordPress Android
Build TypeDebug
Versionpr23170-2dcd921
Build Number1498
Application IDorg.wordpress.android.prealpha
Commit2dcd921
Installation URL7bvkfin6d9mf8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack Android by scanning the QR code below to install the corresponding build.

App NameJetpack Android
Build TypeDebug
Versionpr23170-2dcd921
Build Number1498
Application IDcom.jetpack.android.prealpha
Commit2dcd921
Installation URL6d41gbfj3fjr0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.84%. Comparing base (b39607f) to head (2dcd921).
⚠️ Report is 1 commits behind head on trunk.

Files with missing lines Patch % Lines
...ava/org/wordpress/android/ui/ActivityLauncher.java 0.00% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #23170   +/-   ##
=======================================
  Coverage   37.83%   37.84%           
=======================================
  Files        2345     2345           
  Lines      127541   127530   -11     
  Branches    17717    17715    -2     
=======================================
- Hits        48261    48258    -3     
+ Misses      75321    75313    -8     
  Partials     3959     3959           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The comment claimed the legacy comments screens are kept for WP.com-accessed
sites, but hasApplicationPassword() has no WP.com check, so Atomic and Jetpack
sites that hold an application password do get the rs screens. Only the comment
was wrong; the routing is unchanged.
…seWpRs

The posts, pages, and comments gates had drifted into three byte-identical
copies of the same predicate, coupled only by a comment asking future editors
to keep them in sync. One definition means they can't diverge for the same site.
UnifiedCommentsActivity never reads WordPress.SITE - it resolves the site from
SelectedSiteRepository, as does the rs list - so the extra was a trap for anyone
trying to fix a multi-site bug by changing the caller.
Pins the rs eligibility rule in both directions, including that a WP.com site
holding an application password is eligible - the case the old comment got wrong.
Removing RS_UNIFIED_COMMENTS left the enum terminator on the new last entry,
where it falsely signals that members follow. The enum has none.
@nbradbury
nbradbury marked this pull request as ready for review August 3, 2026 17:48
@nbradbury
nbradbury requested a review from dcalhoun August 3, 2026 17:48

@dcalhoun dcalhoun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. The app functioned as expected when I tested a site authenticated with an app password.

Claude flagged an additional conditional related to wordpress-rs comments. I presume this is intentionally excluded from this work, but wanted to note for your consideration.

private fun canUseRs(): Boolean = site.isUsingWpComRestApi || site.hasApplicationPassword()

* Whether the wordpress-rs screens (posts, pages, comments) should be used for {@code site}
* instead of the legacy (FluxC) ones. Keep this as the single definition so those screens
* can't drift apart for the same site.
* <p>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
* <p>
*

// The rs detail needs a real site from the SiteStore; the legacy fragment can fall
// back to a dummy WP.com site built from the note, so it stays the catch-all.
if (site != null && note.getCommentId() != 0 && ActivityLauncher.shouldUseRsComments(this, site)) {
if (site != null && note.getCommentId() != 0 && SiteUtils.canUseWpRs(site)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I tried for a while but was unable to generate a comment notification for testing this particular change. Were you able to test this flow?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dcalhoun Yes, I was able to test this successfully.

@nbradbury
nbradbury enabled auto-merge (squash) August 4, 2026 10:33
@nbradbury
nbradbury merged commit 2eab73c into trunk Aug 4, 2026
17 of 22 checks passed
@nbradbury
nbradbury deleted the remove-rs-comments-flag branch August 4, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants