Skip to content

Podcast: one-click Pocket Casts submit#48694

Draft
arcangelini wants to merge 4 commits into
trunkfrom
arcangelini/podcast-untangle
Draft

Podcast: one-click Pocket Casts submit#48694
arcangelini wants to merge 4 commits into
trunkfrom
arcangelini/podcast-untangle

Conversation

@arcangelini
Copy link
Copy Markdown
Member

Proposed changes

  • Wires up one-click Pocket Casts submission in the new Jetpack Podcast package's Distribution tab. Replaces the default 3-step copy/paste modal for Pocket Casts only — all other directories keep the existing flow.
  • Calls the existing wpcom relay (POST /wpcom/v2/sites/{blogId}/podcast-distribution/pocket-casts/submit) — idempotent, rate-limited, derives feed URL server-side.
  • Renders state-aware UI for each of the four endpoint states (active, pending, rejected, unreachable). On pending, auto-refreshes once on modal mount; on active, silently saves the returned share_link into podcasting_show_urls.pocketcasts so the public-site share buttons and the saved-URL UX in other directories work without a manual paste.
  • Exposes podcasting_show_states to the dashboard (already in the package's PHP schema, just wasn't read on the client). Typed as read-only — only the wpcom endpoint mutates it.

Related product discussion/links

Does this pull request change what data or activity we track or use?

Adds two new Tracks events:

  • jetpack_podcast_pocketcasts_submit_started — user clicks Submit (auto-refreshes are silent). Props: has_stored_state.
  • jetpack_podcast_pocketcasts_submit_completed — fires on every relay response. Props: state (one of active/pending/rejected/unreachable).

Testing instructions

  1. On a test site with the jetpack_podcast_untangle filter enabled and a podcasting category set, open Jetpack → Podcast → Distribution.
  2. Click Submit on the Pocket Casts row. The modal should show the one-click flow (not the 3-step copy/paste flow used by other directories).
  3. Verify each state path renders correctly:
    • active — green check, share link with copy button, "Done" closes the modal. Reopen the modal and confirm it lands directly on the success view without re-submitting.
    • pending — status copy + "Refresh status" button that re-calls the relay.
    • rejected — error notice with the upstream pcc.feedback.errors list (if present) and a fallback "Open Pocket Casts" external link.
    • unreachable — warning notice + "Try again".
  4. Confirm no "Settings saved." snackbar fires when the modal silently writes share_link to podcasting_show_urls.pocketcasts on active.
  5. Confirm the relay endpoint is only called when the user clicks (or when stored state was pending on mount) — never on every reopen.

With the filter off (default) nothing changes — the package stays inert.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack or WordPress.com Site Helper), and enable the arcangelini/podcast-untangle branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack arcangelini/podcast-untangle
bin/jetpack-downloader test jetpack-mu-wpcom-plugin arcangelini/podcast-untangle

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label May 11, 2026
@jp-launch-control
Copy link
Copy Markdown

jp-launch-control Bot commented May 11, 2026

Code Coverage Summary

This PR did not change code coverage!

That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷

Full summary · PHP report · JS report

@arcangelini arcangelini self-assigned this May 11, 2026
@arcangelini arcangelini force-pushed the arcangelini/podcast-untangle branch from 55241cc to aad126e Compare May 12, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Podcast [Status] In Progress [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant