From 9899497887e57c04e44065d1c617ed17529b19f9 Mon Sep 17 00:00:00 2001 From: Danny White <3104761+dnywh@users.noreply.github.com> Date: Fri, 15 May 2026 17:05:32 +1000 Subject: [PATCH 1/6] fix(cli): add org creation survey prompts --- apps/cli-go/internal/orgs/create/create.go | 43 ++++++- .../internal/orgs/create/create_test.go | 110 ++++++++++++++++++ 2 files changed, 152 insertions(+), 1 deletion(-) diff --git a/apps/cli-go/internal/orgs/create/create.go b/apps/cli-go/internal/orgs/create/create.go index 1d88630c18..0d8d13ab68 100644 --- a/apps/cli-go/internal/orgs/create/create.go +++ b/apps/cli-go/internal/orgs/create/create.go @@ -1,9 +1,12 @@ package create import ( + "bytes" "context" + "encoding/json" "fmt" "os" + "strings" "github.com/go-errors/errors" "github.com/supabase/cli/internal/orgs/list" @@ -11,8 +14,24 @@ import ( "github.com/supabase/cli/pkg/api" ) +type createOrganizationRequest struct { + Name string `json:"name"` + HeardFrom string `json:"heard_from,omitempty"` + Building string `json:"building,omitempty"` +} + +var newConsole = utils.NewConsole + func Run(ctx context.Context, name string) error { - resp, err := utils.GetSupabase().V1CreateAnOrganizationWithResponse(ctx, api.V1CreateAnOrganizationJSONRequestBody{Name: name}) + body, err := buildCreateOrganizationRequest(ctx, name) + if err != nil { + return err + } + payload, err := json.Marshal(body) + if err != nil { + return errors.Errorf("failed to encode organization request: %w", err) + } + resp, err := utils.GetSupabase().V1CreateAnOrganizationWithBodyWithResponse(ctx, "application/json", bytes.NewReader(payload)) if err != nil { return errors.Errorf("failed to create organization: %w", err) } else if resp.JSON201 == nil { @@ -26,3 +45,25 @@ func Run(ctx context.Context, name string) error { } return utils.EncodeOutput(utils.OutputFormat.Value, os.Stdout, *resp.JSON201) } + +func buildCreateOrganizationRequest(ctx context.Context, name string) (createOrganizationRequest, error) { + body := createOrganizationRequest{Name: name} + console := newConsole() + if utils.OutputFormat.Value != utils.OutputPretty || !console.IsTTY { + return body, nil + } + + heardFrom, err := console.PromptText(ctx, "Where did you hear about us? ") + if err != nil { + return body, err + } + body.HeardFrom = strings.TrimSpace(heardFrom) + + building, err := console.PromptText(ctx, "What are you building? ") + if err != nil { + return body, err + } + body.Building = strings.TrimSpace(building) + + return body, nil +} diff --git a/apps/cli-go/internal/orgs/create/create_test.go b/apps/cli-go/internal/orgs/create/create_test.go index f491bdc314..014c9d07c1 100644 --- a/apps/cli-go/internal/orgs/create/create_test.go +++ b/apps/cli-go/internal/orgs/create/create_test.go @@ -9,6 +9,7 @@ import ( "github.com/h2non/gock" "github.com/stretchr/testify/assert" "github.com/supabase/cli/internal/testing/apitest" + "github.com/supabase/cli/internal/testing/fstest" "github.com/supabase/cli/internal/utils" "github.com/supabase/cli/pkg/api" ) @@ -16,6 +17,11 @@ import ( func TestOrganizationCreateCommand(t *testing.T) { orgName := "Test Organization" + t.Cleanup(func() { + newConsole = utils.NewConsole + utils.OutputFormat.Value = utils.OutputPretty + }) + t.Run("create an organization", func(t *testing.T) { // Setup valid access token token := apitest.RandomAccessToken(t) @@ -24,6 +30,106 @@ func TestOrganizationCreateCommand(t *testing.T) { defer gock.OffAll() gock.New(utils.DefaultApiHost). Post("/v1/organizations"). + MatchType("json"). + JSON(createOrganizationRequest{Name: orgName}). + Reply(http.StatusCreated). + JSON(api.OrganizationResponseV1{ + Id: "combined-fuchsia-lion", + Name: orgName, + }) + // Run test + assert.NoError(t, Run(context.Background(), orgName)) + // Validate api + assert.Empty(t, apitest.ListUnmatchedRequests()) + }) + + t.Run("sends optional survey fields from interactive prompts", func(t *testing.T) { + // Setup valid access token + token := apitest.RandomAccessToken(t) + t.Setenv("SUPABASE_ACCESS_TOKEN", string(token)) + t.Cleanup(fstest.MockStdin(t, "GitHub\nAI coding assistant\n")) + newConsole = func() *utils.Console { + console := utils.NewConsole() + console.IsTTY = true + return console + } + t.Cleanup(func() { + newConsole = utils.NewConsole + }) + // Flush pending mocks after test execution + defer gock.OffAll() + gock.New(utils.DefaultApiHost). + Post("/v1/organizations"). + MatchType("json"). + JSON(createOrganizationRequest{ + Name: orgName, + HeardFrom: "GitHub", + Building: "AI coding assistant", + }). + Reply(http.StatusCreated). + JSON(api.OrganizationResponseV1{ + Id: "combined-fuchsia-lion", + Name: orgName, + }) + // Run test + assert.NoError(t, Run(context.Background(), orgName)) + // Validate api + assert.Empty(t, apitest.ListUnmatchedRequests()) + }) + + t.Run("omits blank survey prompt answers", func(t *testing.T) { + // Setup valid access token + token := apitest.RandomAccessToken(t) + t.Setenv("SUPABASE_ACCESS_TOKEN", string(token)) + t.Cleanup(fstest.MockStdin(t, "\n\n")) + newConsole = func() *utils.Console { + console := utils.NewConsole() + console.IsTTY = true + return console + } + t.Cleanup(func() { + newConsole = utils.NewConsole + }) + // Flush pending mocks after test execution + defer gock.OffAll() + gock.New(utils.DefaultApiHost). + Post("/v1/organizations"). + MatchType("json"). + JSON(createOrganizationRequest{Name: orgName}). + Reply(http.StatusCreated). + JSON(api.OrganizationResponseV1{ + Id: "combined-fuchsia-lion", + Name: orgName, + }) + // Run test + assert.NoError(t, Run(context.Background(), orgName)) + // Validate api + assert.Empty(t, apitest.ListUnmatchedRequests()) + }) + + t.Run("skips survey prompts for structured output", func(t *testing.T) { + // Setup valid access token + token := apitest.RandomAccessToken(t) + t.Setenv("SUPABASE_ACCESS_TOKEN", string(token)) + utils.OutputFormat.Value = utils.OutputJson + t.Cleanup(func() { + utils.OutputFormat.Value = utils.OutputPretty + }) + t.Cleanup(fstest.MockStdin(t, "GitHub\nAI coding assistant\n")) + newConsole = func() *utils.Console { + console := utils.NewConsole() + console.IsTTY = true + return console + } + t.Cleanup(func() { + newConsole = utils.NewConsole + }) + // Flush pending mocks after test execution + defer gock.OffAll() + gock.New(utils.DefaultApiHost). + Post("/v1/organizations"). + MatchType("json"). + JSON(createOrganizationRequest{Name: orgName}). Reply(http.StatusCreated). JSON(api.OrganizationResponseV1{ Id: "combined-fuchsia-lion", @@ -43,6 +149,8 @@ func TestOrganizationCreateCommand(t *testing.T) { defer gock.OffAll() gock.New(utils.DefaultApiHost). Post("/v1/organizations"). + MatchType("json"). + JSON(createOrganizationRequest{Name: orgName}). ReplyError(errors.New("network error")) // Run test assert.Error(t, Run(context.Background(), orgName)) @@ -58,6 +166,8 @@ func TestOrganizationCreateCommand(t *testing.T) { defer gock.OffAll() gock.New(utils.DefaultApiHost). Post("/v1/organizations"). + MatchType("json"). + JSON(createOrganizationRequest{Name: orgName}). Reply(http.StatusServiceUnavailable). JSON(map[string]string{"message": "unavailable"}) // Run test From 4ea07f63c9d26c56800b9a7006a17ded645d0d29 Mon Sep 17 00:00:00 2001 From: Danny White <3104761+dnywh@users.noreply.github.com> Date: Tue, 19 May 2026 14:38:27 +1000 Subject: [PATCH 2/6] fix(cli): clarify org creation survey feedback --- apps/cli-go/internal/orgs/create/create.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/cli-go/internal/orgs/create/create.go b/apps/cli-go/internal/orgs/create/create.go index 0d8d13ab68..4eaa9f5b13 100644 --- a/apps/cli-go/internal/orgs/create/create.go +++ b/apps/cli-go/internal/orgs/create/create.go @@ -31,6 +31,9 @@ func Run(ctx context.Context, name string) error { if err != nil { return errors.Errorf("failed to encode organization request: %w", err) } + if utils.OutputFormat.Value == utils.OutputPretty { + fmt.Fprintln(os.Stderr, "Creating organization...") + } resp, err := utils.GetSupabase().V1CreateAnOrganizationWithBodyWithResponse(ctx, "application/json", bytes.NewReader(payload)) if err != nil { return errors.Errorf("failed to create organization: %w", err) @@ -53,13 +56,13 @@ func buildCreateOrganizationRequest(ctx context.Context, name string) (createOrg return body, nil } - heardFrom, err := console.PromptText(ctx, "Where did you hear about us? ") + heardFrom, err := console.PromptText(ctx, "Where did you hear about us? (optional) ") if err != nil { return body, err } body.HeardFrom = strings.TrimSpace(heardFrom) - building, err := console.PromptText(ctx, "What are you building? ") + building, err := console.PromptText(ctx, "What are you building? (optional) ") if err != nil { return body, err } From d508898153406bf96dfc5ad8c6b234c0860e00e9 Mon Sep 17 00:00:00 2001 From: Danny White <3104761+dnywh@users.noreply.github.com> Date: Tue, 19 May 2026 14:52:04 +1000 Subject: [PATCH 3/6] fix(cli): submit org survey separately --- apps/cli-go/internal/orgs/create/create.go | 67 ++++++++++++++---- .../internal/orgs/create/create_test.go | 68 ++++++++++++++++--- 2 files changed, 113 insertions(+), 22 deletions(-) diff --git a/apps/cli-go/internal/orgs/create/create.go b/apps/cli-go/internal/orgs/create/create.go index 4eaa9f5b13..75af68fed7 100644 --- a/apps/cli-go/internal/orgs/create/create.go +++ b/apps/cli-go/internal/orgs/create/create.go @@ -1,46 +1,61 @@ package create import ( - "bytes" "context" - "encoding/json" "fmt" + "net/http" "os" "strings" "github.com/go-errors/errors" + "github.com/spf13/afero" "github.com/supabase/cli/internal/orgs/list" "github.com/supabase/cli/internal/utils" "github.com/supabase/cli/pkg/api" + "github.com/supabase/cli/pkg/fetcher" ) -type createOrganizationRequest struct { - Name string `json:"name"` +type createOrganizationInput struct { + Name string + HeardFrom string + Building string +} + +type onboardingSurveyRequest struct { + Slug string `json:"slug"` HeardFrom string `json:"heard_from,omitempty"` Building string `json:"building,omitempty"` } var newConsole = utils.NewConsole +var submitSurvey = submitOnboardingSurvey func Run(ctx context.Context, name string) error { - body, err := buildCreateOrganizationRequest(ctx, name) + input, err := buildCreateOrganizationInput(ctx, name) if err != nil { return err } - payload, err := json.Marshal(body) - if err != nil { - return errors.Errorf("failed to encode organization request: %w", err) - } if utils.OutputFormat.Value == utils.OutputPretty { fmt.Fprintln(os.Stderr, "Creating organization...") } - resp, err := utils.GetSupabase().V1CreateAnOrganizationWithBodyWithResponse(ctx, "application/json", bytes.NewReader(payload)) + resp, err := utils.GetSupabase().V1CreateAnOrganizationWithResponse(ctx, api.V1CreateAnOrganizationJSONRequestBody{ + Name: input.Name, + }) if err != nil { return errors.Errorf("failed to create organization: %w", err) } else if resp.JSON201 == nil { return errors.Errorf("unexpected create organization status %d: %s", resp.StatusCode(), string(resp.Body)) } + survey := onboardingSurveyRequest{ + Slug: organizationSlug(*resp.JSON201), + HeardFrom: input.HeardFrom, + Building: input.Building, + } + if err := submitSurvey(ctx, survey); err != nil && utils.OutputFormat.Value == utils.OutputPretty { + fmt.Fprintln(os.Stderr, "WARN: failed to submit organization survey:", err) + } + fmt.Println("Created organization:", resp.JSON201.Id) if utils.OutputFormat.Value == utils.OutputPretty { table := list.ToMarkdown([]api.OrganizationResponseV1{*resp.JSON201}) @@ -49,8 +64,8 @@ func Run(ctx context.Context, name string) error { return utils.EncodeOutput(utils.OutputFormat.Value, os.Stdout, *resp.JSON201) } -func buildCreateOrganizationRequest(ctx context.Context, name string) (createOrganizationRequest, error) { - body := createOrganizationRequest{Name: name} +func buildCreateOrganizationInput(ctx context.Context, name string) (createOrganizationInput, error) { + body := createOrganizationInput{Name: name} console := newConsole() if utils.OutputFormat.Value != utils.OutputPretty || !console.IsTTY { return body, nil @@ -70,3 +85,31 @@ func buildCreateOrganizationRequest(ctx context.Context, name string) (createOrg return body, nil } + +func organizationSlug(org api.OrganizationResponseV1) string { + if org.Slug != "" { + return org.Slug + } + return org.Id +} + +func submitOnboardingSurvey(ctx context.Context, body onboardingSurveyRequest) error { + if body.HeardFrom == "" && body.Building == "" { + return nil + } + token, err := utils.LoadAccessTokenFS(afero.NewOsFs()) + if err != nil { + return err + } + client := fetcher.NewFetcher( + utils.GetSupabaseAPIHost(), + fetcher.WithBearerToken(token), + fetcher.WithUserAgent("SupabaseCLI/"+utils.Version), + fetcher.WithExpectedStatus(http.StatusNoContent), + ) + resp, err := client.Send(ctx, http.MethodPost, "/platform/organizations/onboarding-survey", body) + if err != nil { + return err + } + return resp.Body.Close() +} diff --git a/apps/cli-go/internal/orgs/create/create_test.go b/apps/cli-go/internal/orgs/create/create_test.go index 014c9d07c1..98c1dd5694 100644 --- a/apps/cli-go/internal/orgs/create/create_test.go +++ b/apps/cli-go/internal/orgs/create/create_test.go @@ -19,6 +19,7 @@ func TestOrganizationCreateCommand(t *testing.T) { t.Cleanup(func() { newConsole = utils.NewConsole + submitSurvey = submitOnboardingSurvey utils.OutputFormat.Value = utils.OutputPretty }) @@ -31,7 +32,7 @@ func TestOrganizationCreateCommand(t *testing.T) { gock.New(utils.DefaultApiHost). Post("/v1/organizations"). MatchType("json"). - JSON(createOrganizationRequest{Name: orgName}). + JSON(api.V1CreateAnOrganizationJSONRequestBody{Name: orgName}). Reply(http.StatusCreated). JSON(api.OrganizationResponseV1{ Id: "combined-fuchsia-lion", @@ -61,16 +62,22 @@ func TestOrganizationCreateCommand(t *testing.T) { gock.New(utils.DefaultApiHost). Post("/v1/organizations"). MatchType("json"). - JSON(createOrganizationRequest{ - Name: orgName, - HeardFrom: "GitHub", - Building: "AI coding assistant", - }). + JSON(api.V1CreateAnOrganizationJSONRequestBody{Name: orgName}). Reply(http.StatusCreated). JSON(api.OrganizationResponseV1{ Id: "combined-fuchsia-lion", Name: orgName, + Slug: "combined-fuchsia-lion", }) + gock.New(utils.DefaultApiHost). + Post("/platform/organizations/onboarding-survey"). + MatchType("json"). + JSON(onboardingSurveyRequest{ + Slug: "combined-fuchsia-lion", + HeardFrom: "GitHub", + Building: "AI coding assistant", + }). + Reply(http.StatusNoContent) // Run test assert.NoError(t, Run(context.Background(), orgName)) // Validate api @@ -95,7 +102,7 @@ func TestOrganizationCreateCommand(t *testing.T) { gock.New(utils.DefaultApiHost). Post("/v1/organizations"). MatchType("json"). - JSON(createOrganizationRequest{Name: orgName}). + JSON(api.V1CreateAnOrganizationJSONRequestBody{Name: orgName}). Reply(http.StatusCreated). JSON(api.OrganizationResponseV1{ Id: "combined-fuchsia-lion", @@ -129,7 +136,7 @@ func TestOrganizationCreateCommand(t *testing.T) { gock.New(utils.DefaultApiHost). Post("/v1/organizations"). MatchType("json"). - JSON(createOrganizationRequest{Name: orgName}). + JSON(api.V1CreateAnOrganizationJSONRequestBody{Name: orgName}). Reply(http.StatusCreated). JSON(api.OrganizationResponseV1{ Id: "combined-fuchsia-lion", @@ -141,6 +148,47 @@ func TestOrganizationCreateCommand(t *testing.T) { assert.Empty(t, apitest.ListUnmatchedRequests()) }) + t.Run("does not fail organization creation when survey submit fails", func(t *testing.T) { + // Setup valid access token + token := apitest.RandomAccessToken(t) + t.Setenv("SUPABASE_ACCESS_TOKEN", string(token)) + t.Cleanup(fstest.MockStdin(t, "GitHub\nAI coding assistant\n")) + newConsole = func() *utils.Console { + console := utils.NewConsole() + console.IsTTY = true + return console + } + t.Cleanup(func() { + newConsole = utils.NewConsole + }) + // Flush pending mocks after test execution + defer gock.OffAll() + gock.New(utils.DefaultApiHost). + Post("/v1/organizations"). + MatchType("json"). + JSON(api.V1CreateAnOrganizationJSONRequestBody{Name: orgName}). + Reply(http.StatusCreated). + JSON(api.OrganizationResponseV1{ + Id: "combined-fuchsia-lion", + Name: orgName, + Slug: "combined-fuchsia-lion", + }) + gock.New(utils.DefaultApiHost). + Post("/platform/organizations/onboarding-survey"). + MatchType("json"). + JSON(onboardingSurveyRequest{ + Slug: "combined-fuchsia-lion", + HeardFrom: "GitHub", + Building: "AI coding assistant", + }). + Reply(http.StatusServiceUnavailable). + JSON(map[string]string{"message": "unavailable"}) + // Run test + assert.NoError(t, Run(context.Background(), orgName)) + // Validate api + assert.Empty(t, apitest.ListUnmatchedRequests()) + }) + t.Run("throws error on network error", func(t *testing.T) { // Setup valid access token token := apitest.RandomAccessToken(t) @@ -150,7 +198,7 @@ func TestOrganizationCreateCommand(t *testing.T) { gock.New(utils.DefaultApiHost). Post("/v1/organizations"). MatchType("json"). - JSON(createOrganizationRequest{Name: orgName}). + JSON(api.V1CreateAnOrganizationJSONRequestBody{Name: orgName}). ReplyError(errors.New("network error")) // Run test assert.Error(t, Run(context.Background(), orgName)) @@ -167,7 +215,7 @@ func TestOrganizationCreateCommand(t *testing.T) { gock.New(utils.DefaultApiHost). Post("/v1/organizations"). MatchType("json"). - JSON(createOrganizationRequest{Name: orgName}). + JSON(api.V1CreateAnOrganizationJSONRequestBody{Name: orgName}). Reply(http.StatusServiceUnavailable). JSON(map[string]string{"message": "unavailable"}) // Run test From 129f2554723912bb8f36aae9354984ffab747730 Mon Sep 17 00:00:00 2001 From: Danny White <3104761+dnywh@users.noreply.github.com> Date: Tue, 19 May 2026 14:56:51 +1000 Subject: [PATCH 4/6] fix(cli): ask org survey after creation --- apps/cli-go/internal/orgs/create/create.go | 40 +++++++++------------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/apps/cli-go/internal/orgs/create/create.go b/apps/cli-go/internal/orgs/create/create.go index 75af68fed7..82186c4aa6 100644 --- a/apps/cli-go/internal/orgs/create/create.go +++ b/apps/cli-go/internal/orgs/create/create.go @@ -15,12 +15,6 @@ import ( "github.com/supabase/cli/pkg/fetcher" ) -type createOrganizationInput struct { - Name string - HeardFrom string - Building string -} - type onboardingSurveyRequest struct { Slug string `json:"slug"` HeardFrom string `json:"heard_from,omitempty"` @@ -31,15 +25,11 @@ var newConsole = utils.NewConsole var submitSurvey = submitOnboardingSurvey func Run(ctx context.Context, name string) error { - input, err := buildCreateOrganizationInput(ctx, name) - if err != nil { - return err - } if utils.OutputFormat.Value == utils.OutputPretty { fmt.Fprintln(os.Stderr, "Creating organization...") } resp, err := utils.GetSupabase().V1CreateAnOrganizationWithResponse(ctx, api.V1CreateAnOrganizationJSONRequestBody{ - Name: input.Name, + Name: name, }) if err != nil { return errors.Errorf("failed to create organization: %w", err) @@ -47,30 +37,32 @@ func Run(ctx context.Context, name string) error { return errors.Errorf("unexpected create organization status %d: %s", resp.StatusCode(), string(resp.Body)) } - survey := onboardingSurveyRequest{ - Slug: organizationSlug(*resp.JSON201), - HeardFrom: input.HeardFrom, - Building: input.Building, - } - if err := submitSurvey(ctx, survey); err != nil && utils.OutputFormat.Value == utils.OutputPretty { - fmt.Fprintln(os.Stderr, "WARN: failed to submit organization survey:", err) - } - fmt.Println("Created organization:", resp.JSON201.Id) if utils.OutputFormat.Value == utils.OutputPretty { table := list.ToMarkdown([]api.OrganizationResponseV1{*resp.JSON201}) - return utils.RenderTable(table) + if err := utils.RenderTable(table); err != nil { + return err + } + survey, err := buildOnboardingSurveyRequest(ctx, organizationSlug(*resp.JSON201)) + if err != nil { + return err + } + if err := submitSurvey(ctx, survey); err != nil { + fmt.Fprintln(os.Stderr, "WARN: failed to submit organization survey:", err) + } + return nil } return utils.EncodeOutput(utils.OutputFormat.Value, os.Stdout, *resp.JSON201) } -func buildCreateOrganizationInput(ctx context.Context, name string) (createOrganizationInput, error) { - body := createOrganizationInput{Name: name} +func buildOnboardingSurveyRequest(ctx context.Context, slug string) (onboardingSurveyRequest, error) { + body := onboardingSurveyRequest{Slug: slug} console := newConsole() - if utils.OutputFormat.Value != utils.OutputPretty || !console.IsTTY { + if !console.IsTTY { return body, nil } + fmt.Fprintln(os.Stderr, "Optional: help us improve Supabase by answering two quick questions.") heardFrom, err := console.PromptText(ctx, "Where did you hear about us? (optional) ") if err != nil { return body, err From 76baceb4032a3df49436463589c80c923eacbfa7 Mon Sep 17 00:00:00 2001 From: Danny White <3104761+dnywh@users.noreply.github.com> Date: Tue, 19 May 2026 15:04:42 +1000 Subject: [PATCH 5/6] fix(cli): clarify org survey prompts --- apps/cli-go/internal/orgs/create/create.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/cli-go/internal/orgs/create/create.go b/apps/cli-go/internal/orgs/create/create.go index 82186c4aa6..18af14c5d0 100644 --- a/apps/cli-go/internal/orgs/create/create.go +++ b/apps/cli-go/internal/orgs/create/create.go @@ -62,14 +62,14 @@ func buildOnboardingSurveyRequest(ctx context.Context, slug string) (onboardingS return body, nil } - fmt.Fprintln(os.Stderr, "Optional: help us improve Supabase by answering two quick questions.") - heardFrom, err := console.PromptText(ctx, "Where did you hear about us? (optional) ") + fmt.Fprintln(os.Stderr, "Answer two optional questions so we can improve your Supabase experience. Press Enter to skip.") + heardFrom, err := console.PromptText(ctx, "1/2 Where did you hear about us? ") if err != nil { return body, err } body.HeardFrom = strings.TrimSpace(heardFrom) - building, err := console.PromptText(ctx, "What are you building? (optional) ") + building, err := console.PromptText(ctx, "2/2 What are you building? ") if err != nil { return body, err } From f216c163f66f97e392f46ca3467d456087dd543d Mon Sep 17 00:00:00 2001 From: Danny White <3104761+dnywh@users.noreply.github.com> Date: Tue, 19 May 2026 15:10:05 +1000 Subject: [PATCH 6/6] fix(cli): space org survey prompt intro --- apps/cli-go/internal/orgs/create/create.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/cli-go/internal/orgs/create/create.go b/apps/cli-go/internal/orgs/create/create.go index 18af14c5d0..46046bdfdf 100644 --- a/apps/cli-go/internal/orgs/create/create.go +++ b/apps/cli-go/internal/orgs/create/create.go @@ -62,14 +62,15 @@ func buildOnboardingSurveyRequest(ctx context.Context, slug string) (onboardingS return body, nil } - fmt.Fprintln(os.Stderr, "Answer two optional questions so we can improve your Supabase experience. Press Enter to skip.") - heardFrom, err := console.PromptText(ctx, "1/2 Where did you hear about us? ") + fmt.Fprintln(os.Stderr, "Answer two optional questions to help us improve Supabase. Press Enter to skip.") + fmt.Fprintln(os.Stderr) + heardFrom, err := console.PromptText(ctx, "1/2: Where did you hear about us? ") if err != nil { return body, err } body.HeardFrom = strings.TrimSpace(heardFrom) - building, err := console.PromptText(ctx, "2/2 What are you building? ") + building, err := console.PromptText(ctx, "2/2: What are you building? ") if err != nil { return body, err }