YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(ui): stop skeleton flicker with reduced motion (#7044)
Ezra Ellette72e4ae013856
diff --git a/apps/screenpipe-app-tauri/app/globals.css b/apps/screenpipe-app-tauri/app/globals.cssindex a68922a18..3cfdf4c5c 100644--- a/apps/screenpipe-app-tauri/app/globals.css+++ b/apps/screenpipe-app-tauri/app/globals.css@@ -1149,9 +1149,8 @@Durations collapse to 0.01ms rather than `animation: none`, deliberately:`none` never fires `animationend`/`transitionend`, so anything awaitingthose events to advance a state machine would hang instead of finishing- instantly. Iteration count is left alone for the same reason — an- infinite liveness indicator keeps ticking, just imperceptibly, rather- than freezing on a frame and reading as "stuck".+ instantly. Cap animations at one iteration so infinite indicators settle+ instead of flickering through a new cycle every 0.01ms.Components needing a *meaningful* static fallback (a recording dot thatmust still look live) keep their own rule; those still win on the@@ -1161,6 +1160,7 @@*::before,*::after {animation-duration: 0.01ms !important;+ animation-iteration-count: 1 !important;transition-duration: 0.01ms !important;animation-delay: 0ms !important;transition-delay: 0ms !important;diff --git a/apps/screenpipe-app-tauri/components/__tests__/reduced-motion.test.ts b/apps/screenpipe-app-tauri/components/__tests__/reduced-motion.test.tsindex 05e0235df..26f7e3af3 100644--- a/apps/screenpipe-app-tauri/components/__tests__/reduced-motion.test.ts+++ b/apps/screenpipe-app-tauri/components/__tests__/reduced-motion.test.ts@@ -72,15 +72,19 @@ describe("reduced motion", () => {expect(declarations.has("transition")).toBe(false);});- it("leaves iteration count alone so liveness indicators do not freeze", () => {- // A recording/loading indicator that stops on a frame reads as "stuck".- // Capping iterations to 1 would do exactly that, so the net must not.- const declarations = declarationsIn(universalBlock()!);- expect(declarations.has("animation-iteration-count")).toBe(false);+ it("caps iterations so shortened infinite animations cannot flicker", () => {+ // Keeping infinite repetition at 0.01ms turns reduced motion into flicker.+ // One iteration still fires animationend for components awaiting completion.+ const block = universalBlock()!;+ const declarations = declarationsIn(block);+ expect(declarations.get("animation-iteration-count")).toBe("1");+ block.walkDecls("animation-iteration-count", (declaration) => {+ expect(declaration.important).toBe(true);+ });});it("keeps the per-component rules that supply meaningful static fallbacks", () => {- // The global net only shortens time. A component that needs to still *look*+ // A component that needs to still *look*// live when frozen (the meeting listening stick collapses to scaleY(0.6))// carries its own rule, and those must survive.const selectors = reducedMotionBlocks().flatMap((block) => {diff --git a/apps/screenpipe-app-tauri/components/ui/skeleton.tsx b/apps/screenpipe-app-tauri/components/ui/skeleton.tsxindex 01b8b6d4f..514a90619 100644--- a/apps/screenpipe-app-tauri/components/ui/skeleton.tsx+++ b/apps/screenpipe-app-tauri/components/ui/skeleton.tsx@@ -1,3 +1,6 @@+// screenpipe — AI that knows everything you've seen, said, or heard+// https://screenpipe.com+import { cn } from "@/lib/utils"function Skeleton({@@ -6,7 +9,7 @@ function Skeleton({}: React.HTMLAttributes<HTMLDivElement>) {return (<div- className={cn("animate-pulse rounded-md bg-muted", className)}+ className={cn("motion-safe:animate-pulse rounded-md bg-muted", className)}{...props}/>)