Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,12 @@ export function CliInstallStep({ onNext, onBack }: CliInstallStepProps) {
</Button>
{allReady ? (
<Button size="3" onClick={onNext}>
Continue
Get started
<ArrowRight size={16} weight="bold" />
</Button>
) : (
<Button size="3" variant="outline" color="gray" onClick={onNext}>
Skip for now
Skip & get started
<ArrowRight size={16} weight="bold" />
</Button>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ import { AnimatePresence, LayoutGroup, motion } from "framer-motion";
import { useHotkeys } from "react-hotkeys-hook";

import { useOnboardingFlow } from "../hooks/useOnboardingFlow";
import { usePrefetchSignalData } from "../hooks/usePrefetchSignalData";
import { CliInstallStep } from "./CliInstallStep";
import { GitIntegrationStep } from "./GitIntegrationStep";
import { InviteCodeStep } from "./InviteCodeStep";
import { ProjectSelectStep } from "./ProjectSelectStep";
import { SignalsStep } from "./SignalsStep";
import { StepIndicator } from "./StepIndicator";
import { WelcomeScreen } from "./WelcomeScreen";

Expand Down Expand Up @@ -53,7 +51,6 @@ export function OnboardingFlow() {
const isAuthenticated = useAuthStateValue(
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.

P2 Lost prefetch for GitHub integration step

usePrefetchSignalData was also eagerly prefetching ["integrations", projectId], ["integrations", "list"], and the nested GitHub repositories — data consumed by the still-present GitIntegrationStep. Removing the hook means those queries will now be fetched on-demand when the user arrives at the GitHub step, adding a visible loading delay that didn't exist before. Consider either keeping the integrations-only prefetch (renaming the hook to reflect its scope) or adding an equivalent prefetch inside GitIntegrationStep itself.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx
Line: 46

Comment:
**Lost prefetch for GitHub integration step**

`usePrefetchSignalData` was also eagerly prefetching `["integrations", projectId]`, `["integrations", "list"]`, and the nested GitHub repositories — data consumed by the still-present `GitIntegrationStep`. Removing the hook means those queries will now be fetched on-demand when the user arrives at the GitHub step, adding a visible loading delay that didn't exist before. Consider either keeping the integrations-only prefetch (renaming the hook to reflect its scope) or adding an equivalent prefetch inside `GitIntegrationStep` itself.

How can I resolve this? If you propose a fix, please make it concise.

(state) => state.status === "authenticated",
);
usePrefetchSignalData();

useHotkeys("right", next, { enableOnFormTags: false }, [next]);
useHotkeys("left", back, { enableOnFormTags: false }, [back]);
Expand Down Expand Up @@ -185,22 +182,7 @@ export function OnboardingFlow() {
transition={{ duration: 0.3 }}
className="min-h-0 w-full flex-1"
>
<CliInstallStep onNext={next} onBack={back} />
</motion.div>
)}

{currentStep === "signals" && (
<motion.div
key="signals"
custom={direction}
initial="enter"
animate="center"
exit="exit"
variants={stepVariants}
transition={{ duration: 0.3 }}
className="min-h-0 w-full flex-1"
>
<SignalsStep onNext={handleComplete} onBack={back} />
<CliInstallStep onNext={handleComplete} onBack={back} />
</motion.div>
)}
</AnimatePresence>
Expand Down
158 changes: 0 additions & 158 deletions apps/code/src/renderer/features/onboarding/components/SignalsStep.tsx

This file was deleted.

This file was deleted.

4 changes: 1 addition & 3 deletions apps/code/src/renderer/features/onboarding/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ export type OnboardingStep =
| "project-select"
| "invite-code"
| "github"
| "install-cli"
| "signals";
| "install-cli";

export const ONBOARDING_STEPS: OnboardingStep[] = [
"welcome",
"project-select",
"invite-code",
"github",
"install-cli",
"signals",
];
Loading