LibreChat/e2e/playwright.config.fade-perf.ts
Danny Avila 89a4b9eee5
🎞️ perf: Run the In-Flight Label Sweep on the Compositor (#18128)
* 🎞️ perf: Run the In-Flight Label Sweep on the Compositor

The sweep on a running tool call, streaming reasoning and the elapsed timer
animated `background-position` under `background-clip: text`, which no
browser can hand to the compositor. Every frame of it ran style, paint and
commit on the main thread, and each paint walked the transcript around the
label, so the cost of a frame grew with the conversation and the sweep
stuttered whenever the main thread was busy.

`Shimmer` in `@librechat/client` draws the same sweep from two transforms
that cancel: a masked band slides across the label while a second copy of the
text inside it slides back, so the glyphs hold still and only the gap in the
mask moves. The copy is generated content, so the label is still one text
node. Every in-flight label renders through it.

`e2e/benchmarks-fade` measures a frame and each kind of stream event inside
an exported conversation, from a Chromium trace of the built client.

* 🧪 test: Let the Frame Benchmark Open a Chat in a Chosen Theme
2026-11-14 10:16:52 -05:00

17 lines
519 B
TypeScript

import { defineConfig } from '@playwright/test';
import mockConfig from './playwright.config.mock';
/**
* Animated-label frame cost against the BUILT client (`client/dist`, served by
* the mock app server): what one frame of the `.shimmer` sweep costs the main
* thread as the transcript around it grows.
*/
export default defineConfig({
...mockConfig,
testDir: 'benchmarks-fade',
outputDir: 'benchmarks-fade/.test-results',
timeout: 15 * 60 * 1000,
retries: 0,
workers: 1,
reporter: [['line']],
});