Skip to content

GH#100: add opt-in edited timestamps and deleted placeholders - #120

Merged
superdav42 merged 4 commits into
masterfrom
feature/auto-20261015-115932-gh100
Nov 24, 2026
Merged

superdav42 merged 4 commits into
masterfrom
feature/auto-20261015-115932-gh100

Conversation

@superdav42

@superdav42 superdav42 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Resolves #100 after the required runtime verification. Draft implementation checkpoint: not ready to merge.

  • Add disabled-by-default edited timestamp and deleted-placeholder settings in includes/Options.php and includes/Admin/Tabs/Settings.php.
  • Record _sce_edited_at only after a successful SCE content change; use the same localized comment_text label for AJAX save and reload. Failed writes and unchanged persisted content do not advance it.
  • Keep deleted originals in native WordPress Trash. Only previously approved native comments trashed through SCE receive _sce_deleted_placeholder; native classic comment lists receive structural-only redacted objects and a callback-safe placeholder renderer. Include approved descendants without reparenting or deleting replies. Pending/spam comments and WooCommerce reviews are excluded.
  • Preserve permanent-delete settings and filters: permanent deletion leaves no placeholder. WordPress restoration restores normal output and clears the presentation marker. Prevent repeated delete requests from permanently deleting an already trashed comment; report actual save/delete failures.
  • Redact the complete native comment author/avatar/content/editor DOM on AJAX deletion, keep its .children list, and move focus to the deletion status. Add wrapping, theme-inheriting indicator styles.
  • Document storage/privacy, pagination, restoration and unsupported block/custom-renderer boundaries in README.md, readme.txt, and DESIGN.md. Rebuild the editor bundle, frontend stylesheet and its tracked source map. Issue scope was corrected to include that directly generated map.

Reference paths

  • includes/Ajax.php: existing nonce/ownership-enforced save and delete handlers.
  • simple-comment-editing.php: native comment_text, comments_array, wp_list_comments_args, restoration and script-localization integration.
  • src/js/comment-editing/editing.js, src/scss/frontend.scss: existing editor deletion/lifecycle and frontend theme patterns.
  • dist/sce-editing.js, dist/sce-frontend.css, dist/sce-frontend.css.map: generated mirrors from the existing webpack build.

Verification

Pushed implementation head: 9dd13a1e640fd3d9e8d284f48e32941870563e77.

Validated against PHP 8.4.25, cached WordPress 7.1.3 core exports, Node 22.22.2, ESLint 8.26.0, Sass 1.55.0 and webpack 5.110.3. No new runner or test-only interfaces were added.

Passed:

git diff --check
php -l includes/Ajax.php
php -l includes/Options.php
php -l includes/Admin/Tabs/Settings.php
php -l simple-comment-editing.php
composer phpcs -- includes/Ajax.php includes/Options.php includes/Admin/Tabs/Settings.php simple-comment-editing.php
npx --no-install eslint src/js/comment-editing/editing.js
php -d memory_limit=1G vendor/bin/phpstan analyse --memory-limit=1G includes/Ajax.php includes/Options.php includes/Admin/Tabs/Settings.php simple-comment-editing.php
npm run lint:js
npm run build

PHPCS has zero errors and the same five pre-existing warnings as origin/master in the changed PHP files. Scoped ESLint has zero errors and the same twelve warnings as origin/master. Baselines were checked using git show origin/master:<path> piped to the same tools. The three webpack size warnings concern the unchanged integrations-admin bundle, not this feature's changed outputs. No warning configuration was weakened and unrelated findings were not repaired.

Independent read-only source review found no material introduced defects. The branch evidence bundle SHA-256 is afc22b2c1aa126197b0bcae9aa5da4f1c79d3c6a2b5621bcc54530946a43fb6b. Source review is not runtime acceptance proof.

The single immediate remote observation for this exact head showed all checks successful, with no terminal failures:

  • Code Quality: ESLint/build and PHPCS/PHPStan succeeded.
  • Existing PHPUnit matrix and aggregate: PHP 7.4 / WordPress 6.5, PHP 8.2–8.5 / latest WordPress, and the multisite job all succeeded.
  • CodeRabbit status succeeded on the draft; this is not a claim that the bot reviewed the feature.

Remote regression-suite success does not exercise every new feature-specific browser acceptance path below. CI/reviews were not polled.

Runtime Testing

  • Risk: critical (comment deletion and privacy).
  • Level: blocked / not runtime-verified.
  • Locally, the existing PHPUnit command composer test, with cached WordPress and a dedicated issue-specific test database configuration, exits before running tests because the runner's database account cannot select that database. Creating that isolated database is also denied. This is an environment permission failure, not an application test failure; the existing suite did pass remotely as recorded above.
  • This worktree has no configured isolated SCE site or authenticated browser route. WordPress CLI aliases are empty. Existing unrelated sites/databases were not reused; no new infrastructure was installed.
  • Consequently, save/no-op/failure, two-permission-level ownership, actual Trash/restore/permanent-delete flows, threaded and paginated native output, metadata, desktop/mobile/keyboard output, browser console/network and WordPress logs remain unverified.
  • The PR remains draft. No merge, approval bypass, deployment, release or issue closure is authorized by this checkpoint.

