fix(subscriptions): scope event menu to the destination's supported events - #230
Merged
Conversation
…vents Closes #212's last open criterion. The create-time guard, manifest-level SupportedEvents, and dead-code removal already landed via RFC 0016; this scopes the subscription form's event menu per destination so the UI only offers events the selected integration handles, matching the backend guard. Backend: IntegrationTypeMetaDto exposes SupportedEvents, populated in ToMetaDto(). Frontend: SubscriptionFormModal filters the event options by the destination's supported patterns (same wildcard semantics as IntegrationManifest.HandlesEvent) and prunes already-selected events a newly chosen destination does not support.
cl8dep
force-pushed
the
fix/212-validate-subscription-events
branch
from
July 26, 2026 17:46
a6bd99e to
3a91e60
Compare
cl8dep
marked this pull request as ready for review
July 26, 2026 17:46
cl8dep
added a commit
that referenced
this pull request
Jul 27, 2026
…ents fix(subscriptions): scope event menu to the destination's supported events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the last open acceptance criterion of #212: the subscription create form now scopes its event menu to the selected destination, so the UI only offers events the destination integration actually handles.
The rest of #212 already landed on
mainvia the RFC 0016 work: the create-time guard inNotificationSubscriptionAppService.ValidateAsyncrejects unsupported events, the supported-event set is declared once at the manifest level (IntegrationManifest.SupportedEvents+HandlesEventwith wildcards), and the deadINotificationSubscriber/EventSubscriberdeclarations were removed. What remained was purely presentational: the event catalog endpoint returned the full closed catalog for every destination, so the form could not scope the menu per integration. This PR carries the supported-event set to the client and filters the menu with the same semantics the backend guard uses, so a user can no longer even select an event the destination would reject at save time.Related
Closes #212.
Changes
Backend:
IntegrationTypeMetaDtogains aSupportedEventsfield, populated inToMetaDto()from the manifest. This is the same wire-name set (with wildcards likealert:*) the create-time guard enforces, now surfaced to the client.Frontend (
apps/admin):SubscriptionFormModalfilters the event menu by the selected destination's supported patterns, mirroringIntegrationManifest.HandlesEvent(*,alert:*, exact match). A Personal destination is unscoped (no per-integration event set), so it still sees the full catalog.api-types.tsupdated to includesupportedEvents. This was hand-edited to match the DTO change rather than regenerated, becausepnpm run generate:api-typesrequires building the API against a liveappsettings.Development.jsonconnection string; the edit mirrors exactly what regeneration would emit.Testing
dotnet testpasses (unit + integration)pnpm exec tsc -bpasses in affected frontend app(s) (apps/web,apps/admin)Ran
dotnet build Piro.slnx(0 errors) and the relevantdotnet testfilter (subscription / manifest / catalog / integration-type, 75 passed), pluspnpm exec tsc -binapps/admin(clean). Not yet clicked through in a running browser.Screenshots
Checklist
.env/appsettings.*.jsonvalues committed