Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

refactor(editor): remove the transport seek bar

EtienneLescot088351e8c7c3
diff --git a/src/components/ai-edition/NewEditorShell.module.css b/src/components/ai-edition/NewEditorShell.module.css
index 958536ed2..fdac902c9 100644
--- a/src/components/ai-edition/NewEditorShell.module.css
+++ b/src/components/ai-edition/NewEditorShell.module.css
@@ -764,8 +764,6 @@
display: flex;
align-items: center;
gap: 6px;
- flex: 1;
- min-width: 0;
}
.transport .tbtn {
width: 32px;
@@ -2260,57 +2258,6 @@ textarea.control {
.editClipGrip[data-edge="end"]::before { right: 9px; }
.editClipGrip:hover::before { transform: scaleY(1.25); }
-.scrubBar {
- flex: 1;
- min-width: 0;
- position: relative;
- height: 24px;
- display: flex;
- align-items: center;
- cursor: pointer;
-}
-.scrubTrack {
- position: absolute;
- left: 0;
- right: 0;
- height: 6px;
- background: var(--border-hi);
- border-radius: 9999px;
- overflow: hidden;
-}
-/* The playhead's violet, not mint: this bar IS the playhead, seen from afar. */
-.scrubProgress {
- height: 100%;
- background: var(--playhead);
- border-radius: 9999px;
-}
-.scrubInput {
- position: absolute;
- inset: 0;
- width: 100%;
- height: 100%;
- opacity: 0;
- cursor: pointer;
- z-index: 10;
- margin: 0;
-}
-.scrubThumb {
- position: absolute;
- width: 12px;
- height: 12px;
- background: #ffffff;
- border-radius: 50%;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
- pointer-events: none;
- transform: translate(-50%, -50%);
- top: 50%;
- opacity: 1;
- transition: transform 100ms ease;
-}
-.scrubBar:hover .scrubThumb {
- transform: translate(-50%, -50%) scale(1.2);
-}
-
/* ─── AI provider settings (axcut parity) ────────────────────────── */
.providerGrid {
diff --git a/src/components/ai-edition/TransportBar.test.tsx b/src/components/ai-edition/TransportBar.test.tsx
index 981d26df5..ffa50c9b3 100644
--- a/src/components/ai-edition/TransportBar.test.tsx
+++ b/src/components/ai-edition/TransportBar.test.tsx
@@ -1,6 +1,6 @@
// @vitest-environment jsdom
import "@testing-library/jest-dom";
-import { act, cleanup, fireEvent, render, screen } from "@testing-library/react";
+import { act, cleanup, render, screen } from "@testing-library/react";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { I18nProvider } from "@/contexts/I18nContext";
import { useProjectStore } from "@/lib/ai-edition/store/projectStore";
@@ -45,13 +45,7 @@ describe("TransportBar reads the playhead from the store", () => {
function Parent() {
parentRenders++;
return (
- <TransportBar
- playing={false}
- overrideTimeSec={null}
- clips={clips}
- onTogglePlay={noop}
- onSeek={noop}
- />
+ <TransportBar playing={false} overrideTimeSec={null} clips={clips} onTogglePlay={noop} />
);
}
@@ -77,171 +71,9 @@ describe("TransportBar reads the playhead from the store", () => {
useProjectStore.setState({ currentTimeSec: 12.3 });
render(
<I18nProvider>
- <TransportBar
- playing={false}
- overrideTimeSec={4.5}
- clips={clips}
- onTogglePlay={noop}
- onSeek={noop}
- />
+ <TransportBar playing={false} overrideTimeSec={4.5} clips={clips} onTogglePlay={noop} />
</I18nProvider>,
);
expect(screen.getByText("0:04.5")).toBeInTheDocument();
});
});
-
-describe("le drag de la barre de progression est coalescé en rAF", () => {
- beforeEach(() => {
- useProjectStore.setState({ currentTimeSec: 0 });
- });
-
- afterEach(() => {
- cleanup();
- vi.clearAllMocks();
- vi.unstubAllGlobals();
- });
-
- /** rAF piloté à la main : les callbacks ne partent que sur `flush()`, ce qui permet de
- * compter ce qui se passe DANS une frame — impossible avec le vrai rAF en test. */
- function stubRaf() {
- const pending: FrameRequestCallback[] = [];
- vi.stubGlobal("requestAnimationFrame", (cb: FrameRequestCallback) => {
- pending.push(cb);
- return pending.length;
- });
- vi.stubGlobal("cancelAnimationFrame", () => {
- // rien à annuler : `flush()` ne rejoue que ce qui reste en attente
- });
- return () => {
- const due = pending.splice(0, pending.length);
- for (const cb of due) cb(0);
- };
- }
-
- // C'est LE défaut que ce chemin avait : `onChange` d'un `<input type="range">` se
- // déclenche à la cadence du pointeur (jusqu'à 1000 Hz) et appelait `onSeek` à chaque
- // fois. Or `onSeek` repose un `seekTarget` dans l'état de la racine de l'éditeur, donc
- // re-rend tout et fait poser `<video>.currentTime`. La timeline fait les mêmes appels
- // mais une fois par frame ; ce test verrouille cette parité.
- it("n'émet qu'un seul seek par frame, quel que soit le nombre d'événements", () => {
- const flush = stubRaf();
- const onSeek = vi.fn();
- render(
- <I18nProvider>
- <TransportBar
- playing={false}
- overrideTimeSec={null}
- clips={clips}
- onTogglePlay={noop}
- onSeek={onSeek}
- />
- </I18nProvider>,
- );
- const input = screen.getByLabelText(/seek/i) as HTMLInputElement;
-
- act(() => {
- fireEvent.pointerDown(input);
- });
- // Dix mouvements dans la même frame : un seul seek doit en sortir, et c'est le
- // DERNIER qui compte — sans quoi la tête accuserait un retard permanent.
- act(() => {
- for (const value of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) {
- fireEvent.change(input, { target: { value: String(value) } });
- }
- });
- expect(onSeek).not.toHaveBeenCalled();
-
- act(() => flush());
- expect(onSeek).toHaveBeenCalledTimes(1);
- expect(onSeek).toHaveBeenLastCalledWith(10);
- });
-
- // Le mouvement compris entre le dernier rAF et le relâchement serait perdu sans commit
- // final : la tête s'arrêterait un cran avant le doigt.
- it("pose la dernière position au relâchement", () => {
- stubRaf();
- const onSeek = vi.fn();
- render(
- <I18nProvider>
- <TransportBar
- playing={false}
- overrideTimeSec={null}
- clips={clips}
- onTogglePlay={noop}
- onSeek={onSeek}
- />
- </I18nProvider>,
- );
- const input = screen.getByLabelText(/seek/i) as HTMLInputElement;
-
- act(() => {
- fireEvent.pointerDown(input);
- fireEvent.change(input, { target: { value: "7" } });
- fireEvent.pointerUp(input);
- });
- expect(onSeek).toHaveBeenCalledWith(7);
- });
-
- // Hors drag il n'y a rien à coalescer : une flèche du clavier est un saut unique et
- // doit prendre effet immédiatement, sans attendre une frame.
- it("applique immédiatement un changement hors drag", () => {
- stubRaf();
- const onSeek = vi.fn();
- render(
- <I18nProvider>
- <TransportBar
- playing={false}
- overrideTimeSec={null}
- clips={clips}
- onTogglePlay={noop}
- onSeek={onSeek}
- />
- </I18nProvider>,
- );
- const input = screen.getByLabelText(/seek/i) as HTMLInputElement;
-
- act(() => {
- fireEvent.change(input, { target: { value: "3" } });
- });
- expect(onSeek).toHaveBeenCalledTimes(1);
- expect(onSeek).toHaveBeenCalledWith(3);
- });
-
- // Le remplissage et le curseur étaient positionnés uniquement par React depuis le store,
- // donc en retard d'un commit à chaque mouvement — alors que la tête de lecture de la
- // timeline, elle, est écrite directement dans le DOM et colle au pointeur. Ce test
- // verrouille la parité : le visuel bouge AVANT le rAF, donc sans attendre React.
- it("déplace le curseur dans le DOM avant tout rendu React", () => {
- stubRaf();
- const onSeek = vi.fn();
- const { container } = render(
- <I18nProvider>
- <TransportBar
- playing={false}
- overrideTimeSec={null}
- clips={clips}
- onTogglePlay={noop}
- onSeek={onSeek}
- />
- </I18nProvider>,
- );
- const input = screen.getByLabelText(/seek/i) as HTMLInputElement;
- // Les deux éléments décorés : le remplissage (largeur) et le curseur (position).
- const styled = Array.from(container.querySelectorAll("div")).filter(
- (el) => el.style.width !== "" || el.style.left !== "",
- );
- expect(styled.length).toBeGreaterThanOrEqual(2);
-
- act(() => {
- fireEvent.pointerDown(input);
- // La moitié de la durée (clip de 30 s) → 50 %.
- fireEvent.change(input, { target: { value: "15" } });
- });
-
- // Aucun rAF n'a été vidé, donc aucune écriture au store et aucun rendu React : ce qui
- // a bougé ne peut venir que de l'écriture DOM directe.
- expect(onSeek).not.toHaveBeenCalled();
- const moved = styled.filter((el) => el.style.width === "50%" || el.style.left === "50%");
- expect(moved.length).toBeGreaterThanOrEqual(2);
- });
-});
diff --git a/src/components/ai-edition/TransportBar.tsx b/src/components/ai-edition/TransportBar.tsx
index e4af7f782..c285dea38 100644
--- a/src/components/ai-edition/TransportBar.tsx
+++ b/src/components/ai-edition/TransportBar.tsx
@@ -1,7 +1,6 @@
import { Pause, Play } from "lucide-react";
-import { memo, useCallback, useEffect, useRef } from "react";
+import { memo } from "react";
import { useScopedT } from "@/contexts/I18nContext";
-import { setUiProbeScrubbing } from "@/lib/ai-edition/perf/uiFrameProbe";
import type { AxcutClip } from "@/lib/ai-edition/schema";
import { useProjectStore } from "@/lib/ai-edition/store/projectStore";
import { formatSec } from "@/lib/ai-edition/timeline/format";
@@ -13,128 +12,28 @@ interface TransportBarProps {
overrideTimeSec: number | null;
clips: AxcutClip[];
onTogglePlay: () => void;
- onSeek: (sec: number) => void;
}
// ponytail: lives in the timeline header now (not under the preview canvas)
// so the header row covers both timeline tools and playback in one line.
+// No seek bar of its own: the ruler right below seeks, and ←/→ step a frame.
export const TransportBar = memo(function TransportBar({
playing,
overrideTimeSec,
clips,
onTogglePlay,
- onSeek,
}: TransportBarProps) {
const te = useScopedT("editor");
- // Same reason as PlayheadOverlay (see V4Timeline.tsx): the timecode and the
- // scrub thumb are animated during playback, so they subscribe to the playhead
- // directly instead of forcing V4Timeline — and the whole editor shell above it —
- // to re-render once per frame to hand it down as a prop.
+ // Same reason as PlayheadOverlay (see V4Timeline.tsx): the timecode is animated
+ // during playback, so it subscribes to the playhead directly instead of forcing
+ // V4Timeline — and the whole editor shell above it — to re-render once per frame
+ // to hand it down as a prop.
const storeTimeSec = useProjectStore((s) => s.currentTimeSec);
const currentTimeSec = overrideTimeSec ?? storeTimeSec;
const virtualDurationSec = clips.reduce(
(acc, c) => acc + (c.timelineEndSec - c.timelineStartSec),
0,
);
- // ponytail: mirrors Preview's old clamp so the CSS thumb and the native
- // range thumb stay in sync when there's no clip yet.
- const inputMax = virtualDurationSec || 1;
- const inputValue = Math.min(Math.max(currentTimeSec, 0), inputMax);
- const progress = (inputValue / inputMax) * 100;
-
- // ── Drag de la barre : même cadence que le drag de la timeline ──────────────────
- //
- // L'`onChange` d'un `<input type="range">` se déclenche à la cadence du POINTEUR — 125 à
- // 1000 Hz selon la souris — et appelait `onSeek` à chacun. Or `onSeek` est `handleSeek`,
- // qui écrit au store ET repose un `seekTarget` neuf dans l'état de `NewEditorShell`, la
- // racine : chaque appel re-rend tout l'éditeur et fait poser `<video>.currentTime`, un
- // vrai seek média.
- //
- // La timeline fait exactement les mêmes appels, mais les coalesce en rAF — donc ~60 fois
- // par seconde au lieu de jusqu'à 1000. C'est cette seule différence de cadence qui
- // sépare les deux chemins, et elle explique l'écart de fluidité remonté en usage.
- //
- // On ne fait donc rien de plus que rétablir la parité : même travail, cadence d'écran.
- // Délibérément PAS « ne poser le seekTarget qu'au relâchement » — ce serait un
- // comportement différent de la timeline, où le `<video>` suit pendant le drag, et
- // divergence entre deux chemins censés faire la même chose est précisément ce qui a
- // produit les bugs de cette zone.
- const rafRef = useRef(0);
- const pendingRef = useRef<number | null>(null);
- const draggingRef = useRef(false);
- // Remplissage et curseur de la barre, écrits DIRECTEMENT pendant un drag.
- //
- // Même patron que `playheadElRef` dans V4Timeline, et pour la même raison : la position
- // que l'utilisateur voit ne doit pas attendre un rendu React. Ces deux éléments étaient
- // positionnés uniquement depuis `progress`, dérivé du store — donc en retard d'un commit
- // à chaque mouvement, alors que la tête de lecture de la timeline, elle, colle au
- // pointeur. C'est la dernière différence de parité entre les deux chemins que j'aie pu
- // identifier dans le code.
- //
- // React continue de les positionner hors drag (et au rendu suivant pendant le drag, avec
- // une valeur au pire vieille d'une frame puisque le rAF écrit au store à 60 Hz) : les
- // deux écritures convergent au lieu de se contredire.
- const progressElRef = useRef<HTMLDivElement | null>(null);
- const thumbElRef = useRef<HTMLDivElement | null>(null);
-
- useEffect(() => {
- return () => {
- if (rafRef.current !== 0) {
- cancelAnimationFrame(rafRef.current);
- }
- };
- }, []);
-
- const handleInputChange = useCallback(
- (value: number) => {
- // Hors drag (flèches du clavier, clic simple sur la piste) : rien à coalescer,
- // c'est un saut unique et il doit prendre effet tout de suite.
- if (!draggingRef.current) {
- onSeek(value);
- return;
- }
- pendingRef.current = value;
- // Visuel d'abord, sans passer par React : latence nulle, comme la tête de lecture
- // de la timeline. `inputMax` est déjà borné à 1 minimum, pas de division par zéro.
- const pct = Math.min(100, Math.max(0, (value / inputMax) * 100));
- if (progressElRef.current) {
- progressElRef.current.style.width = `${pct}%`;
- }
- if (thumbElRef.current) {
- thumbElRef.current.style.left = `${pct}%`;
- }
- if (rafRef.current !== 0) {
- return;
- }
- rafRef.current = requestAnimationFrame(() => {
- rafRef.current = 0;
- const pending = pendingRef.current;
- if (pending !== null) {
- onSeek(pending);
- }
- });
- },
- [onSeek, inputMax],
- );
-
- const endDrag = useCallback(() => {
- if (!draggingRef.current) {
- return;
- }
- draggingRef.current = false;
- setUiProbeScrubbing(false, "bar");
- if (rafRef.current !== 0) {
- cancelAnimationFrame(rafRef.current);
- rafRef.current = 0;
- }
- // Pose la dernière position : sans ce commit, le mouvement compris entre le dernier
- // rAF et le relâchement serait perdu et la tête s'arrêterait un cran avant le doigt.
- const pending = pendingRef.current;
- if (pending !== null) {
- pendingRef.current = null;
- onSeek(pending);
- }
- }, [onSeek]);
return (
<div className={styles.transport} role="toolbar" aria-label={te("transport.playbackControls")}>
@@ -153,45 +52,6 @@ export const TransportBar = memo(function TransportBar({
<span className={styles.sep}>/</span>
<span className={styles.total}>{formatSec(virtualDurationSec)}</span>
</span>
- <div className={styles.scrubBar}>
- <div className={styles.scrubTrack}>
- <div
- ref={progressElRef}
- className={styles.scrubProgress}
- style={{ width: `${progress}%` }}
- />
- </div>
- <input
- type="range"
- min={0}
- max={inputMax}
- step={0.01}
- value={inputValue}
- onChange={(e) => handleInputChange(Number(e.target.value))}
- onPointerDown={() => {
- draggingRef.current = true;
- // Sonde de fluidité (diagnostic) : marque la fenêtre de drag comme
- // venant de la BARRE, pour ne pas la confondre avec un drag de
- // timeline — les deux empruntent des chemins de code différents.
- setUiProbeScrubbing(true, "bar");
- }}
- onPointerUp={endDrag}
- // `pointercancel` et `blur` ferment aussi le drag : un pointeur capturé
- // puis interrompu (geste système, perte de focus) ne produit pas de
- // `pointerup`, et la dernière position resterait alors non confirmée.
- onPointerCancel={endDrag}
- onBlur={endDrag}
- className={styles.scrubInput}
- aria-label={te("transport.seekVideo")}
- />
- <div
- ref={thumbElRef}
- className={styles.scrubThumb}
- style={{
- left: `${progress}%`,
- }}
- />
- </div>
</div>
);
});
diff --git a/src/components/ai-edition/v4/V4Timeline.tsx b/src/components/ai-edition/v4/V4Timeline.tsx
index 65d7ca48f..1dc4cc361 100644
--- a/src/components/ai-edition/v4/V4Timeline.tsx
+++ b/src/components/ai-edition/v4/V4Timeline.tsx
@@ -2029,7 +2029,6 @@ export function V4Timeline({
overrideTimeSec={scrubbingTimeSec}
clips={clips}
onTogglePlay={onTogglePlay}
- onSeek={setCurrentTime}
/>
<div className={styles.tlHints}>
<span className={styles.tlHint}>
diff --git a/src/i18n/locales/ar/editor.json b/src/i18n/locales/ar/editor.json
index b8efbe342..b1452a3e6 100644
--- a/src/i18n/locales/ar/editor.json
+++ b/src/i18n/locales/ar/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "عناصر التحكم في التشغيل",
"playPause": "تشغيل / إيقاف مؤقت",
"playPauseTitle": "تشغيل / إيقاف مؤقت (مسافة)",
- "loop": "تكرار",
- "seekVideo": "التنقل في الفيديو"
+ "loop": "تكرار"
},
"shell": {
"aiEditor": "محرّر الذكاء الاصطناعي",
diff --git a/src/i18n/locales/cs/editor.json b/src/i18n/locales/cs/editor.json
index 9a4b758fe..0b96b4024 100644
--- a/src/i18n/locales/cs/editor.json
+++ b/src/i18n/locales/cs/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "Ovládání přehrávání",
"playPause": "Přehrát / Pozastavit",
"playPauseTitle": "Přehrát / Pozastavit (mezerník)",
- "loop": "Opakovat",
- "seekVideo": "Vyhledat ve videu"
+ "loop": "Opakovat"
},
"shell": {
"aiEditor": "AI editor",
diff --git a/src/i18n/locales/de/editor.json b/src/i18n/locales/de/editor.json
index 155f9ae0e..6ee6b7888 100644
--- a/src/i18n/locales/de/editor.json
+++ b/src/i18n/locales/de/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "Wiedergabesteuerung",
"playPause": "Wiedergabe / Pause",
"playPauseTitle": "Wiedergabe / Pause (Leertaste)",
- "loop": "Wiederholen",
- "seekVideo": "Videoposition"
+ "loop": "Wiederholen"
},
"shell": {
"aiEditor": "KI-Editor",
diff --git a/src/i18n/locales/en/editor.json b/src/i18n/locales/en/editor.json
index 1f2080daa..7eef3397c 100644
--- a/src/i18n/locales/en/editor.json
+++ b/src/i18n/locales/en/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "Playback controls",
"playPause": "Play / Pause",
"playPauseTitle": "Play / Pause (Space)",
- "loop": "Loop",
- "seekVideo": "Seek video"
+ "loop": "Loop"
},
"shell": {
"aiEditor": "AI editor",
diff --git a/src/i18n/locales/es/editor.json b/src/i18n/locales/es/editor.json
index ad3e99566..3574f2a8b 100644
--- a/src/i18n/locales/es/editor.json
+++ b/src/i18n/locales/es/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "Controles de reproducción",
"playPause": "Reproducir / Pausar",
"playPauseTitle": "Reproducir / Pausar (Espacio)",
- "loop": "Bucle",
- "seekVideo": "Desplazarse por el vídeo"
+ "loop": "Bucle"
},
"shell": {
"aiEditor": "Editor de IA",
diff --git a/src/i18n/locales/fr/editor.json b/src/i18n/locales/fr/editor.json
index 589c2f28c..f26c00ab8 100644
--- a/src/i18n/locales/fr/editor.json
+++ b/src/i18n/locales/fr/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "Contrôles de lecture",
"playPause": "Lecture / Pause",
"playPauseTitle": "Lecture / Pause (Espace)",
- "loop": "Boucle",
- "seekVideo": "Naviguer dans la vidéo"
+ "loop": "Boucle"
},
"shell": {
"aiEditor": "Éditeur IA",
diff --git a/src/i18n/locales/it/editor.json b/src/i18n/locales/it/editor.json
index 7af2973d9..6275c9549 100644
--- a/src/i18n/locales/it/editor.json
+++ b/src/i18n/locales/it/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "Controlli di riproduzione",
"playPause": "Riproduci / Pausa",
"playPauseTitle": "Riproduci / Pausa (Spazio)",
- "loop": "Ripeti",
- "seekVideo": "Scorri il video"
+ "loop": "Ripeti"
},
"shell": {
"aiEditor": "Editor IA",
diff --git a/src/i18n/locales/ja-JP/editor.json b/src/i18n/locales/ja-JP/editor.json
index d463ad937..0958f7fb6 100644
--- a/src/i18n/locales/ja-JP/editor.json
+++ b/src/i18n/locales/ja-JP/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "再生コントロール",
"playPause": "再生 / 一時停止",
"playPauseTitle": "再生 / 一時停止(スペース)",
- "loop": "ループ",
- "seekVideo": "動画をシーク"
+ "loop": "ループ"
},
"shell": {
"aiEditor": "AI エディター",
diff --git a/src/i18n/locales/ko-KR/editor.json b/src/i18n/locales/ko-KR/editor.json
index 3bc89c1ad..5f147f9dc 100644
--- a/src/i18n/locales/ko-KR/editor.json
+++ b/src/i18n/locales/ko-KR/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "재생 컨트롤",
"playPause": "재생 / 일시정지",
"playPauseTitle": "재생 / 일시정지 (Space)",
- "loop": "반복",
- "seekVideo": "영상 탐색"
+ "loop": "반복"
},
"shell": {
"aiEditor": "AI 편집기",
diff --git a/src/i18n/locales/pt-BR/editor.json b/src/i18n/locales/pt-BR/editor.json
index 2fd1122fc..b2f2ebce4 100644
--- a/src/i18n/locales/pt-BR/editor.json
+++ b/src/i18n/locales/pt-BR/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "Controles de reprodução",
"playPause": "Reproduzir / Pausar",
"playPauseTitle": "Reproduzir / Pausar (Espaço)",
- "loop": "Repetir",
- "seekVideo": "Navegar no vídeo"
+ "loop": "Repetir"
},
"shell": {
"aiEditor": "Editor de IA",
diff --git a/src/i18n/locales/ru/editor.json b/src/i18n/locales/ru/editor.json
index 257b406f3..cc6f324be 100644
--- a/src/i18n/locales/ru/editor.json
+++ b/src/i18n/locales/ru/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "Элементы управления воспроизведением",
"playPause": "Воспроизведение / Пауза",
"playPauseTitle": "Воспроизведение / Пауза (Пробел)",
- "loop": "Повтор",
- "seekVideo": "Перемотка видео"
+ "loop": "Повтор"
},
"shell": {
"aiEditor": "ИИ-редактор",
diff --git a/src/i18n/locales/tr/editor.json b/src/i18n/locales/tr/editor.json
index 0170d454c..2f3c01abf 100644
--- a/src/i18n/locales/tr/editor.json
+++ b/src/i18n/locales/tr/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "Oynatma denetimleri",
"playPause": "Oynat / Duraklat",
"playPauseTitle": "Oynat / Duraklat (Boşluk)",
- "loop": "Döngü",
- "seekVideo": "Videoda gezin"
+ "loop": "Döngü"
},
"shell": {
"aiEditor": "Yapay zekâ düzenleyici",
diff --git a/src/i18n/locales/vi/editor.json b/src/i18n/locales/vi/editor.json
index b921be5ed..b1836927d 100644
--- a/src/i18n/locales/vi/editor.json
+++ b/src/i18n/locales/vi/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "Điều khiển phát lại",
"playPause": "Phát / Tạm dừng",
"playPauseTitle": "Phát / Tạm dừng (Phím cách)",
- "loop": "Lặp lại",
- "seekVideo": "Tua video"
+ "loop": "Lặp lại"
},
"shell": {
"aiEditor": "Trình biên tập AI",
diff --git a/src/i18n/locales/zh-CN/editor.json b/src/i18n/locales/zh-CN/editor.json
index bc741076e..a81e03a50 100644
--- a/src/i18n/locales/zh-CN/editor.json
+++ b/src/i18n/locales/zh-CN/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "播放控件",
"playPause": "播放 / 暂停",
"playPauseTitle": "播放 / 暂停(空格)",
- "loop": "循环",
- "seekVideo": "拖动视频进度"
+ "loop": "循环"
},
"shell": {
"aiEditor": "AI 编辑器",
diff --git a/src/i18n/locales/zh-TW/editor.json b/src/i18n/locales/zh-TW/editor.json
index 9487b2cf3..a58c17635 100644
--- a/src/i18n/locales/zh-TW/editor.json
+++ b/src/i18n/locales/zh-TW/editor.json
@@ -352,8 +352,7 @@
"playbackControls": "播放控制項",
"playPause": "播放 / 暫停",
"playPauseTitle": "播放 / 暫停(空白鍵)",
- "loop": "循環",
- "seekVideo": "拖曳影片進度"
+ "loop": "循環"
},
"shell": {
"aiEditor": "AI 編輯器",
diff --git a/src/lib/ai-edition/perf/uiFrameProbe.ts b/src/lib/ai-edition/perf/uiFrameProbe.ts
index 8fb2adb31..812d39f46 100644
--- a/src/lib/ai-edition/perf/uiFrameProbe.ts
+++ b/src/lib/ai-edition/perf/uiFrameProbe.ts
@@ -21,13 +21,7 @@
* qu'on ne le demande pas — aucun coût en usage normal.
*/
-type BaseState =
- | "repos"
- | "preview"
- | "scrub-tl"
- | "scrub-tl+preview"
- | "scrub-bar"
- | "scrub-bar+preview";
+type BaseState = "repos" | "preview" | "scrub" | "scrub+preview";
/** L'état porte le suffixe `@N` = nombre de bascules de clip déjà vues. Voir
* `noteUiProbeClipSwitch` : sans cette séparation, deux mesures ne sont pas comparables. */
type ProbeState = string;
@@ -42,19 +36,7 @@ let rafHandle = 0;
let lastTs = 0;
/** Frames de preview peintes depuis le dernier tick — dit si la preview travaille. */
let previewFramesSinceTick = 0;
-/**
- * D'OÙ vient le scrub en cours.
- *
- * Les deux chemins n'ont rien à voir : la timeline écrit la tête de lecture directement
- * dans le DOM et coalesce son écriture au store en rAF ; la barre de progression, elle,
- * écrit au store à chaque événement ET repose un `seekTarget` — un état de la RACINE de
- * l'éditeur — ce qui re-render tout et déclenche un seek du `<video>` par mouvement de
- * souris. Les mélanger sous une même étiquette `scrub` reviendrait à moyenner deux
- * populations différentes, exactement le biais que cette sonde existe pour éviter.
- */
-type ScrubSource = "timeline" | "bar";
-
-let scrubbing: ScrubSource | null = null;
+let scrubbing = false;
/** Bascules de clip vues depuis le démarrage de la sonde. Sépare les états. */
let clipSwitches = 0;
@@ -66,8 +48,8 @@ export function noteUiProbePreviewFrame(): void {
}
/** Appelé par la timeline à l'entrée et à la sortie d'un drag de tête de lecture. */
-export function setUiProbeScrubbing(active: boolean, source: ScrubSource = "timeline"): void {
- scrubbing = active ? source : null;
+export function setUiProbeScrubbing(active: boolean): void {
+ scrubbing = active;
}
/**
@@ -105,12 +87,10 @@ function bucketFor(state: ProbeState): Bucket {
function currentState(): ProbeState {
const previewActive = previewFramesSinceTick > 0;
- // La source du scrub fait partie de l'étiquette : `scrub-tl` et `scrub-bar` sont deux
- // chemins de code distincts, les confondre masquerait précisément l'écart qu'on cherche.
const base: BaseState = scrubbing
? previewActive
- ? `scrub-${scrubbing === "timeline" ? "tl" : "bar"}+preview`
- : `scrub-${scrubbing === "timeline" ? "tl" : "bar"}`
+ ? "scrub+preview"
+ : "scrub"
: previewActive
? "preview"
: "repos";
@@ -131,14 +111,7 @@ function summarize() {
// Trié par état puis par nombre de bascules, pour que « avant / après le 1er
// changement de clip » se lisent l'un sous l'autre.
const states = [...buckets.keys()].sort((a, b) => {
- const order = [
- "repos",
- "preview",
- "scrub-tl",
- "scrub-tl+preview",
- "scrub-bar",
- "scrub-bar+preview",
- ];
+ const order = ["repos", "preview", "scrub", "scrub+preview"];
const [ba, na] = a.split("@");
const [bb, nb] = b.split("@");
return order.indexOf(ba) - order.indexOf(bb) || Number(na) - Number(nb);
diff --git a/technical-documentation/testing/manual-e2e-checklist.md b/technical-documentation/testing/manual-e2e-checklist.md
index 37a5ebc9d..b0dca5458 100644
--- a/technical-documentation/testing/manual-e2e-checklist.md
+++ b/technical-documentation/testing/manual-e2e-checklist.md
@@ -89,7 +89,6 @@ Sections marked **post-1.10.0** cover what has landed on `main` since the v1.10.
- [ ] Activate play/pause again and confirm playback stops and the preview reports `data-is-playing="false"`.
- [ ] Confirm the transport time readout advances while playback is running.
- [ ] Confirm the playhead advances with the video instead of remaining at its starting position.
-- [ ] Drag the transport seek range control with the `aria-label` for seeking and confirm `[data-testid="preview"]` reports the new current time.
- [ ] Seek while paused and confirm the preview frame changes to the selected time.
- [ ] Seek while playing and confirm playback continues from the new time without a visible stuck frame.
- [ ] Activate the loop control and confirm its pressed state changes.