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

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.

---------

Co-authored-by: default <davidiii@fraley.us>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeremy Ruppel
2026-04-03 09:52:52 -04:00
committed by GitHub
co-authored by default Claude Sonnet 4.6
parent 53482adc2d
commit da3c46b557
9 changed files with 549 additions and 15 deletions
+112
View File
@@ -13105,6 +13105,59 @@
}
}
},
"codersdk.CreateFirstUserOnboardingInfo": {
"type": "object",
"properties": {
"industry_type": {
"enum": [
"Technology",
"Financial Services",
"Healthcare",
"Government",
"Education",
"Retail",
"Manufacturing",
"Media",
"Telecom",
"Energy",
"Transportation",
"Consulting",
"Non-Profit",
"Other"
],
"allOf": [
{
"$ref": "#/definitions/codersdk.IndustryType"
}
]
},
"is_business": {
"type": "boolean"
},
"newsletter_marketing": {
"type": "boolean"
},
"newsletter_releases": {
"type": "boolean"
},
"org_size": {
"enum": [
"Just me",
"2-10",
"11-50",
"51-200",
"201-1000",
"1001-5000",
"5000+"
],
"allOf": [
{
"$ref": "#/definitions/codersdk.OrgSizeRange"
}
]
}
}
},
"codersdk.CreateFirstUserRequest": {
"type": "object",
"required": ["email", "password", "username"],
@@ -13115,6 +13168,9 @@
"name": {
"type": "string"
},
"onboarding_info": {
"$ref": "#/definitions/codersdk.CreateFirstUserOnboardingInfo"
},
"password": {
"type": "string"
},
@@ -14914,6 +14970,41 @@
}
}
},
"codersdk.IndustryType": {
"type": "string",
"enum": [
"Technology",
"Financial Services",
"Healthcare",
"Government",
"Education",
"Retail",
"Manufacturing",
"Media",
"Telecom",
"Energy",
"Transportation",
"Consulting",
"Non-Profit",
"Other"
],
"x-enum-varnames": [
"IndustryTypeTechnology",
"IndustryTypeFinancial",
"IndustryTypeHealthcare",
"IndustryTypeGovernment",
"IndustryTypeEducation",
"IndustryTypeRetail",
"IndustryTypeManufacturing",
"IndustryTypeMedia",
"IndustryTypeTelecom",
"IndustryTypeEnergy",
"IndustryTypeTransportation",
"IndustryTypeConsulting",
"IndustryTypeNonProfit",
"IndustryTypeOther"
]
},
"codersdk.InsightsReportInterval": {
"type": "string",
"enum": ["day", "week"],
@@ -16038,6 +16129,27 @@
"OptionTypeListString"
]
},
"codersdk.OrgSizeRange": {
"type": "string",
"enum": [
"Just me",
"2-10",
"11-50",
"51-200",
"201-1000",
"1001-5000",
"5000+"
],
"x-enum-varnames": [
"OrgSizeRangeJustMe",
"OrgSizeRange2To10",
"OrgSizeRange11To50",
"OrgSizeRange51To200",
"OrgSizeRange201To1K",
"OrgSizeRange1KTo5K",
"OrgSizeRange5KPlus"
]
},
"codersdk.Organization": {
"type": "object",
"required": ["created_at", "id", "is_default", "updated_at"],