-
Notifications
You must be signed in to change notification settings - Fork 990
feat(desktop): v2 onboarding setup flow #4080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e2b4dcb
feat(desktop): v2 onboarding setup flow
AviPeltz 626456e
Merge branch 'main' of github.com:superset-sh/superset into v2-onboar…
AviPeltz e1a7b23
feat(desktop): add posthog events for v2 onboarding flow
AviPeltz 81cba90
fix(desktop): address bot review on v2 onboarding setup flow
AviPeltz 6902e4c
fix(desktop): route v2 setup completion to project page, not branch w…
AviPeltz 1825686
fix(desktop): keep manualWalkthrough false on onboarding reset
AviPeltz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
606 changes: 606 additions & 0 deletions
606
apps/desktop/plans/done/20260504-1200-v2-onboarding-flow.md
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| import { execFile } from "node:child_process"; | ||
| import { promisify } from "node:util"; | ||
| import { publicProcedure, router } from ".."; | ||
|
|
||
| const execFileAsync = promisify(execFile); | ||
|
|
||
| const KNOWN_GH_PATHS = [ | ||
| "/opt/homebrew/bin/gh", | ||
| "/usr/local/bin/gh", | ||
| "/usr/bin/gh", | ||
| "/bin/gh", | ||
| ]; | ||
|
|
||
| interface GhDetectResult { | ||
| installed: boolean; | ||
| version: string | null; | ||
| path: string | null; | ||
| } | ||
|
|
||
| async function tryGh(path: string): Promise<GhDetectResult | null> { | ||
| try { | ||
| const { stdout } = await execFileAsync(path, ["--version"], { | ||
| timeout: 3000, | ||
| }); | ||
| const firstLine = stdout.split("\n")[0]?.trim() ?? ""; | ||
| const match = firstLine.match(/gh version (\S+)/); | ||
| const version = match?.[1] ?? null; | ||
| return { installed: true, version, path }; | ||
| } catch { | ||
| return null; | ||
| } | ||
| } | ||
|
|
||
| async function detectGhCli(): Promise<GhDetectResult> { | ||
| for (const path of KNOWN_GH_PATHS) { | ||
| const result = await tryGh(path); | ||
| if (result) return result; | ||
| } | ||
| const result = await tryGh("gh"); | ||
| if (result) return result; | ||
| return { installed: false, version: null, path: null }; | ||
| } | ||
|
|
||
| export const createSystemRouter = () => { | ||
| return router({ | ||
| detectGhCli: publicProcedure.query(detectGhCli), | ||
| }); | ||
| }; | ||
|
|
||
| export type SystemRouter = ReturnType<typeof createSystemRouter>; |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
manualWalkthrough: truebehaviorThe description promises "Steps you've already satisfied — such as sign-in, providers, and projects — will auto-advance," but
reset()setsmanualWalkthrough: true, which explicitly disables auto-advance in every step'sshouldAutoAdvanceguard. After clicking "Restart," users will have to manually click through every step even when providers are already connected and projects already exist — the opposite of what the dialog says.Prompt To Fix With AI