Skip to content

Commit 2f85d0b

Browse files
perf(web): the first-run gate compiles with the React Compiler
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a702563 commit 2f85d0b

1 file changed

Lines changed: 9 additions & 13 deletions

File tree

‎apps/web/src/components/onboarding/FirstRunGate.tsx‎

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -136,24 +136,20 @@ export function FirstRunGate({
136136
threadCount: threads.length,
137137
});
138138

139+
if (decision !== "wizard" && hydrated) {
140+
const transitioned = transitionFirstRunGateState(gateState, {
141+
type: "evidence",
142+
decision: nextDecision,
143+
});
144+
if (transitioned !== gateState) setGateState(transitioned);
145+
}
146+
139147
useEffect(() => {
140148
if (decision === "wizard" || !hydrated) return;
141-
142149
if (persistCompletion && onboardingCompletedAt === null) {
143150
void completeOnboarding().catch(() => undefined);
144151
}
145-
146-
setGateState((state) =>
147-
transitionFirstRunGateState(state, { type: "evidence", decision: nextDecision }),
148-
);
149-
}, [
150-
completeOnboarding,
151-
decision,
152-
hydrated,
153-
nextDecision,
154-
onboardingCompletedAt,
155-
persistCompletion,
156-
]);
152+
}, [completeOnboarding, decision, hydrated, onboardingCompletedAt, persistCompletion]);
157153

158154
useEffect(() => {
159155
if (!enabled || decision !== "pending" || !hydrated) return;

0 commit comments

Comments
 (0)