Skip to content

feat: add onboarding info fields to first user setup#23989

Merged
jeremyruppel merged 5 commits intomainfrom
feat/setup-onboarding-info-telemetry
Apr 3, 2026
Merged

feat: add onboarding info fields to first user setup#23989
jeremyruppel merged 5 commits intomainfrom
feat/setup-onboarding-info-telemetry

Conversation

@jeremyruppel
Copy link
Copy Markdown
Contributor

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.

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.
@github-actions github-actions bot added the community Pull Requests and issues created by the community. label Apr 2, 2026
@jeremyruppel jeremyruppel requested a review from johnstcn April 2, 2026 17:13
@jeremyruppel jeremyruppel changed the title feat(coderd): add onboarding info fields to first user setup feat: add onboarding info fields to first user setup Apr 2, 2026
@jeremyruppel jeremyruppel removed the community Pull Requests and issues created by the community. label Apr 2, 2026
Copy link
Copy Markdown
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.

jeremyruppel and others added 2 commits April 2, 2026 19:03
- 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]>
@coder-tasks
Copy link
Copy Markdown
Contributor

coder-tasks bot commented Apr 2, 2026

Documentation Check

Updates Needed

  • docs/admin/setup/telemetry.md — The "What we collect" section states "we do not collect any data that could identify individual users, except the administrator" and lists only the admin email as the exception. This PR now also collects newsletter marketing/releases consent and demographic fields (industry, org size, business use) from the first user via the telemetry snapshot. The newsletter consent in particular has different privacy implications (noted in the PR code with a GDPR comment). The telemetry doc should be updated to mention that optional onboarding preferences provided during initial setup are also included in the telemetry payload.

Automated review via Coder Tasks

Copy link
Copy Markdown
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.

Copy link
Copy Markdown
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving in advance of the issues in R2 being addressed. I don't need to review again. Nice work!

@jeremyruppel jeremyruppel merged commit da3c46b into main Apr 3, 2026
48 of 52 checks passed
@jeremyruppel jeremyruppel deleted the feat/setup-onboarding-info-telemetry branch April 3, 2026 13:52
@github-actions github-actions bot locked and limited conversation to collaborators Apr 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants