Skip to content

feat: add publish and workflow feedback triggers#9689

Open
bookwormsuf wants to merge 1 commit into
feat/admin-feedback-storefrom
feat/admin-feedback-triggers
Open

feat: add publish and workflow feedback triggers#9689
bookwormsuf wants to merge 1 commit into
feat/admin-feedback-storefrom
feat/admin-feedback-triggers

Conversation

@bookwormsuf

Copy link
Copy Markdown
Contributor

Problem

Part 4 of admin satisfaction rating split (see #9683, #9684, #9688). Adds two new trigger points that tell the zustand feedback store when a user has done enough work to warrant a satisfaction prompt.

Solution

Two trigger points call setEligible() on the admin feedback store:

  1. Publish trigger — when a form goes public (storage or MRF mode), the settings mutation marks the user as eligible for the 'publish' feedback prompt.
  2. Workflow trigger — when creating or updating a workflow step, if 2+ steps are "completed" (have fields assigned + respondent configured), marks the user eligible for the 'workflow' feedback prompt.

An isStepCompleted utility determines whether a workflow step has all required fields based on its WorkflowType (Static/Dynamic/Conditional). 4 unit tests cover one per workflow type + the empty-edit guard.

Breaking Changes

No — backwards compatible. Trigger points are gated behind the 5star-admin-rating feature flag (PR 1).

Tests

TC1: Publish triggers feedback

  • Enable feature flag: window._growthbook.setForcedFeatures(new Map([['5star-admin-rating', true]]))
  • Open a storage-mode form, click Publish
  • Verify feedback modal appears

TC2: Workflow triggers feedback

  • Enable feature flag
  • Open an MRF form, add 2 workflow steps with fields + respondents configured
  • Verify feedback modal appears after the 2nd completed step

TC3: Incomplete workflow does not trigger

  • Enable feature flag
  • Add 1 complete workflow step and 1 incomplete step (no fields assigned)
  • Verify no feedback modal

🤖 Generated with Claude Code

Set admin feedback eligibility when a form goes public or when 2+
workflow steps are completed. Adds isStepCompleted utility for
determining workflow step completion across all WorkflowTypes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bookwormsuf
bookwormsuf requested a review from a team as a code owner June 30, 2026 16:27
@mergify

mergify Bot commented Jun 30, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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