Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(studio): polish advisor attention indicator quirks (#47714)

Danny Whiteb82dec4ef1e9
diff --git a/apps/studio/components/interfaces/Sidebar.tsx b/apps/studio/components/interfaces/Sidebar.tsx
index 994bc0e0e8a..6f1d3af6a69 100644
--- a/apps/studio/components/interfaces/Sidebar.tsx
+++ b/apps/studio/components/interfaces/Sidebar.tsx
@@ -226,10 +226,21 @@ export function SideBarNavLink({
}
const ActiveDot = ({ hasErrors, hasWarnings }: { hasErrors: boolean; hasWarnings: boolean }) => {
+ const [sidebarBehaviour] = useLocalStorageQuery(
+ LOCAL_STORAGE_KEYS.SIDEBAR_BEHAVIOR,
+ DEFAULT_SIDEBAR_BEHAVIOR
+ )
+
+ // The nav icon only shifts right (pl-1.5 -> pl-2) when the sidebar is
+ // persistently open — not on hover-expand. Tie the dot to the same
+ // condition so it stays put while skimming the nav.
+ const isPersistentlyOpen = sidebarBehaviour === 'open'
+
return (
<div
className={cn(
- 'absolute pointer-events-none flex h-2 w-2 left-[18px] group-data-[state=expanded]:left-[20px] top-2 z-10 rounded-full',
+ 'absolute pointer-events-none flex h-2 w-2 top-2 z-10 rounded-full',
+ isPersistentlyOpen ? 'left-[20px]' : 'left-[18px]',
hasErrors ? 'bg-destructive-600' : hasWarnings ? 'bg-warning-600' : 'bg-transparent'
)}
/>
diff --git a/apps/studio/components/layouts/AppLayout/AdvisorButton.tsx b/apps/studio/components/layouts/AppLayout/AdvisorButton.tsx
index efc5c3ae2a7..5006cd40349 100644
--- a/apps/studio/components/layouts/AppLayout/AdvisorButton.tsx
+++ b/apps/studio/components/layouts/AppLayout/AdvisorButton.tsx
@@ -51,7 +51,11 @@ export const AdvisorButton = ({ projectRef }: { projectRef?: string }) => {
id="advisor-center-trigger"
className={cn(
'rounded-full w-[32px] h-[32px] flex items-center justify-center p-0 group',
- hasCriticalIssues && 'bg-destructive-200 border-destructive-500',
+ // Critical fill/border only when idle — selected matches the other
+ // header circles (foreground fill, no destructive outline).
+ hasCriticalIssues &&
+ !isOpen &&
+ 'bg-destructive-200 border-destructive-500 hover:border-destructive',
isOpen && 'bg-foreground text-background'
)}
onClick={handleClick}
@@ -72,7 +76,13 @@ export const AdvisorButton = ({ projectRef }: { projectRef?: string }) => {
<span className="sr-only">Advisor Center</span>
</ButtonTooltip>
{hasCriticalIssues ? (
- <span className="absolute top-1.5 right-1.5 w-1.5 h-1.5 rounded-full bg-destructive" />
+ <span
+ className={cn(
+ 'absolute top-1.5 right-1.5 w-1.5 h-1.5 rounded-full',
+ // Slightly lighter on the inverted selected fill in light mode only.
+ isOpen ? 'bg-destructive-500 dark:bg-destructive' : 'bg-destructive'
+ )}
+ />
) : hasWarningIssues ? (
<span className="absolute top-1.5 right-1.5 w-1.5 h-1.5 rounded-full bg-warning" />
) : hasUnreadNotifications ? (