Acceptance matrix

Criterion Status Evidence / remaining proof
Enabled edited indicator shows last successful content-edit time after AJAX save and reload, not failed/no-op changes Unverified at runtime Persistence/formatting paths implemented and statically reviewed; real save/no-op/failure and reload comparison required.
Enabled deleted placeholder exposes no deleted text/private data and preserves threaded replies after reload Unverified at runtime Whitelisted projection, callback bypass and DOM redaction implemented; real native threaded/paginated lists, response bodies and browser DOM must be exercised.
Disabled behavior, restoration/permanent deletion and existing authorization retained Unverified at runtime Additive defaults and native lifecycle inspected; author/non-owner, disabled settings, restore, expiry and force-delete product paths required.

Recovery checkpoint

Owner: runner administrator / environment owner.

Required unblock result: provide an approved isolated SCE WordPress site and a dedicated test database with the minimum account privileges required by the repository's existing tests/README.md setup, using the runner's existing configuration/secret mechanism. Do not post credentials on GitHub and do not grant or reuse access to an unrelated site/database.

Resume condition and next action: resume this existing branch and PR at the pinned head once that exact environment permission/configuration is available. Run the existing PHPUnit suite and issue #100's real WordPress/browser acceptance paths; repair in-scope failures; then push the verified exact head, update this evidence and the merge summary, mark ready, observe remote state once, and make the single guarded merge attempt. Do not poll asynchronous CI/reviews.


aidevops.sh v3.39.27 plugin for OpenCode v1.19.0 with gpt-6.1-sol spent 23m and 236,469 tokens on this as a headless worker.

@superdav42 superdav42 added the origin:worker Created by headless/pulse worker session label Oct 15, 2026
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 569ba28 and 472d2c8.

Files ignored due to path filters: 3

  • dist/sce-editing.js is excluded by !**/dist/**
  • dist/sce-frontend.css is excluded by !**/dist/**
  • dist/sce-frontend.css.map is excluded by !**/dist/**, !**/*.map
Files selected for processing: 9

  • DESIGN.md
  • README.md
  • includes/Admin/Tabs/Settings.php
  • includes/Ajax.php
  • includes/Options.php
  • readme.txt
  • simple-comment-editing.php
  • src/js/comment-editing/editing.js
  • src/scss/frontend.scss
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@superdav42

superdav42 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator Author

Implementation checkpoint — blocked, not ready to merge

  • What: Implement disabled-by-default localized edited timestamps and redacted deleted-comment placeholders in native classic comment lists, with approved threaded replies and native Trash/restoration/permanent-deletion policy.
  • Issue: Add opt-in edited timestamps and deleted-comment indicators #100
  • PR: GH#100: add opt-in edited timestamps and deleted placeholders #120 (draft)
  • Head: 9dd13a1e640fd3d9e8d284f48e32941870563e77
  • Files changed: includes/Ajax.php, includes/Options.php, includes/Admin/Tabs/Settings.php, simple-comment-editing.php, src/js/comment-editing/editing.js, src/scss/frontend.scss, generated dist/sce-editing.js, dist/sce-frontend.css, dist/sce-frontend.css.map, README.md, readme.txt, DESIGN.md.
  • Testing: Scoped PHP syntax, PHPCS, PHPStan, scoped ESLint, npm run lint:js, npm run build and diff checks passed. Five PHP and twelve scoped JS warnings were reproduced on the base; webpack's size warnings concern unchanged admin output. Independent source review found no material introduced defect. Real WordPress/browser acceptance is NOT verified: the runner cannot create/select the required isolated test database and has no configured isolated SCE site.
  • Remote observation: All exact-head checks succeeded, including Code Quality and the existing PHPUnit matrix (PHP 7.4–8.5 and multisite). Aggregate PHPUnit result. This does not replace the remaining feature-specific WordPress/browser acceptance. No CI/review polling was performed.
  • Key decisions: No original author/content copy, no backfill/migration, no public inclusion of raw Trash records, no altered parent IDs or counts, and no placeholder for permanent deletion. Block comment-query loops and arbitrary renderers need their own integration.
  • Unblock: Environment owner provides the approved isolated WordPress site and dedicated test-database permissions through existing runner configuration. Resume this branch, run PHPUnit plus save/no-op/failure/delete/restore and two-permission-level desktop/mobile/keyboard product checks, refresh evidence, then mark ready and attempt guarded merge once. This checkpoint is not a completion claim or merge authorization.

aidevops.sh v3.39.27 plugin for OpenCode v1.19.0 with gpt-6.1-sol spent 23m and 236,469 tokens on this as a headless worker.

@superdav42
superdav42 force-pushed the feature/auto-20261015-115932-gh100 branch from f8a372b to 472d2c8 Compare November 24, 2026 20:17
@superdav42
superdav42 merged commit 4dd772c into master Nov 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

origin:worker Created by headless/pulse worker session

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add opt-in edited timestamps and deleted-comment indicators

1 participant