-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Update NPS Value Survey #9638
Conversation
✅ All Cypress E2E specs passed |
@@ -36,7 +37,7 @@ describe('Workflow Actions', () => { | |||
WorkflowPage.getters.isWorkflowSaved(); | |||
}); | |||
|
|||
it('should not save already saved workflow', () => { | |||
it.skip('should not save already saved workflow', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test failing on master. @MiloradFilipovic is looking into this. https://github.com/n8n-io/n8n/actions/runs/9453100846/job/26037911945
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ensure that this doesn't get left in the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple questions still but otherwise LGTM
@@ -36,7 +37,7 @@ describe('Workflow Actions', () => { | |||
WorkflowPage.getters.isWorkflowSaved(); | |||
}); | |||
|
|||
it('should not save already saved workflow', () => { | |||
it.skip('should not save already saved workflow', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ensure that this doesn't get left in the end
try { | ||
promptsData.value = await getPromptsData( | ||
settingsStore.settings.instanceId, | ||
currentUserId.value ?? '', | ||
); | ||
} catch (e) { | ||
console.error('Failed to fetch prompts data'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if this fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing, but maybe the nps survey will show. n8n api might be down, but it should not affect UX and no need to show notification (we make this call too often and user does not know about it).
try { | ||
promptsData.value = await getPromptsData( | ||
settingsStore.settings.instanceId, | ||
currentUserId.value ?? '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we even want to fetch the prompts data if currentUserId
is not set? Why not skip the whole requests then? In what case might this happen? Is there a possible race condition that this is called before currentUserId
has value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can add this. Technically no, since specific user actions are needed to trigger this, for example save a workflow.
I think this logic predates user management so maybe that's why. We did not have user id, just instance id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for a long time in n8n until v1, setting up an owner user was optional, even after we added user management. so userId could be undefined but a user is logged in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it should always be defined, it would be nicer to have an assert
to satisfy TS compiler and to communicate that this should always be defined when this gets called. Otherwise it can cause nasty bugs that are hard to debug (e.g. if there's a bug that this function gets always called before the currentUserId
is defined the nps survey will never get initialized properly).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that makes sense. Thanks for the suggestion
Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
* master: ci: Fix custom docker builds (no-changelog) (#9702) test: Fix e2e for projects missing instance owner (no-changelog) (#9703) ci: Refactor e2e tests to be less flaky (no-changelog) (#9695) feat(editor): Add move resources option to workflows and credentials on (#9654) fix: Introduce `HooksService` (#8962) fix(editor): Improve large data warning in input/output panel (#9671) ci(editor): Enforce type-safety in @n8n/chat builds as well (no-changelog) (#9685) fix(editor): Un-skip workflow save test (no-changelog) (#9698) refactor(core): Remove more dead code from event bus (no-changelog) (#9697) ci: Remove unused WaitTracker mocking (no-changelog) (#9694) feat: Update NPS Value Survey (#9638) refactor(core): Remove event bus channel (no-changelog) (#9663) refactor(core): Remove event bus helpers (no-changelog) (#9690) refactor(core): Merge event bus controllers and remove dead code (no-changelog) (#9688) ci: Fix e2e tests (no-changelog) (#9689) refactor(core): Use `@Licensed()` in event bus controller (no-changelog) (#9687) fix(editor): Node background for executing nodes in dark mode (#9682) fix(editor): Prevent saving already saved workflows (#9670) fix(editor): Fix node connection showing incorrect item count during … (#9684) refactor: Set up Cypress as pnpm workspace (no-changelog) (#6049)
* master: fix(editor): Add back credential type icon (no-changelog) (#9704) feat(editor): Add canvas edge toolbar hover show/hide support (no-changelog) (#9699) ci: Fix custom docker builds (no-changelog) (#9702) test: Fix e2e for projects missing instance owner (no-changelog) (#9703) ci: Refactor e2e tests to be less flaky (no-changelog) (#9695) feat(editor): Add move resources option to workflows and credentials on (#9654) fix: Introduce `HooksService` (#8962) fix(editor): Improve large data warning in input/output panel (#9671) ci(editor): Enforce type-safety in @n8n/chat builds as well (no-changelog) (#9685) fix(editor): Un-skip workflow save test (no-changelog) (#9698) refactor(core): Remove more dead code from event bus (no-changelog) (#9697) ci: Remove unused WaitTracker mocking (no-changelog) (#9694) feat: Update NPS Value Survey (#9638) refactor(core): Remove event bus channel (no-changelog) (#9663) refactor(core): Remove event bus helpers (no-changelog) (#9690)
Got released with |
Summary
Fix and refactor value (NPS) survey to show periodically for users
Value (NPS) survey asks user to rate n8n as below, then asks if they want to share their email. It depends on calling an external service that decides whether to show survey or not. That has been broken for a long time.
(current version)
Now we are rebuilding it without depending on an external service. It simply periodically (every 6 months) asks user to rate n8n again (if user ignores survey, it crops up a week later at most 3 times). The response is sent through telemetry.
(updated version)
Related tickets and issues
Review / Merge checklist
(no-changelog)
otherwise. (conventions)