Skip to content

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

fix(timeline): drop the test's `any` and refresh the checklist's line refs

Etienne Lescotb78155b901aa
diff --git a/src/components/ai-edition/v4/V4Timeline.geometry.test.tsx b/src/components/ai-edition/v4/V4Timeline.geometry.test.tsx
index fa475e3ee..5497244bc 100644
--- a/src/components/ai-edition/v4/V4Timeline.geometry.test.tsx
+++ b/src/components/ai-edition/v4/V4Timeline.geometry.test.tsx
@@ -13,6 +13,7 @@ vi.mock("@/contexts/I18nContext", () => ({
}));
vi.mock("sonner", () => ({ toast: { error: vi.fn(), info: vi.fn(), success: vi.fn() } }));
+import type { useTimeline } from "@/lib/ai-edition/store/useTimeline";
import { V4Timeline } from "./V4Timeline";
beforeAll(() => {
@@ -86,8 +87,9 @@ function renderTimeline(
};
render(
<V4Timeline
- // biome-ignore lint/suspicious/noExplicitAny: a partial timeline API is enough to draw pills
- tl={tl as any}
+ // Only the members the lanes and the clip row read are mocked; the prop
+ // stays typed as the real API rather than widened to `any` (AGENTS.md).
+ tl={tl as unknown as ReturnType<typeof useTimeline>}
setCurrentTime={vi.fn()}
playing={false}
onTogglePlay={vi.fn()}
diff --git a/technical-documentation/architecture/editor-shell.md b/technical-documentation/architecture/editor-shell.md
index cfcd6005e..b6c79db9f 100644
--- a/technical-documentation/architecture/editor-shell.md
+++ b/technical-documentation/architecture/editor-shell.md
@@ -129,9 +129,9 @@ switches on it is checked below. Each path has been verified on this branch.
(`document/timeline.ts:591`) for batch / single deletes.
4. **Lane in `V4Timeline`** — `src/components/ai-edition/v4/V4Timeline.tsx`.
Compute the pills at the same call site as the four existing lanes
- (`coalesceRegionsForRuler(tl.xxxRegions).map(...)` near `:321-347`), render
+ (`coalesceRegionsForRuler(tl.xxxRegions).map(...)` near `:461-509`), render
them through `renderPills` inside a `<div className={styles.tlLane}>`
- block (`:1244-1252`), and extend the `kind` union at `:203` so drag,
+ block (`:1478-1488`), and extend the `kind` union at `:332` so drag,
resize, and delete handler switches route correctly.
**Coordinates on the timeline canvas obey one rule**: position and size are