Skip to content

[SMTNC-2395] Include catalog changelog in plugin and theme update data - #195

Open
mauteri wants to merge 1 commit into
mainfrom
fix/plugin-info-changelog-section
Open

[SMTNC-2395] Include catalog changelog in plugin and theme update data#195
mauteri wants to merge 1 commit into
mainfrom
fix/plugin-info-changelog-section

Conversation

@mauteri

@mauteri mauteri commented Sep 4, 2026

Copy link
Copy Markdown

Fixes SMTNC-2395

Problem

On sites licensed with a unified key, Harbor answers plugins_api( 'plugin_information' ) for its features. Plugin::get_update_data() and Theme::get_update_data() only ever emit a description section, so the WordPress "View details" modal shows one Description tab and nothing else.

For Kadence Blocks Pro the catalog description is the one-line tagline ("Adds Extras for Gutenberg"), so the 2.8.18 update looked like a release with no notes. Customers raised it in the Web Creator Community group on Sept 2 (Pete Gregory's post; Gary Yates reported the same for Shop Kit). The legacy Uplink path, which only runs when there is no unified key, returns a changelog section for the same product, so the content exists on the server side.

Change

The catalog already carries changelog and Catalog_Feature::get_changelog() exposes it (docs/subsystems/portal.md documents it as "consistent with plugins_api() sections"). get_update_data() now adds it as a changelog section when it is non-null and non-empty, for both Plugin and Theme. Plugin_Handler::to_wp_format() and Theme_Handler pass sections through unchanged, so the modal gets a Changelog tab.

No change when the catalog has no changelog: sections stays ['description' => ...].

Tests

Added to PluginTest and ThemeTest: changelog present, changelog null, changelog empty string.

slic run wpunit --filter 'PluginTest|ThemeTest|Plugin_HandlerTest|Theme_HandlerTest' on PHP 8.2: 77 tests, 222 assertions, all six new tests pass. One pre-existing error unrelated to this change: Plugin_HandlerTest::test_it_proxies_plugins_api_to_wporg_slug_when_slugs_differ fails locally with Call to undefined function plugins_api() because wp-admin/includes/plugin-install.php is not loaded in the test bootstrap. That test and Plugin_Handler.php are untouched here.

phpcs and phpstan clean on the changed files.

Demo

Before and after on Harbor's wp-env fixture site (unified fixture key, kad-blocks-pro stub installed): main shows a single Description tab, this branch adds the Changelog tab.

Before
image

After
Loom walkthrough: https://www.loom.com/share/64100270e64f4d809f3ff6b04a8c42a9

Rollout

Harbor ships inside each host plugin, so customers see the tab once Kadence Blocks (and the other hosts) bump to a Harbor release containing this. Companion PR that fixes the "View full changelog" link Blocks Pro appends: stellarwp/kadence-blocks-pro#307.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added catalog changelogs to plugin and theme update details.
    • The WordPress “View details” modal now displays a Changelog tab when changelog information is available.
    • Existing descriptions remain available, and the Changelog tab is omitted when no content exists.
  • Bug Fixes

    • Ensured plugin and theme update details correctly handle missing or empty changelog content.

Plugin::get_update_data() and Theme::get_update_data() only ever emitted a
"description" section, so on sites licensed with a unified key the WordPress
"View details" modal showed nothing but the catalog description. For Kadence
Blocks Pro that description is the one-line tagline, which customers read as
a release with no notes.

The catalog already carries the changelog and Catalog_Feature exposes it via
get_changelog(). Add it as a "changelog" section when present so the modal
renders a Changelog tab, matching what the legacy Uplink path returns.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Enterprise

Run ID: da3fcb96-a868-4dc7-becb-db80ac4639b9

📥 Commits

Reviewing files that changed from the base of the PR and between 1527e63 and 238bbde.

📒 Files selected for processing (5)
  • changelog/fix-plugin-info-changelog-section.yaml
  • src/Harbor/Features/Types/Plugin.php
  • src/Harbor/Features/Types/Theme.php
  • tests/wpunit/Features/Types/PluginTest.php
  • tests/wpunit/Features/Types/ThemeTest.php

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

Plugin and theme update data now includes non-empty catalog changelogs in a changelog section. Tests cover non-empty, null, and empty changelog values. A patch changelog entry documents the WordPress details modal behavior.

Changes

Catalog changelog integration

Layer / File(s) Summary
Add changelog sections
src/Harbor/Features/Types/Plugin.php, src/Harbor/Features/Types/Theme.php, changelog/fix-plugin-info-changelog-section.yaml
Plugin and theme update data retain the description section and add a changelog section when the catalog changelog is non-empty.
Validate changelog inclusion
tests/wpunit/Features/Types/PluginTest.php, tests/wpunit/Features/Types/ThemeTest.php
Tests verify changelog inclusion for non-empty values and omission for null or empty values.

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

Merge Risk: ⚪ Minimal · up to 238bb

Plugin and theme update details now show a Changelog tab when catalog content is available, while sites without a changelog retain their existing description-only behavior. The covered conditional behavior presents no remaining merge-readiness risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 4 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding catalog changelog data to plugin and theme update data.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 4 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/plugin-info-changelog-section

Comment @coderabbitai help to get the list of available commands.

@mauteri
mauteri marked this pull request as ready for review September 4, 2026 13:51

@shvlv shvlv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks good from my side

@mauteri mauteri changed the title Include catalog changelog in plugin and theme update data [SMTNC-2395] Include catalog changelog in plugin and theme update data Sep 4, 2026
@linear

linear Bot commented Sep 4, 2026

Copy link
Copy Markdown

SMTNC-2395

@johnhooks johnhooks left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks correct to me.

@d4mation

d4mation commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Note, this will depend on this change to Portal: https://github.com/stellarwp/software.liquidweb.com/pull/435

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.

5 participants