Repository navigation
Conversation
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
|
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. |
There was a problem hiding this comment.
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.
| if err != nil || page == nil { | ||
| return false | ||
| } |
There was a problem hiding this comment.
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
}
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.