Skip to content

Let older plugins be approved without a demo video, and explain why Approve is blocked - #595

Open
sonalidudhia wants to merge 2 commits into
NativePHP:mainfrom
sonalidudhia:fix/plugin-approve-action
Open

sonalidudhia wants to merge 2 commits into
NativePHP:mainfrom
sonalidudhia:fix/plugin-approve-action

Conversation

@sonalidudhia

Copy link
Copy Markdown
Contributor

Summary

Admins, super admins included, couldn't approve some pending plugins: the Approve button was greyed out and did nothing. Two causes:

  1. Approve gave no reason. It was disabled whenever a required review check failed, but the failing checks were only listed in the confirmation popup, which a disabled button can't open.
  2. Older plugins could never pass. Require a demo video before plugins can be submitted for review #534 (25 Sep 2026) made a demo video required. Plugins already submitted before that had no way to meet it.

Changes

Approve explains itself

  • Approve stays clickable. When checks fail, the popup lists them and offers only Close.
  • The action still refuses to approve on the server.

Grandfathering for older submissions

  • Plugins first submitted for review before Plugin::DEMO_VIDEO_REQUIRED_FROM (the Require a demo video before plugins can be submitted for review #534 merge time, 2026-09-25 16:23:52 UTC) don't need a demo video.
  • Plugins first submitted after it still do.
  • The first submission comes from the Submitted activity, so resubmissions keep their original date.
  • Plugins that left draft before submissions were logged fall back to their creation date.
  • Drafts that were never submitted still need a video.
  • New Plugin::requiresDemoVideo() / meetsDemoVideoRequirement() are used everywhere the requirement is checked:
    • the admin Review Checks panel, which shows "✅ Not required — submitted before demo videos were required"
    • the Run Review Checks result
    • the developer's checklist and Submit button
    • the review-checks email

Testing

  • New tests/Feature/Filament/PluginApproveActionTest.php (8 tests):
    • super admin and FILAMENT_USERS admin can approve
    • failing checks are explained and not approved
    • grandfathering: before the cutoff, after it, resubmission, no submission record, old draft
  • Two PluginDemoVideoTest tests now pin created_at to now. The factory picks a random date in the last 6 months, which could fall before the cutoff and make those tests flaky.
  • Plugin, roles and developer-side plugin suites pass locally, apart from tests that need the Imagick extension (missing locally, unrelated).
  • Checked in the browser:
    • a plugin failing its checks explains why on Approve
    • an older plugin without a video shows as not required and can be confirmed

Worth confirming: the cutoff is the merge time of #534, not its deploy time.

🤖 Generated with Claude Code

sonalidudhia and others added 2 commits October 30, 2026 15:50
Approve was disabled whenever a pending plugin failed a required review
check. The failing checks were only listed in the confirmation popup,
which a disabled button can't open, so admins (super admins included)
saw a faded Approve button that did nothing.

Keep the button clickable. When checks fail, the popup lists them and
offers only Close, and the action refuses to approve on the server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plugins first sent for review before NativePHP#534 (25 Sep 2026) couldn't be
approved, because the new demo video check can never pass for them.
They no longer need a demo video; plugins first submitted after that
still do.

The first submission comes from the plugin's activity log, falling back
to its creation date for older plugins that left draft before
submissions were logged. Drafts that were never submitted still need a
video. Admin review checks, the developer's checklist and submit
button, and the review-checks email all use the same rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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