feat(webhooks): show workflow-data callout on MRF webhook settings#9760
feat(webhooks): show workflow-data callout on MRF webhook settings#9760yin-boop wants to merge 4 commits into
Conversation
Admins wiring a webhook on an MRF form have no signal that only Plumber can act on data from every workflow step — other tools only use the first step's fields. Add a self-contained info callout (InlineMessage, markdown copy from a single i18n key) linking to Plumber and the simplified-modes FAQ, so the heads-up lives next to the endpoint URL where the integration decision is made. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Gate the workflow-data callout on response mode alone: the page computes showWorkflowInfobox = (responseMode === Multirespondent) and passes it into WebhooksSection, which renders the callout above the endpoint URL input. No re-check of enable-mrf-webhooks (already guaranteed by the page-level enableWebhooks gate) and no mrf-cutover dependency (that flag governs form-creation defaults, not webhook messaging). Page tests pin the two-quadrant visibility matrix — shown for MRF, hidden for Storage — and an MrfMode story locks the MRF state in Chromatic. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two stories now stand up identical GrowthBook provider boilerplate to flip a feature flag on. Extract a withGrowthBookFeatures(...flags) helper so each story declares just the flags it needs. No behaviour change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Working docs assembled by prepare-for-review: the PR body (with before/after Storybook captures) and the multi-axis review findings, kept in-repo so reviewers can see the review disposition alongside the change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| ) | ||
| } | ||
|
|
||
| const showWorkflowInfobox = |
There was a problem hiding this comment.
Why this gate checks only response mode: it deliberately does not re-check enableMrfWebhooks — this code path is unreachable unless that flag already passed the page-level enableWebhooks check above, so re-checking would be dead logic. It also does not gate on mrf-cutover (an earlier draft did): that flag controls form-creation defaults app-wide, a separate concern from whether an MRF form's webhook settings should carry this heads-up. The capability distinction the copy describes is true regardless of cutover state.
🤖 Generated with Claude Code
Review findings — webhooks-workflow-infobox vs developMulti-axis review ( StandardsClean. No documented-standard violations — i18n key placement and interpolation match
SpecClean. All eight acceptance criteria verified met against the diff: placement above the endpoint URL field, gate is
One informational note dropped at 50 (below cutoff): converting the pre-existing Architecture / Divergent (merged — both axes flagged the same two lines)
All other choices were examined by the Divergent axis and confirmed optimal: always-on callout rather than workflow-presence detection, single i18n key with markdown links and URL interpolation, reuse of Summary2 surviving findings (both Architecture+Divergent, cross-axis merged); Standards and Spec clean. Worst issue: the helper's placement (the one clearly actionable in-PR change), with the prop-drilling finding gated on whether the spec's structure decision should be revisited. 3 findings dropped below threshold (scores 60, 50, and two sub-threshold Standards duplicates of the judgement findings). |
Problem
Admins can connect a webhook to an MRF form to send each submission to another tool in real time, but not every destination can do the same thing with it: only Plumber can use the multi-step workflow data across all steps — any other tool can only use the first step's data. Admins have no way to know this at the moment they configure a webhook, so they may wire up the wrong integration and be surprised when their tool can't act on later steps.
Solution
Adds an always-on informational callout at the top of the webhook settings, above the endpoint URL field, telling admins that if workflows are enabled, only Plumber can use data from all workflow steps while other tools can only use data from the first step, with a "Learn more" link to the simplified-modes FAQ. The callout is a neutral heads-up, not an error, and shows regardless of whether a workflow is configured yet or whether the entered URL is a Plumber link.
Visibility is gated on response mode alone:
SettingsWebhooksPagecomputesshowWorkflowInfobox = responseMode === Multirespondentand passes a single boolean intoWebhooksSection. No feature flag is checked at this line —enable-mrf-webhooksis already guaranteed true on this code path by the page's existingenableWebhooksgate, andmrf-cutovergoverns form-creation defaults, a separate concern from webhook messaging.Alternatives considered
WebhooksSection(or the callout itself) readuseAdminFormSettings()directly, like its siblingsWebhookUrlInputandRetryToggledo. We kept the visibility decision at the page instead: the page already owns the settings query and the response-mode branching, so the section stays a dumb layout component with no data lookups of its own, and the callout stays a prop-less, non-fetching component that tests in isolation.webhooks-workflow-calloutbranch) gated the callout onmrf-cutover&& MRF. We dropped the cutover flag: it couples the callout to the cutover rollout, while the capability distinction the copy describes is true regardless of cutover state.Screenshots
Captured from the page stories in Storybook. The MRF "before" is unavailable via Storybook — the MRF story is introduced by this PR; on develop the same MRF form rendered the section without the callout, visually identical to the Storage row.
enable-mrf-webhookson)Breaking Changes
No - backwards compatible.
Tests
TC1: Callout shows on an MRF form
enable-mrf-webhooksGrowthBook flag for your adminTC2: Callout hidden on a Storage-mode form
TC3: Callout is unconditional on workflow/URL
🤖 Generated with Claude Code