Skip to content
Merged
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
15 changes: 4 additions & 11 deletions apps/console/src/components/OnboardingWalkthrough.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
Star,
LayoutDashboard,
ArrowRight,
X,
} from 'lucide-react';

const STORAGE_KEY = 'objectui-onboarding-dismissed';
Expand Down Expand Up @@ -102,16 +101,10 @@ export function OnboardingWalkthrough() {
<Dialog open={open} onOpenChange={(v: any) => { if (!v) dismiss(); }}>
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onOpenChange is typed as (v: any) even though Radix Dialog passes a boolean. Now that dismissal relies on this callback, it would be better to type this parameter as boolean (and optionally update state from v) to keep type-safety and avoid masking mistakes.

Suggested change
<Dialog open={open} onOpenChange={(v: any) => { if (!v) dismiss(); }}>
<Dialog open={open} onOpenChange={(v: boolean) => { if (!v) dismiss(); }}>

Copilot uses AI. Check for mistakes.
<DialogContent className="sm:max-w-md">
<DialogHeader>
<div className="flex items-center justify-between">
<DialogTitle className="flex items-center gap-2">
<Rocket className="h-5 w-5 text-primary" />
Welcome to ObjectUI
</DialogTitle>
<Button variant="ghost" size="icon" className="h-6 w-6" onClick={dismiss}>
<X className="h-4 w-4" />
<span className="sr-only">Close</span>
</Button>
</div>
<DialogTitle className="flex items-center gap-2">
<Rocket className="h-5 w-5 text-primary" />
Welcome to ObjectUI
</DialogTitle>
Comment on lines +104 to +107
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change removes the custom close button, but there isn't a regression test ensuring the dialog renders only a single close control and that clicking the remaining built-in close button still calls dismiss() (persisting to localStorage). Consider adding a test that asserts a single Close-labeled button and verifies dismissal via that button.

Copilot uses AI. Check for mistakes.
<DialogDescription>
Let&apos;s get you started with a quick tour.
</DialogDescription>
Expand Down