Skip to content

Address final review feedback and commit production assets#27

Draft
Copilot wants to merge 3 commits intoclaude/press-this-filter-ui-fdxr3from
copilot/sub-pr-26
Draft

Address final review feedback and commit production assets#27
Copilot wants to merge 3 commits intoclaude/press-this-filter-ui-fdxr3from
copilot/sub-pr-26

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 10, 2026

Final review pass to address remaining code review comments and prepare the plugin for distribution.

Code Quality Improvements

  • Version detector: Removed advertised capabilities without implementation (post_format_suggestion, validate_proxy_url, validate_request_ip, press_this_data)
  • Timeout management: Refactored to use useRef instead of state, ensuring cleanup on unmount prevents memory leaks
  • REST validation: Added null check for request body to prevent warnings on malformed requests
  • Dependency cleanup: Removed unused @wordpress packages (block-editor, data, icons)
  • Nonce middleware: Added validation before registration to prevent failures when localized data is missing
  • Experimental API: Replaced __experimentalText with stable <span> element for cross-version compatibility

Production Assets

Built and committed React settings UI to build/ directory. The plugin now ships with compiled assets instead of requiring end users to run the build process.

// Before: timeout could leak on unmount
const [timeoutId, setTimeoutId] = useState(null);
setTimeout(() => setSaved(false), 3000);

// After: guaranteed cleanup
const timeoutRef = useRef(null);
useEffect(() => () => clearTimeout(timeoutRef.current), []);
timeoutRef.current = setTimeout(() => setSaved(false), 3000);

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 10, 2026 02:10
… timeout cleanup, add input validation, remove unused deps, build assets

Co-authored-by: kraftbj <88897+kraftbj@users.noreply.github.com>
…xt color

Co-authored-by: kraftbj <88897+kraftbj@users.noreply.github.com>
Copilot AI changed the title [WIP] Update for Press This 2.x support and UI Address final review feedback and commit production assets Feb 10, 2026
Copilot AI requested a review from kraftbj February 10, 2026 02:14
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.

2 participants