Skip to content

Fix save trp hash.ag#710

Open
alexandergull wants to merge 14 commits intodevfrom
fix_save_trp_hash.ag
Open

Fix save trp hash.ag#710
alexandergull wants to merge 14 commits intodevfrom
fix_save_trp_hash.ag

Conversation

@alexandergull
Copy link
Copy Markdown
Member

@alexandergull alexandergull commented Jan 5, 2026

Comment thread lib/Cleantalk/ApbctWP/CleantalkRealPerson.php
@alexandergull alexandergull changed the base branch from fix to dev February 16, 2026 09:03
Copilot AI review requested due to automatic review settings May 1, 2026 11:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Fixes how the “The Real Person” (TRP) hash is stored/checked for comments, especially around the “skip moderation for first comment” (auto-moderation) setting, and synchronizes related settings between plugin and WordPress options.

Changes:

  • Centralizes TRP hash meta keys and adds helpers to check/set the hash.
  • Updates comment preprocessing flow to set TRP hash via a class method and standardizes detection of the “first comment auto-mod” setting.
  • Syncs discussion/plugin setting values and hardens UI checked-state handling.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
lib/Cleantalk/ApbctWP/CleantalkRealPerson.php Adds TRP hash helpers and updates badge CSS-class logic to rely on saved hash meta.
lib/Cleantalk/Antispam/Integrations/CleantalkPreprocessComment.php Adds hook registration to set TRP hash on comment_post and refactors moderation option detection.
inc/cleantalk-settings.php Syncs moderation option between settings sources; adjusts checkbox checked() value handling.
inc/cleantalk-public.php Removes legacy function that stored the auto-moderation TRP hash meta.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/Cleantalk/Antispam/Integrations/CleantalkPreprocessComment.php Outdated
Comment thread lib/Cleantalk/Antispam/Integrations/CleantalkPreprocessComment.php Outdated
Comment thread lib/Cleantalk/ApbctWP/CleantalkRealPerson.php
Comment thread lib/Cleantalk/Antispam/Integrations/CleantalkPreprocessComment.php Outdated
Comment thread lib/Cleantalk/Antispam/Integrations/CleantalkPreprocessComment.php
Comment thread lib/Cleantalk/Antispam/Integrations/CleantalkPreprocessComment.php
Copilot AI review requested due to automatic review settings May 6, 2026 15:12
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

❌ Patch coverage is 6.66667% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.77%. Comparing base (db07073) to head (c558a59).

Files with missing lines Patch % Lines
...tispam/Integrations/CleantalkPreprocessComment.php 0.00% 16 Missing ⚠️
lib/Cleantalk/ApbctWP/CleantalkRealPerson.php 0.00% 11 Missing ⚠️
inc/cleantalk-settings.php 66.66% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (6.66%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev     #710      +/-   ##
============================================
- Coverage     25.77%   25.77%   -0.01%     
- Complexity     5591     5593       +2     
============================================
  Files           264      264              
  Lines         24076    24086      +10     
============================================
+ Hits           6206     6208       +2     
- Misses        17870    17878       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

6 participants