Skip to content

Commit f7a8243

Browse files
authored
feat(claw): add cycling fun messages to provisioning spinner (#1393)
## Summary Add Sims/RCT-style fun loading messages to the KiloClaw provisioning step that fade-cycle every 3.5s while users wait for their instance to spin up. The messages array is placeholder text meant to be swapped out later. The cycling message is rendered as its own block (separate from the heading/subtitle) so the parent's `gap-8` spacing keeps all sections visually distinct. ## Verification - [x] `pnpm typecheck` — passes - [x] `pnpm format` — passes (auto-fixed one arrow-fn parens difference) - [x] Lint + format pre-push hook — passes - [x] Storybook visual check — confirmed fade cycling and spacing ## Visual Changes https://github.com/user-attachments/assets/f7020eb8-2dae-4b4e-8a9f-58758324899c ## Reviewer Notes The `PROVISIONING_MESSAGES` strings are intentional placeholders — they'll be replaced with final copy in a follow-up.
2 parents ccb149f + 0629713 commit f7a8243

1 file changed

Lines changed: 37 additions & 1 deletion

File tree

src/app/(app)/claw/components/ProvisioningStep.tsx

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import { useEffect, useRef } from 'react';
3+
import { useEffect, useRef, useState } from 'react';
44
import { Volume2 } from 'lucide-react';
55
import { toast } from 'sonner';
66
import { Button } from '@/components/ui/button';
@@ -113,8 +113,36 @@ export function ProvisioningStep({
113113
return <ProvisioningStepView />;
114114
}
115115

116+
const PROVISIONING_MESSAGES = [
117+
'Reticulating splines...',
118+
'Warming up the flux capacitor...',
119+
'Convincing the hamsters to run faster...',
120+
'Downloading more RAM...',
121+
'Generating witty loading messages...',
122+
'Consulting the magic 8-ball...',
123+
'Untangling the internet tubes...',
124+
'Feeding the code monkeys...',
125+
'Aligning the bits...',
126+
'Compiling the compilers...',
127+
'Herding the electrons...',
128+
'Calibrating the cloud...',
129+
];
130+
116131
/** Pure visual shell — extracted so Storybook can render it without wiring up mutations. */
117132
export function ProvisioningStepView() {
133+
const [messageIndex, setMessageIndex] = useState(0);
134+
const [visible, setVisible] = useState(true);
135+
136+
useEffect(() => {
137+
const interval = setInterval(() => {
138+
setVisible(false);
139+
setTimeout(() => {
140+
setMessageIndex(i => (i + 1) % PROVISIONING_MESSAGES.length);
141+
setVisible(true);
142+
}, 300);
143+
}, 3500);
144+
return () => clearInterval(interval);
145+
}, []);
118146
return (
119147
<OnboardingStepView
120148
currentStep={4}
@@ -169,6 +197,14 @@ export function ProvisioningStepView() {
169197
</p>
170198
</div>
171199

200+
{/* Cycling fun message */}
201+
<p
202+
className="text-muted-foreground h-5 text-sm italic transition-opacity duration-300"
203+
style={{ opacity: visible ? 1 : 0 }}
204+
>
205+
{PROVISIONING_MESSAGES[messageIndex]}
206+
</p>
207+
172208
{/* Sound banner */}
173209
<div className="border-border flex w-full items-center gap-3 rounded-lg border p-4">
174210
<Volume2 className="text-muted-foreground h-5 w-5 shrink-0" />

0 commit comments

Comments
 (0)