From 7e2bcafe99fcf79003ff204e4d7a5a4639755357 Mon Sep 17 00:00:00 2001 From: Etienne Lescot Date: Tue, 28 Jul 2026 09:19:58 +0200 Subject: [PATCH 1/4] chore: remove + skip button in the chat panel Drops the chat-panel '+ skip' control, its six i18n keys across all 13 locales, and the runAddTrim handler / useOptimisticTimelineOps hook that existed only for it (the hook had no other callers and is removed with the file). Refs getopenscreen/openscreen#182. --- src/components/ai-edition/LeftPanel.tsx | 47 ------------ src/i18n/locales/ar/editor.json | 6 -- src/i18n/locales/en/editor.json | 6 -- src/i18n/locales/es/editor.json | 6 -- src/i18n/locales/fr/editor.json | 6 -- src/i18n/locales/it/editor.json | 6 -- src/i18n/locales/ja-JP/editor.json | 6 -- src/i18n/locales/ko-KR/editor.json | 6 -- src/i18n/locales/pt-BR/editor.json | 6 -- src/i18n/locales/ru/editor.json | 6 -- src/i18n/locales/tr/editor.json | 6 -- src/i18n/locales/vi/editor.json | 6 -- src/i18n/locales/zh-CN/editor.json | 6 -- src/i18n/locales/zh-TW/editor.json | 6 -- .../store/useOptimisticTimelineOps.ts | 73 ------------------- 15 files changed, 198 deletions(-) delete mode 100644 src/lib/ai-edition/store/useOptimisticTimelineOps.ts diff --git a/src/components/ai-edition/LeftPanel.tsx b/src/components/ai-edition/LeftPanel.tsx index 3bb5024a13..f140e15e2c 100644 --- a/src/components/ai-edition/LeftPanel.tsx +++ b/src/components/ai-edition/LeftPanel.tsx @@ -7,12 +7,10 @@ import { useScopedT } from "@/contexts/I18nContext"; import { type AxcutAsset, ensureDocument } from "@/lib/ai-edition/schema"; import { useProjectStore } from "@/lib/ai-edition/store/projectStore"; import { useChatPromptBus } from "@/lib/ai-edition/store/useChatPromptBus"; -import { useOptimisticTimelineOps } from "@/lib/ai-edition/store/useOptimisticTimelineOps"; import { nativeBridgeClient } from "@/native/client"; import type { AiEditionLlmConfig, AiEditionToolCallSummary, - AxcutTimelineOperation, } from "@/native/contracts"; import { formatBytes } from "@/utils/formatBytes"; import { @@ -1139,32 +1137,6 @@ function ChatStripPanel() { [editingTitle, handleRename, cancelEditTitle], ); - const { queue: queueTimelineOp, busy: queueBusy } = useOptimisticTimelineOps( - projectId, - activeSessionId, - ); - const runAddTrim = useCallback(() => { - const raw = window.prompt(t("chat.addSkipRangePrompt"), "5-8"); - if (!raw) return; - const m = raw.match(/^\s*(\d+(?:\.\d+)?)\s*[-–]\s*(\d+(?:\.\d+)?)\s*$/); - if (!m) { - toast.error(t("chat.addSkipRangeFormatError")); - return; - } - const startSec = Number(m[1]); - const endSec = Number(m[2]); - if (!Number.isFinite(startSec) || !Number.isFinite(endSec) || endSec <= startSec) { - toast.error(t("chat.addSkipRangeOrderError")); - return; - } - const op: AxcutTimelineOperation = { - type: "add_trim_range", - startSec, - endSec, - }; - void queueTimelineOp(op, t("chat.addSkipRangeApplied", { startSec, endSec })); - }, [queueTimelineOp, t]); - return (