Skip to content

feat(platform-app): add app onboard and explain accounts that haven't finished developer setup - #343

Open
jpage-godaddy wants to merge 4 commits into
mainfrom
not-onboarded-fix
Open

jpage-godaddy wants to merge 4 commits into
mainfrom
not-onboarded-fix

Conversation

@jpage-godaddy

@jpage-godaddy jpage-godaddy commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

An account that has never accepted the GoDaddy Developer agreements gets this from gddy platform app list (and any other application command):

Error: GraphQL errors: applications:2:3: No organization found. Complete onboarding first.
Fix: Check GraphQL query, variables, and operationName. …

The message doesn't say what "onboarding" is, and the fix is about GraphQL syntax. Today the only way to finish setup is platform app init, which needs five unrelated flags before it reaches the agreement prompt.

Changes

  • New gddy platform app onboard. Shows the Terms of Use, Privacy Policy and Developer Agreement and completes developer setup on Enter. Does nothing if the account is already set up (it reports alreadyOnboarded: true). --accept-agreements accepts without a prompt, in a terminal or not. --dry-run checks the account's status and reports what would happen without submitting anything. The help text has a separate AI assistants: note that the user must accept the agreements themselves.
  • Clearer error for unonboarded accounts. The missing-organization failure is now ONBOARDING_REQUIRED, with the message "Your GoDaddy account hasn't finished developer setup yet" and a fix of gddy platform app onboard. It applies to every application command, not just list.
  • Clearer error when an environment has no onboarding URL. This was a bare ERROR with no fix. It is now CONFIG_ERROR, names the environment, and tells the user which variable to set (e.g. TEST_DEVX_CORE_URL).

Notes

  • --accept-agreements now skips the agreement prompt in a terminal as well, for every command that offers it (app onboard, app init, app add native-extension). Before, it only took effect when stdin was not a terminal.
  • The service reports a missing organization only as a generic ValidationError, so the new error is recognized by the message text ("Complete onboarding first"). If the service rewords it, the old generic error comes back. A dedicated error code from the service would make this robust.
  • Calling the status check creates a pending organization for an account that has none, which is what makes onboard work for brand-new accounts. --dry-run therefore isn't completely free of server-side effects for such an account.

Tests

  • Unit tests for the new error code and fix, the dry-run preview (pending, active, and a status that can't be onboarded), the missing-URL error, and the command's mutating / dry-run / AI-note settings.
  • A client test that mocks the real "No organization found" response and checks it maps to ONBOARDING_REQUIRED with the app onboard fix.

🤖 Generated with Claude Code

…'t finished developer setup

Accounts that never accepted the GoDaddy Developer agreements got a raw
"GraphQL errors: … No organization found. Complete onboarding first." from
`gddy platform app list` (and every other application command), with a fix
about GraphQL query syntax.

- Add `gddy platform app onboard`, which shows the agreements and completes
  developer setup. It does nothing when the account is already set up,
  accepts `--accept-agreements` for scripts, and supports `--dry-run`.
- Report the missing-organization failure as `ONBOARDING_REQUIRED` with a fix
  that points at `gddy platform app onboard`.
- Report an environment without an onboarding URL as a `CONFIG_ERROR` that
  names the variable to set, instead of a bare `ERROR`.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A new assertion necessarily fails, explicit agreement acceptance still prompts in terminals, and a follow-up lacks required parameter metadata.

3 open issues
What changed in this PR

Adds standalone developer account setup to the application CLI and clearer guidance for accounts that have not completed onboarding.

Changes:

  • Adds platform app onboard with agreement acceptance and dry-run previews.
  • Introduces actionable onboarding and missing-configuration errors.
  • Adds tests for setup states, command settings, and error mapping.
File Description
rust/​src/​platform/​app/​onboarding/​mod.rs Exports onboarding preview helpers.
rust/​src/​platform/​app/​onboarding/​ensure.rs Adds previews, completion tracking, and configuration errors.
rust/​src/​platform/​app/​commands/​schemas.rs Defines onboarding output fields.
rust/​src/​platform/​app/​commands/​onboard.rs Implements the standalone setup command.
rust/​src/​platform/​app/​commands/​mod.rs Registers onboarding and updates group help.
rust/​src/​platform/​app/​client.rs Maps missing-organization errors to onboarding guidance.
rust/​src/​platform/​app/​client_tests.rs Tests missing-organization error mapping.
rust/​src/​error.rs Adds the onboarding error code, fix, and test.

Review effort: Balanced

Comment thread rust/src/error.rs Outdated
Comment thread rust/src/platform/app/commands/onboard.rs Outdated
Comment thread rust/src/platform/app/commands/onboard.rs
…ely and give its follow-up parameters

- Say that `--accept-agreements` skips the prompt only when not running in a
  terminal; in a terminal the agreements are always shown for confirmation.
- Mark every placeholder in the suggested `platform app init` follow-up as a
  required parameter.
- Apply rustfmt to the onboarding fix text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The dry-run preview can create server-side organization state for new accounts rather than remaining read-only.

1 open issue
3 resolved since last review

Review effort: Balanced

Comment thread rust/src/platform/app/onboarding/ensure.rs
Say that a dry run only reports whether the account is set up and accepts no
agreement, and that checking may start the account's setup record.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review found no unresolved blocking issues; the changes reuse the existing consent flow and include targeted regression coverage.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

…pt in a terminal too

Passing `--accept-agreements` is the explicit acceptance, so it now replaces
the prompt everywhere it is offered (`app onboard`, `app init` and
`app add native-extension`). Previously it only took effect when stdin was not
a terminal; in a terminal the agreements were still shown and Enter was
required.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Shared agreement-acceptance changes affect multiple commands and warrant human runtime validation before approval.

No open issues 🎉

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants