Skip to content

feat(031): configurable webhooks — frontend UI + full test coverage#4234

Merged
ildyria merged 20 commits intomasterfrom
copilot/feature-31-configurable-webhooks
Mar 31, 2026
Merged

feat(031): configurable webhooks — frontend UI + full test coverage#4234
ildyria merged 20 commits intomasterfrom
copilot/feature-31-configurable-webhooks

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

Implements the frontend management UI for the outgoing webhook feature (backend was already in place, gated behind WEBHOOK_ENABLED=false) and adds comprehensive test coverage across all layers.

Frontend

  • Webhooks.vue — admin page: DataTable listing all webhooks with inline enable/disable toggle, create/edit Dialog, and ConfirmDialog for deletion
  • webhook-service.ts — typed Axios client for all 6 CRUD endpoints (GET|POST /Webhook, GET|PUT|PATCH|DELETE /Webhook/{id})
  • lychee.d.ts — new enum types (PhotoWebhookEventType, WebhookMethodType, WebhookPayloadFormatType), WebhookResource, and is_mod_webhook_enabled on ModulesRightsResource
  • Router + left menu/webhooks route + admin submenu entry gated on is_mod_webhook_enabled
  • lang/en/webhook.php + 'webhooks' key added to all 22 locale left-menu.php files

Tests

Unit (45 tests)

Suite Covers
Unit/DTO/WebhookPayloadTest toJsonArray() / toQueryArray() — null/partial/full fields; base64 size-variant URL encoding
Unit/Services/WebhookPayloadBuilderTest build() flag combinations; filterSizeVariants() with null/empty/specific/absent types
Unit/Listeners/WebhookListenerTest Feature-gate early-return on all 3 handlers; dispatch count vs. enabled webhooks; missing-photo warning log
Unit/Jobs/WebhookDispatchJobTest All 5 HTTP methods (#[DataProvider]); JSON body vs. query-string encoding; secret header (default/custom/absent); standard headers; success/failure/exception logging; configurable timeout

Feature (47 tests, 6 files under tests/Feature_v2/Webhook/)

Every CRUD endpoint asserts: 401 unauthenticated · 403 non-admin · 403 feature inactive · 404 missing resource · 422 validation · happy path with DB assertions. Secret is verified never to leak (has_secret boolean only).

Infrastructure

  • tests/Traits/RequiresEmptyWebhooks — table-cleanup trait, following RequiresEmptyRenamerRules pattern

⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

… and open questions

Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
Agent-Logs-Url: https://github.com/LycheeOrg/Lychee/sessions/6e7b12fe-ea8f-49ed-8082-b157d3585774
Copilot AI changed the title [WIP] Add support for configurable webhooks feat(specs): Feature 031 – Configurable Webhooks specification, plan & tasks Mar 25, 2026
Copilot AI requested a review from ildyria March 25, 2026 18:53
…ks, log Q-031-08

Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
Agent-Logs-Url: https://github.com/LycheeOrg/Lychee/sessions/839f6431-571b-472a-93b8-33afa672d7ca
…migration, model, CRUD API, payload/dispatch, events, artisan command)

Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
Agent-Logs-Url: https://github.com/LycheeOrg/Lychee/sessions/f6b8545a-e27e-4544-943e-5b88ddc83e08
Copilot AI changed the title feat(specs): Feature 031 – Configurable Webhooks specification, plan & tasks feat(031): resolve Q-031-08, implement configurable webhooks backend (I1–I4) Mar 25, 2026
… ENV, guard dispatch/routes/frontend

Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
Copilot AI changed the title feat(031): resolve Q-031-08, implement configurable webhooks backend (I1–I4) feat(031): configurable webhooks — feature gate, ENV-driven timeout, base64 query-string encoding Mar 26, 2026
@ildyria ildyria marked this pull request as ready for review March 26, 2026 18:36
@ildyria ildyria requested a review from a team as a code owner March 26, 2026 18:36
Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
Copilot AI changed the title feat(031): configurable webhooks — feature gate, ENV-driven timeout, base64 query-string encoding feat(031): webhook feature gate + ENV-driven timeout + frontend management UI Mar 30, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 87.36842% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.19%. Comparing base (cd06696) to head (ef1fb18).
⚠️ Report is 18 commits behind head on master.

🚀 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.

Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
Copilot AI changed the title feat(031): webhook feature gate + ENV-driven timeout + frontend management UI feat(031): configurable webhooks — frontend UI + full test coverage Mar 31, 2026
@ildyria ildyria merged commit 0706c17 into master Mar 31, 2026
44 checks passed
@ildyria ildyria deleted the copilot/feature-31-configurable-webhooks branch March 31, 2026 21:56
@ildyria ildyria added the ignore-for-release Do not publish this PR in the release summary. label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore-for-release Do not publish this PR in the release summary.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants