[eric] frontend: bring back the empty-state shimmer as a transform-only sheen, composited instead of repainting 60fps

This commit is contained in:
ciregenz
2026-06-09 16:00:03 -07:00
parent 1fd32b7bc3
commit cd1db491b2
@@ -26,6 +26,8 @@ const DashboardEmptyState: React.FC<{ c: ClaudeTokens }> = ({ c }) => (
alignItems: 'center',
gap: 0.7,
color: c.text.primary,
position: 'relative',
overflow: 'hidden',
}}
>
Click the
@@ -33,6 +35,22 @@ const DashboardEmptyState: React.FC<{ c: ClaudeTokens }> = ({ c }) => (
<ChatBubbleTeardrop sx={{ fontSize: 15 }} />
</Box>
below to launch your first agent
{/* Sheen sweeps via transform only: the layer rasters once and the GPU slides it, unlike the old background-position shimmer that repainted every frame. */}
<Box
component="span"
aria-hidden
sx={{
position: 'absolute',
inset: 0,
pointerEvents: 'none',
background: 'linear-gradient(105deg, transparent 42%, rgba(255,255,255,0.14) 50%, transparent 58%)',
transform: 'translateX(-100%)',
animation: 'empty-state-sheen 6s linear infinite',
willChange: 'transform',
'@keyframes empty-state-sheen': { to: { transform: 'translateX(100%)' } },
'@media (prefers-reduced-motion: reduce)': { animation: 'none' },
}}
/>
</Typography>
</Box>
);