Ship 1.6.1: hide the WordPress 7 panel for disabled modules, fix admin copy - #52
Merged
Conversation
…ule is off The panel above Redirect Manager was headed "WordPress 7 workspace". That named the implementation rather than what the reader was looking at, and it dates itself the moment WordPress 8 ships. The heading is gone: the panel's own tables already say "Redirects" and "404 activity", so the outer heading carried a label and no information. Auditing the rest of the admin copy turned up a worse problem behind the same screen. The panel rendered for any of its four supported modules without ever checking whether that module was enabled. On a site with Redirect Manager switched off it showed two empty tables and a fully interactive "Add redirect" form. The REST route correctly returns nothing for a disabled module and create-redirect correctly refuses, so the only thing the form could do was produce an error toast. The enabled state now reaches the bundle and the workspace returns early without it. Three more strings named internals rather than what the reader sees: - The Performance & Cleanup settings section was headed "Miscellaneous (Bloat Control)". "Misc" is the module's internal slug and "Bloat Control" appears nowhere else in the interface, so the card and the page it opens disagreed. - The dashboard box holding a single AI opt-in checkbox was headed "WordPress 7 Integration" and advertised abilities, command-palette actions, data workspaces and Core Icon interoperability, none of which are settable there. It is now named after the one control it contains. - Link Management printed a bare "Filter available: functionalities_json_preset_path" where every other filter note in that file uses "Filter: <code>name</code> — what it does". Two tests cover the regressions: one asserts the enabled gate exists in the PHP config, the JS source and the built bundle, and one walks every translatable string in both admin files and fails if any names a WordPress version. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Version bumped in the plugin header and constant, readme.txt stable tag, README.md, block.json, package.json and the lockfile, with a changelog section and upgrade notice. WordPress7IntegrationTest pinned the literal '1.6.0' as the expected block.json version, so it failed on this bump and would fail on every future one. VersionConsistencyTest already asserts block.json matches the plugin header, so the assertion here is now just that the key exists and looks like a version rather than a second copy of the number. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Interface fixes found by auditing admin copy after the "WordPress 7 workspace" heading was queried.
The heading
The panel above Redirect Manager was headed "WordPress 7 workspace". That named the implementation rather than what the reader was looking at, and it dates itself the moment WordPress 8 ships. Removed: the panel's own tables already say "Redirects" and "404 activity", so the outer heading carried a label and no information. The two sibling loading and error strings no longer name the platform version either.
The bug behind it
Auditing turned up something worse on the same screen. The panel rendered for any of its four supported modules without ever checking whether that module was enabled.
On gauravtiwari.org, where Redirect Manager is switched off, its page still showed two empty tables and a fully interactive "Add redirect" form. The REST route correctly returns nothing for a disabled module and
create-redirectcorrectly refuses, so the only thing that form could do was produce an error toast.The enabled state now reaches the localized config and the workspace returns early without it.
Three more strings naming internals
miscis the module's internal slug and "Bloat Control" appears nowhere else, so the card and the page it opened disagreed.Filter available: functionalities_json_preset_pathwhere every other filter note usesFilter: <code>name</code> — what it does.Audited and clean
No other UI string names a WordPress or plugin version. Classic-interface empty states are actionable rather than bare. The developer vocabulary elsewhere (REST API, cron, slug, Schema.org) is either correct WordPress terminology or sits in explicitly developer-facing hook listings.
Tests
Two new regressions, plus one fix:
npm run buildfails rather than shipping stale JS.WordPress7IntegrationTestpinned the literal1.6.0as block.json's version, so it failed on this bump and would fail on every future one.VersionConsistencyTestalready asserts block.json matches the plugin header, so that assertion is no longer a second copy of the number.54 tests, PHPCS clean, POT regenerated, bundle rebuilt.
Not addressed
Even with the gate, an enabled module shows the modern panel above the classic interface listing the same data. That is a design decision about which interface is canonical, not a copy fix, so it is left alone.
🤖 Generated with Claude Code