feat: rebucket "Number of developers" onboarding options#24573
Merged
david-fraley merged 1 commit intomainfrom Apr 21, 2026
Merged
feat: rebucket "Number of developers" onboarding options#24573david-fraley merged 1 commit intomainfrom
david-fraley merged 1 commit intomainfrom
Conversation
Split the setup-page developer-count buckets into seven narrower ranges with a space on each side of the hyphen: 1-100 -\u003e 1 - 50, 51 - 100 101-500 -\u003e 101 - 200, 201 - 500 501-1000 -\u003e 501 - 1000 1001-2500 -\u003e 1001 - 2500 2500+ -\u003e 2500+ Applied in both places the bucket list lives: - site/src/pages/SetupPage/SetupPageView.tsx (numberOfDevelopersOptions) - cli/login.go (extracted to package-level developerBuckets to make the set directly testable) Downstream note: the selected bucket is JSON-serialized and POSTed to v2-licensor.coder.com/trial by enterprise/trialer/trialer.go. That service is out of this repo; if it ingests trial signups into BigQuery or any exact-string bucket, its schema, allowlists, dashboards, and historical rollups will need to be updated to handle the new values. This PR was authored by a Coder Agent on behalf of @david-fraley.
jeremyruppel
approved these changes
Apr 21, 2026
Contributor
jeremyruppel
left a comment
There was a problem hiding this comment.
@david-fraley I checked the licensor service and I don't see any schema change necessary. dashboards for existing queries must live elsewhere, so the caveats around updating dashboards and potential undercounting for existing queries still apply. code change looks good to me!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Split the "Number of developers" buckets on the first-user setup page into seven narrower ranges, with a space on each side of the hyphen.
1-1001 - 50101-50051 - 100501-1000101 - 2001001-2500201 - 5002500+501 - 10001001 - 25002500+The bucket list is duplicated in two source-of-truth files (frontend form and CLI prompt); both now match, each with a keep-in-sync comment pointing at the other.
Why
Finer segmentation of trial signups, particularly around the old
1-100and101-500boundaries.Downstream / licensor (BigQuery)
The selected bucket is JSON-serialized and POSTed to
https://v2-licensor.coder.com/trialbyenterprise/trialer/trialer.go. That licensor service is out of this repo. If it ingests trial signups into BigQuery (or any exact-string bucket), the schema, allowlists, dashboards, and historical rollups need coordinated updates:1 - 50,51 - 100,101 - 200,201 - 500,501 - 1000,1001 - 2500. Note501 - 1000and1001 - 2500are also new strings (whitespace change).50(inside the old1-100) and200(inside the old101-500). Any rollup that joins old and new values by exact string will undercount both sides of those two boundaries.2500+is unchanged.Licensor-repo owner needs to (a) extend any enum or allowlist, (b) update dashboards grouped by
developers, (c) decide a reconciliation rule for historical values.Out of scope (verified, no changes needed)
codersdk.CreateFirstUserTrialInfo.Developersis already a free-formstring;coderd/apidoc/docs.goanddocs/reference/api/{users,schemas}.mdalready document it asstring. No enum, no validation.coderd/users.gopasses the value straight through; no database column, audit table, or converter involved.coderdtest.TrialUserParams.Developers = "10-50": free-form sentinel not in the UI list, never asserted against the enum. Left unchanged.Tests
cli/login_internal_test.go(new):TestDeveloperBucketspins the exact 7-string slice.site/src/pages/SetupPage/SetupPageView.stories.tsx: newTrialOpenstory whoseplayfunction ticks the trial checkbox, opens the Select, and assertsgetAllByRole("option")returns the 7 labels in order.Local runs:
go test ./cli/ -run '^(TestDeveloperBuckets|TestLogin)$'passes.pnpm exec vitest run --project=storybook src/pages/SetupPage/SetupPageView.stories.tsxpasses (6 tests includingTrialOpen).make pre-commitvia the installed hook passed in 84s.Implementation plan (decision log)
developerBucketsincli/login.goso the list is directly assertable. Alternative was a ptytest-driven prompt test, rejected as more fragile.cli/login_internal_test.go(package cli) so it can access the unexported slice; matches existing*_internal_test.goconvention incli/.codersdkconstant for the bucket list. Frontend cannot import Go constants and threading throughtypesGenerated.tsis a bigger change than warranted. Mitigated with keep-in-sync comments at each site.This PR was authored by a Coder Agent on behalf of @david-fraley.