feat: add onboarding info fields to first user setup#23989
feat: add onboarding info fields to first user setup#23989jeremyruppel merged 5 commits intomainfrom
Conversation
Add optional demographic and newsletter preference fields to the setup page: business use (yes/no), industry type, organization size, and two newsletter toggles (marketing, release/security updates). The new data flows through telemetry via a FirstUserOnboarding struct in the snapshot payload, sent once when the first user is created. The telemetry-server and BigQuery schema changes are required separately to persist this data.
johnstcn
left a comment
There was a problem hiding this comment.
🤖 Clean, small PR that follows existing patterns well. The struct design, naming, and generated docs are all correct. A couple of data-model issues worth addressing before this ships, since the telemetry wire format is hard to change after the fact.
This review contains findings that may need attention before merge.
1 P0, 1 P1, 1 P2, 1 P3, 2 nits, 1 obs across 7 inline comments.
- Make OnboardingInfo a pointer on CreateFirstUserRequest so clients that omit the field produce a nil snapshot entry, not zero-valued bools - Change IsBusiness/NewsletterMarketing/NewsletterReleases to *bool so an explicit "no" is distinguishable from a skipped question - Add OrgSizeRange typed enum with four constants; type OrgSize field - Add IndustryType doc comment listing expected values - Nil-check OnboardingInfo in handler before populating telemetry struct - Add GDPR note about newsletter consent bundled in telemetry snapshot - Add TestFirstUser_OnboardingTelemetry (happy path + omitted path) - Regenerate swagger and TypeScript types Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…tions Introduces a typed IndustryType enum (14 values) to replace the previous free-form string field on CreateFirstUserOnboardingInfo. Updates OrgSizeRange from 4 buckets to 7, including "Just me" for solo users. The frontend option arrays use display order (ascending headcount / UX grouping) rather than the alphabetical order in the generated constants, which is documented with a comment to prevent silent drift. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Documentation CheckUpdates Needed
Automated review via Coder Tasks |
johnstcn
left a comment
There was a problem hiding this comment.
🤖 Thanks for fixing the wire-format issue, adding typed enums, and getting tests in. The round 1 findings are all resolved.
Fresh review found 1 P2 and 1 P3 across 2 inline comments.
johnstcn
left a comment
There was a problem hiding this comment.
Approving in advance of the issues in R2 being addressed. I don't need to review again. Nice work!
Add optional demographic and newsletter preference fields to the setup page: business use (yes/no), industry type, organization size, and two newsletter toggles (marketing, release/security updates).
The new data flows through telemetry via a FirstUserOnboarding struct in the snapshot payload, sent once when the first user is created. The telemetry-server and BigQuery schema changes are required separately to persist this data.