Skip to content

fix(hub): count user projects toward workstation onboarding completion - #5099

Open
ptone wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
ptone:scion/7537-skip-onboarding-cli-projects
Open

ptone wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
ptone:scion/7537-skip-onboarding-cli-projects

Conversation

@ptone

@ptone ptone commented Nov 19, 2026

Copy link
Copy Markdown
Member

Treat a workstation with a user-created project (for example created from the CLI) as having completed onboarding, so the dashboard loads directly instead of redirecting to /onboarding; the built-in global project is excluded, and a fresh install still enters onboarding. Companion to the onboarding title fix (#5065). Part of ptone#7537.

Exclude the Hub's built-in global project (slug "global") when computing
OnboardingStatus.HasWorkspace, and mark OnboardingStatus.Complete true when
core workstation setup (Initialized, RuntimeOK, HarnessesSeeded) is ready
and either IdentitySet or HasWorkspace is true.

A workstation configured via the CLI (scion server start + scion init) now
loads the dashboard directly instead of redirecting to /onboarding, while
a fresh install with only the built-in global project still enters
/onboarding and completing the web wizard with workspace skipped stays
Complete.

Closes #7537
@google-cla

google-cla Bot commented Nov 19, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request refactors the onboarding status logic by introducing hasUserWorkspace to check for non-global user projects, and updates the onboarding completeness criteria to be satisfied when the core workstation setup is ready and either a web identity is configured or a user project already exists. It also adds comprehensive unit tests for these scenarios. The review feedback recommends logging database errors in hasUserWorkspace rather than silently swallowing them to improve observability.

Comment on lines +541 to +543
if err != nil || page == nil {
return false
}

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.

medium

Swallowing the database error from ListProjectSummaries without logging makes troubleshooting difficult if the database is locked or encounters other issues. Consider logging the error to improve observability.

	if err != nil {
		slog.Error("onboarding status: listing project summaries failed", "error", err)
		return false
	}
	if page == nil {
		return false
	}

This branch has not been deployed

No deployments
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.

1 participant