The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(ui): remove shimmer animation from reasoning panel
Steven Enamakela7441c236797
diff --git a/app/src/__tests__/shimmerUtility.test.ts b/app/src/__tests__/shimmerUtility.test.tsindex ac06d24ad4..d003674240 100644--- a/app/src/__tests__/shimmerUtility.test.ts+++ b/app/src/__tests__/shimmerUtility.test.ts@@ -21,9 +21,7 @@ describe('tw-shimmer', () => {});it('is a declared dependency that provides the `shimmer` utility', () => {- const pkg = JSON.parse(read('package.json')) as {- dependencies?: Record<string, string>;- };+ const pkg = JSON.parse(read('package.json')) as { dependencies?: Record<string, string> };expect(pkg.dependencies?.['tw-shimmer']).toBeTruthy();expect(read('node_modules/tw-shimmer/src/index.css')).toMatch(/@utility shimmer \{/);});diff --git a/app/src/components/assistant-ui/elements/reasoning-panel.tsx b/app/src/components/assistant-ui/elements/reasoning-panel.tsxindex 345acf0562..9ea75c7d7d 100644--- a/app/src/components/assistant-ui/elements/reasoning-panel.tsx+++ b/app/src/components/assistant-ui/elements/reasoning-panel.tsx@@ -18,13 +18,13 @@* - A streaming list stays pinned to its newest step inside a bounded* scroll region (the runtime element's `ReasoningText` behaviour).*/+import { cn } from '@/components/assistant-ui/lib/utils';import { MarkdownText } from '@/components/assistant-ui/markdown-text';import {Collapsible,CollapsibleContent,CollapsibleTrigger,} from '@/components/assistant-ui/ui/collapsible';-import { cn } from '@/components/assistant-ui/lib/utils';import { TextMessagePartProvider } from '@assistant-ui/react';import { ChevronDownIcon } from 'lucide-react';import { useCallback, useEffect, useRef, useState } from 'react';diff --git a/app/src/components/assistant-ui/elements/surfaces.tsx b/app/src/components/assistant-ui/elements/surfaces.tsxindex d108bc9f99..9a8f8319e9 100644--- a/app/src/components/assistant-ui/elements/surfaces.tsx+++ b/app/src/components/assistant-ui/elements/surfaces.tsx@@ -1,4 +1,4 @@-"use client";+'use client';/*** Shared surface primitives for the assistant-ui elements, vendored verbatim@@ -6,62 +6,58 @@* (https://r.assistant-ui.com/elements-surfaces.json). The one local change is* `collapsePanel`, adapted from Base UI to Radix (see below).*/-import { type ComponentProps, useLayoutEffect, useRef, useState } from "react";-import { cn } from "@/components/assistant-ui/lib/utils";+import { cn } from '@/components/assistant-ui/lib/utils';+import { type ComponentProps, useLayoutEffect, useRef, useState } from 'react';-export const paper = "bg-background border border-border/60 dark:bg-popover";+export const paper = 'bg-background border border-border/60 dark:bg-popover';-export const floating = "bg-background border border-border/60 dark:bg-popover";+export const floating = 'bg-background border border-border/60 dark:bg-popover';-export const field = "bg-foreground/[0.04] dark:bg-foreground/[0.06]";+export const field = 'bg-foreground/[0.04] dark:bg-foreground/[0.06]';export const fieldInteractive =- "bg-foreground/[0.04] transition-colors hover:bg-foreground/[0.07] dark:bg-foreground/[0.06] dark:hover:bg-foreground/[0.09]";+ 'bg-foreground/[0.04] transition-colors hover:bg-foreground/[0.07] dark:bg-foreground/[0.06] dark:hover:bg-foreground/[0.09]';export const pressable =- "transition-transform duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.96] motion-reduce:transition-none";+ 'transition-transform duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.96] motion-reduce:transition-none';export const ghostButton =- "flex items-center justify-center rounded-full text-foreground/45 outline-none transition-[background-color,color,scale] duration-150 hover:bg-foreground/[0.06] hover:text-foreground/90 active:scale-[0.96] focus-visible:ring-1 focus-visible:ring-foreground/20 motion-reduce:transition-none dark:hover:bg-foreground/[0.09]";+ 'flex items-center justify-center rounded-full text-foreground/45 outline-none transition-[background-color,color,scale] duration-150 hover:bg-foreground/[0.06] hover:text-foreground/90 active:scale-[0.96] focus-visible:ring-1 focus-visible:ring-foreground/20 motion-reduce:transition-none dark:hover:bg-foreground/[0.09]';export const inkButton =- "bg-foreground text-background transition-[opacity,scale] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] hover:opacity-90 active:scale-[0.96] motion-reduce:transition-none";+ 'bg-foreground text-background transition-[opacity,scale] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] hover:opacity-90 active:scale-[0.96] motion-reduce:transition-none';export const iconSwap =- "[grid-area:1/1] transition-[opacity,scale,filter] duration-200 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none";+ '[grid-area:1/1] transition-[opacity,scale,filter] duration-200 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none';-export const iconSwapIn = "scale-100 opacity-100 blur-none";+export const iconSwapIn = 'scale-100 opacity-100 blur-none';-export const iconSwapOut = "scale-[0.25] opacity-0 blur-[4px]";+export const iconSwapOut = 'scale-[0.25] opacity-0 blur-[4px]';export const labelSwap =- "col-start-1 row-start-1 flex w-max items-center gap-1.5 leading-none transition-[opacity,filter] duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none";+ 'col-start-1 row-start-1 flex w-max items-center gap-1.5 leading-none transition-[opacity,filter] duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none';-export const labelSwapIn = "opacity-100 blur-none";+export const labelSwapIn = 'opacity-100 blur-none';-export const labelSwapOut =- "pointer-events-none select-none opacity-0 blur-[2px]";+export const labelSwapOut = 'pointer-events-none select-none opacity-0 blur-[2px]';// Local adaptation: upstream animates Base UI's `--collapsible-panel-height`;// this app's `ui/collapsible` is Radix, whose content exposes// `--radix-collapsible-content-height` to tw-animate-css's collapsible keyframes.export const collapsePanel =- "overflow-hidden ease-[cubic-bezier(0.32,0.72,0,1)] data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down motion-reduce:animate-none";+ 'overflow-hidden ease-[cubic-bezier(0.32,0.72,0,1)] data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down motion-reduce:animate-none';-export const live = "text-blue-500 dark:text-blue-400";+export const live = 'text-blue-500 dark:text-blue-400';-export const mono = "font-mono text-[11px] tracking-tight";+export const mono = 'font-mono text-[11px] tracking-tight';export function ShimmerLabel({active = true,className,...props-}: ComponentProps<"span"> & { active?: boolean }) {+}: ComponentProps<'span'> & { active?: boolean }) {return (- <span- className={cn(active && "shimmer motion-reduce:animate-none", className)}- {...props}- />+ <span className={cn(active && 'shimmer motion-reduce:animate-none', className)} {...props} />);}@@ -75,9 +71,9 @@ export function ShimmerLabel({* container's visible width rather than its scroll width, so a per-row width* leaves every row except the longest ending its background at the fold.*/-export const codeScroll = "overflow-x-auto";+export const codeScroll = 'overflow-x-auto';-export const codeSurface = "w-max min-w-full";+export const codeSurface = 'w-max min-w-full';export function SwapLabel({active,@@ -94,8 +90,7 @@ export function SwapLabel({useLayoutEffect(() => {const target = layers[active]?.current;if (!target) return undefined;- const measure = () =>- setWidth(Math.ceil(target.getBoundingClientRect().width));+ const measure = () => setWidth(Math.ceil(target.getBoundingClientRect().width));measure();const observer = new ResizeObserver(measure);observer.observe(target);@@ -106,20 +101,15 @@ export function SwapLabel({<spanstyle={width === null ? undefined : { width }}className={cn(- "grid overflow-x-clip transition-[width] duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none",- className,- )}- >+ 'grid overflow-x-clip transition-[width] duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none',+ className+ )}>{children.map((layer, index) => (<spankey={index}ref={layers[index]}aria-hidden={active !== index}- className={cn(- labelSwap,- active === index ? labelSwapIn : labelSwapOut,- )}- >+ className={cn(labelSwap, active === index ? labelSwapIn : labelSwapOut)}>{layer}</span>))}diff --git a/app/src/components/assistant-ui/thread.reasoning.test.tsx b/app/src/components/assistant-ui/thread.reasoning.test.tsxindex 95ea5a6e3d..603d854ef6 100644--- a/app/src/components/assistant-ui/thread.reasoning.test.tsx+++ b/app/src/components/assistant-ui/thread.reasoning.test.tsx@@ -59,7 +59,9 @@ describe('thread reasoning panel', () => {expect(panels).toHaveLength(1);const panel = panels[0]!;expect(panel.getAttribute('data-variant')).toBe('collapsible');- expect(panel.querySelector('[data-slot="reasoning-panel-resting-label"]')?.textContent).toBe('Thought for 12s');+ expect(panel.querySelector('[data-slot="reasoning-panel-resting-label"]')?.textContent).toBe(+ 'Thought for 12s'+ );const trigger = panel.querySelector('button')!;expect(trigger.getAttribute('aria-expanded')).toBe('false');@@ -103,8 +105,9 @@ describe('thread reasoning panel', () => {};render(<Harness messages={[user, legacy]} running={false} />);expect(- screen.getByTestId('reasoning-panel').querySelector('[data-slot="reasoning-panel-resting-label"]')- ?.textContent+ screen+ .getByTestId('reasoning-panel')+ .querySelector('[data-slot="reasoning-panel-resting-label"]')?.textContent).toBe('Thought');});});diff --git a/app/src/features/conversations/components/InterruptedAnswer.test.tsx b/app/src/features/conversations/components/InterruptedAnswer.test.tsxindex 70424d50d0..adfef7c829 100644--- a/app/src/features/conversations/components/InterruptedAnswer.test.tsx+++ b/app/src/features/conversations/components/InterruptedAnswer.test.tsx@@ -22,7 +22,9 @@ describe('InterruptedAnswer', () => {const thinking = screen.getByTestId('interrupted-answer-thinking');const trigger = thinking.querySelector('button')!;expect(trigger.getAttribute('aria-expanded')).toBe('false');- expect(thinking.querySelector('[data-slot="reasoning-panel-resting-label"]')?.textContent).toBe('Thought');+ expect(thinking.querySelector('[data-slot="reasoning-panel-resting-label"]')?.textContent).toBe(+ 'Thought'+ );fireEvent.click(trigger);expect(block.textContent).toContain('was reasoning about it');// Marked interrupted rather than presented as a finished answer.diff --git a/app/src/index.css b/app/src/index.cssindex 8cb9fd9710..233ad134e2 100644--- a/app/src/index.css+++ b/app/src/index.css@@ -550,7 +550,6 @@/* Utility layer - Custom utilities */-@utility scrollbar-hide {/* NOTE: a `.scrollbar-thin` utility used to live here. It had zero callsites, and being in `@layer utilities` it outranked the base-layer