Skip to content

Filter Link Health reports and add reviewed URL edits - #54

Merged
wpgaurav merged 1 commit into
mainfrom
codex/link-health-filters-editor
Oct 2, 2026
Merged

wpgaurav merged 1 commit into
mainfrom
codex/link-health-filters-editor

Conversation

@wpgaurav

@wpgaurav wpgaurav commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Makes the Link Health report filterable by result status, source type, and URL/source-title text. Filters are applied before 50-row pagination and stay active during live updates, navigation, and CSV export.

Each row now offers Replace URL and Unlink for its source post. Preview shows the matching-anchor count; Apply requires the current actor's expiring token and an unchanged source fingerprint. A binary compare-and-swap protects against saves arriving after validation. Edits preserve surrounding markup, fragments, child text/media, native button structure, revisions, and post-save cache notifications. URLs duplicated in serialized block settings defer to the post editor instead of risking an inconsistent block. Percent-encoded URLs are preserved.

The edit dialog pauses report replacement without stopping scan progress. Changed inputs, cancelled previews, and late responses cannot authorize a different edit. Successful saves reconcile the report, retaining unchanged results and marking new destinations unchecked.

Validation:

  • PHP syntax, WordPress coding standards/PHP 7.4 compatibility, 167 PHP tests / 892 assertions, and 18 JavaScript tests passed. Utility cases also passed against newer local core; the native-markup and serialized-settings guard ran on Gatilab's actual core.
  • On Gatilab: 200 broken links filtered correctly; page two contained 50 broken rows; CSV exported exactly the filtered 200. Combined status/type filters and source-title search passed.
  • A temporary fixture exercised replacement of three anchors, preserved fragments, unlinking text/image/button anchors, revision creation, source readback, public frontend output, and percent encoding.
  • At 390px, the dialog measured 342px with no overflow. Switching an invalid replacement input to Unlink still produced a valid preview.
  • Fixtures and revisions were removed after checking their expected content. All 19 module settings, 1,203 existing post/page content/type/status hashes, and existing link-report metadata matched the snapshot. All 150 deployed runtime files matched the package.

Visual-check limitation: Gutenberg's iframe canvas stayed empty in the test browser for both the edited fixture and an untouched control. No successful canvas-validation claim is made; stored block structure, surrounding markup, revisions, and public frontend output were verified. The existing iframe visual release gate remains tracked separately.

See docs/link-health-edit-verification.md for details and recovery location. readme.txt and README.md describe the new filters and edit scope.

@wpgaurav
wpgaurav merged commit f85d308 into main Oct 2, 2026
11 checks passed
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.

1 participant