Skip to content

Commit 804a1ea

Browse files
drfarrellclaude
andcommitted
fix: use reload icon and add toast notification for sandbox restart
- Changed icon from Rotate to Reload to match webframe styling - Added toast notification with cube icon on successful restart - Show error toast if restart fails 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 34bfd35 commit 804a1ea

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

apps/web/client/src/app/project/[id]/_components/bottom-bar/terminal-area.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useEditorEngine } from '@/components/store/editor';
22
import { Icons } from '@onlook/ui/icons';
3+
import { toast } from '@onlook/ui/sonner';
34
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@onlook/ui/tabs';
45
import { Tooltip, TooltipContent, TooltipTrigger } from '@onlook/ui/tooltip';
56
import { cn } from '@onlook/ui/utils';
@@ -61,7 +62,14 @@ export const TerminalArea = observer(({ children }: { children: React.ReactNode
6162
if (activeBranch) {
6263
const sandbox = branches.getSandboxById(activeBranch.id);
6364
if (sandbox?.session) {
64-
await sandbox.session.restartDevServer();
65+
const success = await sandbox.session.restartDevServer();
66+
if (success) {
67+
toast.success('Sandbox restarted successfully', {
68+
icon: <Icons.Cube className="h-4 w-4" />,
69+
});
70+
} else {
71+
toast.error('Failed to restart sandbox');
72+
}
6573
}
6674
}
6775
}}
@@ -73,7 +81,7 @@ export const TerminalArea = observer(({ children }: { children: React.ReactNode
7381
: "text-foreground-disabled cursor-not-allowed opacity-50"
7482
)}
7583
>
76-
<Icons.Rotate className="h-4 w-4" />
84+
<Icons.Reload className="h-4 w-4" />
7785
</button>
7886
</TooltipTrigger>
7987
<TooltipContent sideOffset={5} hideArrow>Restart Sandbox</TooltipContent>
@@ -126,7 +134,7 @@ export const TerminalArea = observer(({ children }: { children: React.ReactNode
126134
: "text-foreground-disabled cursor-not-allowed opacity-50"
127135
)}
128136
>
129-
<Icons.Rotate className="h-4 w-4" />
137+
<Icons.Reload className="h-4 w-4" />
130138
</button>
131139
</TooltipTrigger>
132140
<TooltipContent sideOffset={5} hideArrow>Restart Sandbox</TooltipContent>

0 commit comments

Comments
 (0)