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): delete the orphaned v3 left rail and media pane

EtienneLescotdd243e7c68d9
diff --git a/scripts/check-docs.mjs b/scripts/check-docs.mjs
index 65119765e..f1c671962 100644
--- a/scripts/check-docs.mjs
+++ b/scripts/check-docs.mjs
@@ -27,6 +27,9 @@ const LEGACY = [
"Titlebar",
"TranscriptEditor",
"BackgroundPane",
+ "LeftRail",
+ "MediaPane",
+ "SourceTranscriptModal",
"ai-edition-roadmap",
"ai-edition-collision-analysis",
"openscreen-inventory",
diff --git a/src/components/ai-edition/LeftPanel.providerRefresh.test.tsx b/src/components/ai-edition/LeftPanel.providerRefresh.test.tsx
index 6163ed8d3..f14a8d73c 100644
--- a/src/components/ai-edition/LeftPanel.providerRefresh.test.tsx
+++ b/src/components/ai-edition/LeftPanel.providerRefresh.test.tsx
@@ -46,7 +46,7 @@ vi.mock("@/contexts/I18nContext", () => ({
}));
import { EditorDialogsProvider, useEditorDialogActions } from "@/contexts/EditorDialogsContext";
-import { LeftPanel } from "./LeftPanel";
+import { ChatStripPanel } from "./LeftPanel";
let dialogActions: ReturnType<typeof useEditorDialogActions> | null = null;
@@ -82,7 +82,7 @@ describe("ChatStripPanel, against the lifted provider dialog", () => {
render(
<EditorDialogsProvider>
<CaptureDialogActions />
- <LeftPanel active="chat" />
+ <ChatStripPanel />
</EditorDialogsProvider>,
);
// Mount: the dialog is closed, so the same effect that watches for a close seeds the
diff --git a/src/components/ai-edition/LeftPanel.tsx b/src/components/ai-edition/LeftPanel.tsx
index 2cafaebf2..8f88aa080 100644
--- a/src/components/ai-edition/LeftPanel.tsx
+++ b/src/components/ai-edition/LeftPanel.tsx
@@ -1,29 +1,21 @@
-import { ArrowLeft, Check, Film, Loader2, MessageSquare, Plus, Search, X } from "lucide-react";
+import { ArrowLeft, Check, Loader2, X } from "lucide-react";
import { useCallback, useEffect, useRef, useState } from "react";
import { createPortal } from "react-dom";
import { toast } from "sonner";
import { useEditorDialogActions, useEditorDialogSection } from "@/contexts/EditorDialogsContext";
import { useScopedT } from "@/contexts/I18nContext";
-import type { AxcutAsset } from "@/lib/ai-edition/schema";
import {
applyAgentDocumentIfCurrent,
runAgentTurn,
} from "@/lib/ai-edition/store/agentDocumentApply";
import { useProjectStore } from "@/lib/ai-edition/store/projectStore";
-import {
- useAssetTranscriptions,
- useTranscriptionStore,
-} from "@/lib/ai-edition/store/transcriptionStore";
import { useChatPromptBus } from "@/lib/ai-edition/store/useChatPromptBus";
-import { splitRoundedTime } from "@/lib/ai-edition/timeline/format";
-import type { AssetTranscriptionView } from "@/lib/ai-edition/transcription/status";
import { nativeBridgeClient } from "@/native/client";
import type {
AiEditionChatEvent,
AiEditionLlmConfig,
AiEditionToolCallSummary,
} from "@/native/contracts";
-import { formatBytes } from "@/utils/formatBytes";
import {
getReasoningEffortLabel,
getReasoningEffortOptions,
@@ -32,286 +24,10 @@ import {
} from "../../../electron/ai-edition/provider-registry";
import { ChatWelcome } from "./ChatWelcome";
import { canSendChat } from "./chatAvailability";
-import { ChatHistoryModal, SourceTranscriptModal } from "./Modals";
+import { ChatHistoryModal } from "./Modals";
import styles from "./NewEditorShell.module.css";
-import { TranscriptionStatusDot } from "./TranscriptionStatus";
import { useChatBudget } from "./useChatBudget";
-export type LeftTab = "chat" | "media";
-
-const THUMB_PALETTE = ["thumbRed", "thumbGreen", "thumbAmber", "thumbCyan"] as const;
-
-// `h:mm:ss.t`, hours always shown — a third shape, so it formats itself rather
-// than calling into format.ts. It shares `splitRoundedTime` because the carry is
-// the part that must not be re-derived: deriving the minute field from the raw
-// value while the second field rounded is what rendered `0:00:60.0`.
-function formatTimecode(sec: number | undefined): string {
- if (!sec || !Number.isFinite(sec)) return "0:00:00.0";
- const { totalMinutes, seconds } = splitRoundedTime(sec);
- const h = Math.floor(totalMinutes / 60);
- const m = totalMinutes % 60;
- // padStart(4), not (3): "5.0" is already 3 chars, so a single-digit second
- // rendered as `0:00:5.0` instead of `0:00:05.0`.
- return `${h}:${m.toString().padStart(2, "0")}:${seconds.toFixed(1).padStart(4, "0")}`;
-}
-
-function basename(path: string): string {
- return path.split(/[\\/]/).pop() ?? path;
-}
-
-function MediaList({
- assets,
- onOpenTranscript,
- transcriptions,
-}: {
- assets: AxcutAsset[];
- onOpenTranscript?: (asset: AxcutAsset) => void;
- /** Per-asset transcription state, keyed by asset id (see transcriptionStore). */
- transcriptions: Record<string, AssetTranscriptionView>;
-}) {
- const t = useScopedT("editor");
- if (assets.length === 0) {
- return (
- <p
- style={{
- font: "400 12px var(--font-body)",
- color: "var(--muted)",
- padding: "16px var(--sp-4)",
- textAlign: "center",
- lineHeight: 1.5,
- }}
- >
- {t("leftPanel.emptyHint")}
- </p>
- );
- }
- return (
- <ul className={styles.mediaList}>
- {assets.map((asset, i) => {
- const label = asset.label || basename(asset.originalPath);
- const tc = formatTimecode(asset.durationSec);
- const size = formatBytes(asset.sizeBytes);
- const palette = THUMB_PALETTE[i % THUMB_PALETTE.length];
- const transcription = transcriptions[asset.id] ?? {
- assetId: asset.id,
- status: "idle" as const,
- };
-
- return (
- <li
- className={styles.mediaCard}
- key={asset.id}
- title={asset.originalPath}
- draggable
- onDragStart={(e) => {
- e.dataTransfer.setData("application/x-axcut-asset", asset.id);
- e.dataTransfer.effectAllowed = "copy";
- }}
- >
- <button
- type="button"
- style={{
- display: "flex",
- flexDirection: "column",
- border: 0,
- background: "none",
- padding: 0,
- cursor: "pointer",
- font: "inherit",
- textAlign: "left",
- width: "100%",
- }}
- onClick={() => onOpenTranscript?.(asset)}
- >
- <div className={`${styles.thumb} ${styles[palette]}`} aria-hidden>
- <Film size={22} />
- </div>
- <div className={styles.mediaMeta}>
- <div className={styles.name}>{label}</div>
- <div className={styles.row}>
- <TranscriptionStatusDot view={transcription} />
- <span className={styles.timecode}>{tc}</span>
- <span className={styles.size}>{size}</span>
- </div>
- </div>
- </button>
- </li>
- );
- })}
- </ul>
- );
-}
-
-export function MediaPane() {
- const t = useScopedT("editor");
- const projectId = useProjectStore((s) => s.projectId);
- const document = useProjectStore((s) => s.document);
- const addAsset = useProjectStore((s) => s.addAsset);
- // Transcripts land on their own (transcriptionStore's background pass); the
- // pane reports where each one is at and offers a per-asset re-run.
- const transcriptions = useAssetTranscriptions();
- const requestTranscription = useTranscriptionStore((s) => s.request);
- const [query, setQuery] = useState("");
- const [busy, setBusy] = useState(false);
- const [srcTranscriptAsset, setSrcTranscriptAsset] = useState<AxcutAsset | null>(null);
- const selectedTranscription = srcTranscriptAsset
- ? transcriptions[srcTranscriptAsset.id]
- : undefined;
-
- const handleImport = async () => {
- if (!projectId) {
- toast.error(t("mediaStage.openProjectFirst"));
- return;
- }
- const picker = await window.electronAPI?.openVideoFilePicker();
- if (!picker?.success || !picker.path) return;
- setBusy(true);
- try {
- const label = picker.name || basename(picker.path);
- await addAsset(picker.path, label);
- toast.success(t("mediaStage.added", { label }));
- } catch (err) {
- toast.error(t("mediaStage.couldNotAddAsset"), {
- description: err instanceof Error ? err.message : String(err),
- });
- } finally {
- setBusy(false);
- }
- };
-
- const filtered = (document?.assets ?? []).filter((a) => {
- if (!query) return true;
- const text = `${a.label} ${a.originalPath}`.toLowerCase();
- return text.includes(query.toLowerCase());
- });
-
- return (
- <aside className={styles.panel}>
- <header className={styles.panelHead}>
- <h2>{t("leftPanel.mediaTitle")}</h2>
- </header>
- <div style={{ padding: "10px var(--sp-3) 8px" }}>
- <div
- style={{
- display: "flex",
- alignItems: "center",
- gap: 8,
- padding: "6px 10px",
- background: "var(--surface-warm)",
- border: "1px solid var(--border-soft)",
- borderRadius: "var(--r-md)",
- color: "var(--meta)",
- }}
- >
- <Search size={14} />
- <input
- type="text"
- placeholder={t("leftPanel.searchPlaceholder")}
- value={query}
- onChange={(e) => setQuery(e.target.value)}
- style={{
- flex: 1,
- border: 0,
- background: "transparent",
- outline: "none",
- font: "13px var(--font-body)",
- color: "var(--fg)",
- }}
- />
- {query ? (
- <button
- type="button"
- onClick={() => setQuery("")}
- aria-label={t("leftPanel.clearSearch")}
- style={{
- background: "transparent",
- border: 0,
- color: "var(--meta)",
- cursor: "pointer",
- }}
- >
- <X size={12} />
- </button>
- ) : null}
- </div>
- </div>
- <div className={styles.panelBody} style={{ padding: "4px var(--sp-3) 8px" }}>
- <MediaList
- assets={filtered}
- onOpenTranscript={setSrcTranscriptAsset}
- transcriptions={transcriptions}
- />
- </div>
- <button
- type="button"
- className={styles.importBtn}
- onClick={handleImport}
- disabled={!projectId || busy}
- >
- <Plus size={14} />
- {t("mediaStage.importMedia")}
- </button>
- {document?.transcript ? (
- <div
- style={{
- margin: "0 var(--sp-3) 8px",
- padding: "6px 10px",
- borderRadius: 999,
- background: "var(--success-soft)",
- color: "var(--success)",
- font: "500 11px/1 var(--font-mono)",
- letterSpacing: "0.04em",
- display: "inline-flex",
- alignItems: "center",
- gap: 6,
- }}
- >
- <span
- style={{
- width: 6,
- height: 6,
- borderRadius: "50%",
- background: "var(--success)",
- }}
- />
- {t("leftPanel.transcriptReadyBadge")}
- </div>
- ) : null}
- <SourceTranscriptModal
- open={srcTranscriptAsset !== null}
- onClose={() => setSrcTranscriptAsset(null)}
- assetLabel={srcTranscriptAsset?.label ?? ""}
- assetPath={srcTranscriptAsset?.originalPath ?? ""}
- tcFormatted={formatTimecode(srcTranscriptAsset?.durationSec)}
- transcript={
- srcTranscriptAsset && document?.transcripts
- ? (document.transcripts.find((t) => t.assetId === srcTranscriptAsset.id) ?? null)
- : null
- }
- isTranscribing={
- selectedTranscription?.status === "running" || selectedTranscription?.status === "queued"
- }
- isFailed={selectedTranscription?.status === "failed"}
- failureMessage={
- selectedTranscription?.failure
- ? selectedTranscription.failure.kind === "error"
- ? selectedTranscription.failure.message
- : t("mediaStage.noAudioTrackHint")
- : undefined
- }
- onRegenerate={(language) => {
- if (!srcTranscriptAsset) return Promise.resolve();
- return requestTranscription(srcTranscriptAsset.id, language);
- }}
- />
- </aside>
- );
-}
-
-export function LeftPanel({ active }: { active: LeftTab }) {
- return active === "chat" ? <ChatStripPanel /> : <MediaPane />;
-}
-
interface ChatDisplayMessage {
id?: string;
role: string;
@@ -726,7 +442,7 @@ function ThinkingBlock({
);
}
-function ChatStripPanel() {
+export function ChatStripPanel() {
const t = useScopedT("editor");
const tc = useScopedT("common");
// The Auto-enhance confirmation is timeline-owned copy, fired from here —
@@ -1967,34 +1683,3 @@ function ChatStripPanel() {
</aside>
);
}
-
-const RAIL_BUTTONS: Array<{ id: LeftTab; labelKey: string; icon: React.ElementType }> = [
- { id: "chat", labelKey: "leftRail.chat", icon: MessageSquare },
- { id: "media", labelKey: "leftRail.media", icon: Film },
-];
-
-export function LeftRail({
- active,
- onChange,
-}: {
- active: LeftTab;
- onChange: (id: LeftTab) => void;
-}) {
- const t = useScopedT("editor");
- return (
- <aside className={`${styles.rail} ${styles.leftRail}`} aria-label={t("leftRail.ariaLabel")}>
- {RAIL_BUTTONS.map(({ id, labelKey, icon: Icon }) => (
- <button
- type="button"
- key={id}
- title={t(labelKey)}
- aria-label={t(labelKey)}
- aria-pressed={active === id}
- onClick={() => onChange(id)}
- >
- <Icon size={18} />
- </button>
- ))}
- </aside>
- );
-}
diff --git a/src/components/ai-edition/Modals.tsx b/src/components/ai-edition/Modals.tsx
index 3be5687fd..aeab7b1fa 100644
--- a/src/components/ai-edition/Modals.tsx
+++ b/src/components/ai-edition/Modals.tsx
@@ -1,41 +1,15 @@
-import {
- AlertTriangle,
- Crop,
- FolderOpen,
- FolderPlus,
- Loader2,
- Maximize2,
- Pencil,
- Plus,
- RefreshCw,
- RotateCcw,
- Trash2,
- Triangle,
- X,
-} from "lucide-react";
+import { AlertTriangle, Crop, FolderOpen, FolderPlus, Pencil, Plus, Trash2, X } from "lucide-react";
import {
type ReactNode,
type PointerEvent as ReactPointerEvent,
useEffect,
- useMemo,
useRef,
useState,
} from "react";
-import { toFileUrl } from "@/components/video-editor/projectPersistence";
import type { CropRegion } from "@/components/video-editor/types";
-import { useI18n, useScopedT } from "@/contexts/I18nContext";
-import { toAxcutTranscriptDsl } from "@/lib/ai-edition/document/transcribe";
-import {
- type AxcutClip,
- type AxcutTranscript,
- type TranscriptLanguageCode,
- transcriptLanguageSchema,
-} from "@/lib/ai-edition/schema";
-import { formatSec, formatSeconds } from "@/lib/ai-edition/timeline/format";
-import {
- languageLabel,
- sortedLanguageOptions,
-} from "@/lib/ai-edition/transcription/languageLabels";
+import { useScopedT } from "@/contexts/I18nContext";
+import type { AxcutClip } from "@/lib/ai-edition/schema";
+import { formatSeconds } from "@/lib/ai-edition/timeline/format";
import styles from "./NewEditorShell.module.css";
import type { VideoSource } from "./VirtualPreview";
@@ -1516,472 +1490,6 @@ export function InsertSourceModal({
);
}
-/**
- * `AxcutTranscript.language` is `z.string().min(1)`, not validated against
- * the known code list, so a stored transcript can hold a value no
- * `<option>` matches — falls back to "auto" rather than letting the select
- * go visibly out of sync with the code a regenerate would actually submit.
- */
-function supportedTranscriptLanguage(language: string | undefined): TranscriptLanguageCode {
- const parsed = transcriptLanguageSchema.safeParse(language);
- return parsed.success ? parsed.data : "auto";
-}
-
-export interface SourceTranscriptModalProps extends BaseModalProps {
- assetLabel: string;
- assetPath: string;
- tcFormatted: string;
- transcript: AxcutTranscript | null;
- isTranscribing: boolean;
- isFailed: boolean;
- /** Why the last run produced nothing — "no audio track", or the engine's own message. */
- failureMessage?: string;
- onRegenerate: (language: TranscriptLanguageCode) => void;
-}
-
-export function SourceTranscriptModal({
- open,
- onClose,
- assetLabel,
- assetPath,
- tcFormatted,
- transcript,
- isTranscribing,
- isFailed,
- failureMessage,
- onRegenerate,
-}: SourceTranscriptModalProps) {
- const t = useScopedT("editor");
- const tc = useScopedT("common");
- const videoRef = useRef<HTMLVideoElement | null>(null);
- const [isPlaying, setIsPlaying] = useState(false);
- const [playTime, setPlayTime] = useState(0);
- const [duration, setDuration] = useState<number | null>(null);
- const { locale } = useI18n();
- const [regenLang, setRegenLang] = useState<TranscriptLanguageCode>(
- supportedTranscriptLanguage(transcript?.language),
- );
-
- // ponytail: sync the language picker to whatever the stored transcript was
- // generated with. Avoids surprising the user with a different selection on
- // every open after a regenerate.
- useEffect(() => {
- if (open) setRegenLang(supportedTranscriptLanguage(transcript?.language));
- }, [open, transcript?.language]);
-
- const regenLanguageOptions = useMemo(
- () => sortedLanguageOptions(locale, t("mediaStage.auto")),
- [locale, t],
- );
-
- useEffect(() => {
- if (!open) {
- setIsPlaying(false);
- setPlayTime(0);
- setDuration(null);
- const v = videoRef.current;
- if (v) {
- v.pause();
- v.currentTime = 0;
- }
- }
- }, [open]);
-
- const detectedLanguage =
- transcript?.language && transcript.language !== "auto" ? transcript.language : null;
-
- const statusLabel = isTranscribing
- ? t("mediaStage.generating")
- : isFailed
- ? t("mediaStage.generationFailed")
- : transcript
- ? t("mediaStage.generated")
- : t("mediaStage.notGeneratedYet");
-
- const transcriptBody = transcript
- ? toAxcutTranscriptDsl(transcript, assetLabel || undefined, duration ?? undefined)
- : null;
-
- const playLabel = isPlaying ? tc("playback.pause") : tc("playback.play");
-
- const togglePlay = () => {
- const v = videoRef.current;
- if (!v) return;
- if (v.paused) {
- // Same catch as VirtualPreview's: `play()` rejects on the autoplay policy
- // or when a new load interrupts it, and `isPlaying` is driven by the
- // element's own play/pause events — so a rejection leaves nothing to
- // reconcile, it just must not escape as an unhandled rejection.
- void v.play().catch(() => {
- // swallow: rejection just means playback never started
- });
- } else {
- v.pause();
- }
- };
-
- const restart = () => {
- const v = videoRef.current;
- if (!v) return;
- v.currentTime = 0;
- setPlayTime(0);
- };
-
- const requestFullscreen = () => {
- const v = videoRef.current;
- if (!v) return;
- // Rejects when the gesture isn't accepted or the element can't go fullscreen.
- // Nothing to reconcile — the document stays as it was.
- void v.requestFullscreen?.().catch(() => {
- // swallow: rejection just means we stayed windowed
- });
- };
-
- return (
- <ModalShell
- open={open}
- onClose={onClose}
- title={t("mediaStage.sourceTranscript")}
- subtitle={assetLabel}
- wide
- >
- <div
- style={{
- display: "grid",
- gridTemplateColumns: "minmax(220px, 320px) 1fr",
- gap: 14,
- }}
- >
- <div
- style={{
- position: "relative",
- aspectRatio: "16 / 9",
- borderRadius: "var(--r-md)",
- overflow: "hidden",
- background: "linear-gradient(135deg, #16171d, #16171d)",
- border: "1px solid var(--border)",
- }}
- >
- {assetPath ? (
- <video
- ref={videoRef}
- src={toFileUrl(assetPath)}
- style={{
- width: "100%",
- height: "100%",
- objectFit: "contain",
- background: "#16171d",
- }}
- preload="metadata"
- onLoadedMetadata={(e) => setDuration(e.currentTarget.duration)}
- onTimeUpdate={(e) => setPlayTime(e.currentTarget.currentTime)}
- onPlay={() => setIsPlaying(true)}
- onPause={() => setIsPlaying(false)}
- onEnded={() => setIsPlaying(false)}
- />
- ) : (
- <div
- style={{
- width: "100%",
- height: "100%",
- display: "grid",
- placeItems: "center",
- color: "var(--muted)",
- font: "500 12px var(--font-body)",
- }}
- >
- {t("mediaStage.noPreviewAvailable")}
- </div>
- )}
- <div
- style={{
- position: "absolute",
- left: 0,
- right: 0,
- bottom: 0,
- display: "flex",
- alignItems: "center",
- gap: 8,
- padding: "8px 10px",
- background: "linear-gradient(180deg, transparent, rgba(22,23,29,.55))",
- color: "#fff",
- }}
- >
- <button
- type="button"
- aria-label={playLabel}
- title={playLabel}
- onClick={togglePlay}
- style={{
- background: "transparent",
- border: 0,
- color: "inherit",
- cursor: "pointer",
- padding: 2,
- borderRadius: 4,
- display: "inline-flex",
- alignItems: "center",
- justifyContent: "center",
- }}
- >
- {isPlaying ? (
- <span style={{ display: "inline-flex", gap: 2 }}>
- <span
- style={{
- width: 4,
- height: 12,
- background: "currentColor",
- borderRadius: 1,
- }}
- />
- <span
- style={{
- width: 4,
- height: 12,
- background: "currentColor",
- borderRadius: 1,
- }}
- />
- </span>
- ) : (
- <Triangle size={12} fill="currentColor" style={{ transform: "rotate(0deg)" }} />
- )}
- </button>
- <button
- type="button"
- aria-label={t("mediaStage.restart")}
- title={t("mediaStage.restart")}
- onClick={restart}
- style={{
- background: "transparent",
- border: 0,
- color: "inherit",
- cursor: "pointer",
- padding: 2,
- borderRadius: 4,
- display: "inline-flex",
- alignItems: "center",
- justifyContent: "center",
- }}
- >
- <RotateCcw size={13} />
- </button>
- <button
- type="button"
- aria-label={tc("playback.fullscreen")}
- title={tc("playback.fullscreen")}
- onClick={requestFullscreen}
- style={{
- background: "transparent",
- border: 0,
- color: "inherit",
- cursor: "pointer",
- padding: 2,
- borderRadius: 4,
- display: "inline-flex",
- alignItems: "center",
- justifyContent: "center",
- }}
- >
- <Maximize2 size={13} />
- </button>
- <span
- style={{
- marginLeft: "auto",
- font: "500 12px/1 var(--font-mono)",
- display: "inline-flex",
- alignItems: "baseline",
- gap: 4,
- }}
- >
- <strong>{formatSec(playTime)}</strong>
- <i style={{ fontStyle: "normal", opacity: 0.55, margin: "0 2px" }}>/</i>
- <span style={{ opacity: 0.8 }}>{duration ? formatSec(duration) : tcFormatted}</span>
- </span>
- {isTranscribing ? (
- <span
- style={{
- width: 8,
- height: 8,
- borderRadius: "50%",
- background: "var(--accent)",
- boxShadow: "0 0 0 3px var(--accent-soft)",
- marginLeft: 6,
- }}
- aria-label={t("mediaStage.transcribing")}
- />
- ) : (
- <span
- style={{
- width: 8,
- height: 8,
- borderRadius: "50%",
- background: isFailed ? "var(--danger)" : "var(--danger)",
- boxShadow: isFailed
- ? "0 0 0 3px var(--danger-soft)"
- : "0 0 0 3px rgba(239, 68, 68, 0.2)",
- marginLeft: 6,
- }}
- aria-hidden
- />
- )}
- </div>
- </div>
- <div style={{ display: "flex", flexDirection: "column", gap: 12, minWidth: 0 }}>
- <div style={{ display: "flex", gap: 8, flexWrap: "wrap" }}>
- <span
- style={{
- display: "inline-flex",
- alignItems: "center",
- gap: 6,
- padding: "6px 12px",
- borderRadius: 999,
- background: isFailed ? "var(--danger-soft)" : "var(--success-soft)",
- color: isFailed ? "var(--danger)" : "var(--success)",
- font: "500 12px var(--font-body)",
- border: `1px solid color-mix(in srgb, ${isFailed ? "var(--danger)" : "var(--success)"} 22%, transparent)`,
- }}
- >
- {isTranscribing ? (
- <Loader2 size={11} className="animate-spin" />
- ) : (
- <span
- style={{
- width: 7,
- height: 7,
- borderRadius: "50%",
- background: isFailed ? "var(--danger)" : "var(--success)",
- }}
- />
- )}
- {statusLabel}
- </span>
- {detectedLanguage ? (
- <span
- style={{
- display: "inline-flex",
- alignItems: "center",
- padding: "6px 12px",
- borderRadius: 999,
- background: "var(--success-soft)",
- color: "var(--success)",
- font: "500 12px var(--font-body)",
- border: "1px solid color-mix(in srgb, var(--success) 22%, transparent)",
- }}
- >
- {t("mediaStage.detectedLanguage", {
- language: languageLabel(detectedLanguage, locale),
- })}
- </span>
- ) : null}
- </div>
- <div style={{ display: "flex", flexDirection: "column", gap: 6 }}>
- <label
- style={{
- font: "500 12px/1 var(--font-body)",
- color: "var(--muted)",
- }}
- >
- {t("mediaStage.regenerateAs")}
- </label>
- <div
- style={{
- display: "grid",
- gridTemplateColumns: "1fr auto",
- gap: 8,
- alignItems: "center",
- }}
- >
- <select
- aria-label={t("mediaStage.regenerateAs")}
- value={regenLang}
- disabled={isTranscribing}
- onChange={(e) => setRegenLang(e.target.value as TranscriptLanguageCode)}
- style={{
- width: "100%",
- padding: "10px 12px",
- borderRadius: "var(--r-md)",
- border: "1px solid var(--border)",
- background: "var(--surface)",
- color: "var(--fg)",
- font: "500 13px var(--font-body)",
- }}
- >
- {regenLanguageOptions.map(({ code, label }) => (
- <option key={code} value={code}>
- {label}
- </option>
- ))}
- </select>
- <button
- type="button"
- title={t("mediaStage.regenerate")}
- aria-label={t("mediaStage.regenerate")}
- disabled={isTranscribing}
- onClick={() => onRegenerate(regenLang)}
- style={{
- width: 38,
- height: 38,
- borderRadius: "var(--r-md)",
- border: "1px solid var(--border)",
- background: "var(--surface)",
- color: "var(--fg)",
- cursor: isTranscribing ? "not-allowed" : "pointer",
- display: "inline-flex",
- alignItems: "center",
- justifyContent: "center",
- opacity: isTranscribing ? 0.6 : 1,
- }}
- >
- {isTranscribing ? (
- <Loader2 size={15} className="animate-spin" />
- ) : (
- <RefreshCw size={15} />
- )}
- </button>
- </div>
- </div>
- </div>
- </div>
- {transcriptBody ? (
- <pre
- style={{
- margin: 0,
- padding: "14px 16px",
- borderRadius: "var(--r-md)",
- border: "1px solid var(--border)",
- background: "var(--surface-warm)",
- font: "400 12px/1.55 var(--font-mono)",
- color: "var(--fg)",
- whiteSpace: "pre",
- overflow: "auto",
- maxHeight: "38vh",
- }}
- >
- {transcriptBody}
- </pre>
- ) : (
- <div
- style={{
- padding: 32,
- textAlign: "center",
- color: "var(--muted)",
- font: "500 13px var(--font-body)",
- border: "1px dashed var(--border)",
- borderRadius: "var(--r-md)",
- }}
- >
- {isFailed
- ? (failureMessage ?? t("mediaStage.generationFailedHint"))
- : isTranscribing
- ? t("mediaStage.transcribingEllipsis")
- : t("mediaStage.notGeneratedHint")}
- </div>
- )}
- </ModalShell>
- );
-}
-
export interface ChatHistoryModalProps extends BaseModalProps {
sessions: Array<{ id: string; title: string; messageCount: number; createdAt: string }>;
activeSessionId: string | null;
diff --git a/src/components/ai-edition/NewEditorShell.module.css b/src/components/ai-edition/NewEditorShell.module.css
index c842a535a..878953342 100644
--- a/src/components/ai-edition/NewEditorShell.module.css
+++ b/src/components/ai-edition/NewEditorShell.module.css
@@ -19,7 +19,6 @@
.app[data-collapse~="left"] {
--panel-w-left: 0px;
}
-.app[data-collapse~="left"] .leftRail,
.app[data-collapse~="left"] .leftPanel,
.app[data-collapse~="left"] .handleLeft {
display: none;
@@ -260,55 +259,6 @@
min-height: 0;
}
-/* ─── rails — vertical icon strips ─────────────────────────────── */
-.rail {
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: var(--sp-1);
- padding: var(--sp-2) 0;
- background: var(--bg);
- min-width: 0;
-}
-.rail button {
- width: 36px;
- height: 36px;
- display: grid;
- place-items: center;
- border-radius: var(--r-md);
- color: var(--muted);
- background: transparent;
- border: 0;
- cursor: pointer;
- transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
- position: relative;
-}
-.rail button:hover {
- background: var(--surface-3);
- color: var(--fg);
-}
-.rail button[aria-pressed="true"] {
- color: var(--accent);
- background: var(--accent-soft);
-}
-.rail button[aria-pressed="true"]::before {
- content: "";
- position: absolute;
- left: -8px;
- top: 8px;
- bottom: 8px;
- width: 3px;
- border-radius: 2px;
- background: var(--accent);
-}
-.rail .sepH {
- width: 24px;
- height: 1px;
- background: var(--border);
- margin: var(--sp-1) 0;
-}
-
-/* ─── panels (chat, transcript, etc.) ──────────────────────────── */
.panel {
display: flex;
flex-direction: column;
@@ -327,43 +277,6 @@
.panel > .panelBody {
flex: 1 1 0;
}
-.panelHead {
- display: flex;
- align-items: center;
- gap: var(--sp-2);
- padding: var(--sp-3) var(--sp-4);
- border-bottom: 1px solid var(--border-soft);
- min-height: 44px;
-}
-.panelHead h2 {
- margin: 0;
- font-family: var(--font-display);
- font-size: 14px;
- font-weight: 500;
- letter-spacing: -0.005em;
- color: var(--fg);
-}
-.panelHead .right {
- margin-left: auto;
- display: inline-flex;
- gap: var(--sp-1);
-}
-.panelHead .iconBtn {
- width: 24px;
- height: 24px;
- display: grid;
- place-items: center;
- border-radius: var(--r-sm);
- color: var(--meta);
- background: transparent;
- border: 0;
- cursor: pointer;
- transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
-}
-.panelHead .iconBtn:hover {
- background: var(--surface-3);
- color: var(--fg-2);
-}
.panelBody {
overflow-y: auto;
padding: var(--sp-3) var(--sp-4);
@@ -1999,78 +1912,6 @@
box-shadow: 0 0 0 2px var(--accent-soft);
}
-/* ─── media card (left panel media list) ───────────────────────── */
-.mediaList {
- list-style: none;
- padding: 0;
- margin: 0;
- display: flex;
- flex-direction: column;
- gap: 10px;
-}
-.mediaCard {
- display: flex;
- flex-direction: column;
- border-radius: var(--r-md);
- overflow: hidden;
- border: 1px solid var(--border-soft);
- background: var(--bg);
- cursor: pointer;
- transition: border-color var(--motion-fast) var(--ease);
-}
-.mediaCard:hover { border-color: var(--brand); }
-.mediaCard .thumb {
- aspect-ratio: 16 / 9;
- display: flex;
- align-items: center;
- justify-content: center;
- color: rgba(255, 255, 255, 0.95);
-}
-.thumbRed { background: var(--danger); }
-.thumbGreen { background: var(--success); }
-.thumbAmber { background: var(--warn); }
-.thumbCyan { background: var(--accent); }
-.mediaMeta {
- padding: 8px 10px 10px;
- background: var(--surface-2);
- display: flex;
- flex-direction: column;
- gap: 2px;
-}
-.mediaMeta .name {
- font: var(--fs-app) var(--font-body);
- color: var(--fg);
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-.mediaMeta .row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 8px;
-}
-.mediaMeta .timecode { font: 11px var(--font-mono); color: var(--muted); }
-.mediaMeta .size { font: 11px var(--font-body); color: var(--muted); }
-
-.importBtn {
- margin: 8px var(--sp-3) 12px;
- padding: 10px 12px;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: var(--sp-2);
- border: 1px dashed var(--border-hi);
- border-radius: var(--r-md);
- background: transparent;
- color: var(--muted);
- font: var(--fs-app) var(--font-body);
- font-weight: 500;
- cursor: pointer;
-}
-.importBtn:hover { background: var(--surface-warm); color: var(--fg); border-color: var(--accent); }
-
-/* Custom range slider / progress bar */
.scrubBar {
flex: 1;
min-width: 0;
diff --git a/src/components/ai-edition/NewEditorShell.tsx b/src/components/ai-edition/NewEditorShell.tsx
index 64987dea9..b371d100c 100644
--- a/src/components/ai-edition/NewEditorShell.tsx
+++ b/src/components/ai-edition/NewEditorShell.tsx
@@ -32,7 +32,7 @@ import type { AiEditionProjectSummary } from "@/native/contracts";
import { resolveVisibleClips } from "@/native/sceneDescription";
import { useNativePlaybackSync } from "@/native/useNativePlaybackSync";
import { ExportDialog } from "./ExportDialog";
-import { LeftPanel } from "./LeftPanel";
+import { ChatStripPanel } from "./LeftPanel";
import {
EditClipModal,
NewProjectModal,
@@ -1191,7 +1191,7 @@ export function NewEditorShell() {
{mode === "edit" && chatOpen ? (
<>
<aside className={v4.agent} aria-label={te("shell.aiEditor")}>
- <LeftPanel active="chat" />
+ <ChatStripPanel />
</aside>
<div
className={v4.chatResizeHandle}
diff --git a/src/components/ai-edition/v4/MediaStage.tsx b/src/components/ai-edition/v4/MediaStage.tsx
index 81fd07ed8..a7af81acb 100644
--- a/src/components/ai-edition/v4/MediaStage.tsx
+++ b/src/components/ai-edition/v4/MediaStage.tsx
@@ -323,11 +323,9 @@ export function MediaStage({
{transcriptionLabel(selectedTranscription)}
</span>
{/* The language whisper resolved on the first chunk, which every later
- chunk was then pinned to. It had a pill in SourceTranscriptModal,
- but that lives under LeftPanel's `MediaPane` — and the only mount
- site is `<LeftPanel active="chat" />`, a literal, so it renders
- `ChatStripPanel` and nothing else. The value was reaching the
- document and being displayed nowhere. It belongs next to
+ chunk was then pinned to. Its only pill used to live in the v3 left
+ panel's transcript modal, which nothing mounted, so the value was
+ reaching the document and being displayed nowhere. It belongs next to
"Regenerate as" below in any case: that selector is the control
you set BECAUSE of what was detected. */}
{transcript?.language && transcript.language !== "auto" ? (
diff --git a/src/i18n/locales/ar/common.json b/src/i18n/locales/ar/common.json
index b63cd0265..bd04948e6 100644
--- a/src/i18n/locales/ar/common.json
+++ b/src/i18n/locales/ar/common.json
@@ -52,12 +52,6 @@
"failed": "تعذّر التحقق من وجود تحديثات.",
"downloadFailed": "تعذّر تنزيل التحديث."
},
- "playback": {
- "play": "تشغيل",
- "pause": "ايقاف مؤقت",
- "fullscreen": "ملء الشاشة",
- "exitFullscreen": "خروج من ملء الشاشة"
- },
"units": {
"pixelsPerSecond": "{{value}} بكسل/ثانية",
"pixels": "{{value}} بكسل"
diff --git a/src/i18n/locales/ar/editor.json b/src/i18n/locales/ar/editor.json
index 3bfe76664..39860c0da 100644
--- a/src/i18n/locales/ar/editor.json
+++ b/src/i18n/locales/ar/editor.json
@@ -138,7 +138,6 @@
"sourceTranscript": "نص المصدر",
"close": "إغلاق",
"transcriptReady": "النص جاهز",
- "notGeneratedYet": "لم يُنشأ بعد",
"regenerateAs": "إعادة الإنشاء بلغة",
"auto": "تلقائي",
"regenerate": "إعادة الإنشاء",
@@ -151,12 +150,7 @@
"transcriptionFailed": "فشل النسخ",
"cpuBackendHint": "يعمل على المعالج — أبطأ بنحو 2× من معالج الرسوميات",
"noTranscript": "لا يوجد نص مكتوب",
- "generating": "جارٍ الإنشاء",
- "generationFailed": "فشل الإنشاء",
- "generated": "تم الإنشاء",
"generationFailedHint": "فشل الإنشاء — اختر لغة وأعد الإنشاء.",
- "noPreviewAvailable": "لا تتوفر معاينة",
- "restart": "إعادة التشغيل",
"detectedLanguage": "اللغة المكتشفة: {{language}}",
"noAudioTrack": "لا يوجد مسار صوتي",
"noAudioTrackHint": "لا يحتوي هذا الملف على مسار صوتي — لا يوجد ما يمكن نسخه.",
@@ -213,18 +207,6 @@
"deleteRegion": "حذف المنطقة",
"freehandRendersAsBox": "الشكل الحر يُغطى بمستطيله المحيط في التصدير — تغطية زائدة، وليست ناقصة."
},
- "leftPanel": {
- "mediaTitle": "الوسائط",
- "searchPlaceholder": "بحث…",
- "clearSearch": "مسح البحث",
- "emptyHint": "لا توجد وسائط في هذا المشروع بعد. استورد فيديو أدناه.",
- "transcriptReadyBadge": "النص جاهز"
- },
- "leftRail": {
- "chat": "المحادثة",
- "media": "الوسائط",
- "ariaLabel": "الأدوات اليسرى"
- },
"chat": {
"changeProvider": "تغيير المزوّد",
"back": "رجوع",
diff --git a/src/i18n/locales/en/common.json b/src/i18n/locales/en/common.json
index 6eac95830..f718d6c45 100644
--- a/src/i18n/locales/en/common.json
+++ b/src/i18n/locales/en/common.json
@@ -52,12 +52,6 @@
"failed": "Could not check for updates.",
"downloadFailed": "Could not download the update."
},
- "playback": {
- "play": "Play",
- "pause": "Pause",
- "fullscreen": "Fullscreen",
- "exitFullscreen": "Exit Fullscreen"
- },
"units": {
"pixelsPerSecond": "{{value}} px/s",
"pixels": "{{value}} px"
diff --git a/src/i18n/locales/en/editor.json b/src/i18n/locales/en/editor.json
index 4c3dd14c3..7aa5954ce 100644
--- a/src/i18n/locales/en/editor.json
+++ b/src/i18n/locales/en/editor.json
@@ -145,18 +145,12 @@
"transcriptionFailed": "Transcription failed",
"cpuBackendHint": "Running on CPU — about 2× slower than on the GPU",
"noTranscript": "No transcript",
- "notGeneratedYet": "Not generated yet",
"regenerateAs": "Regenerate as",
"auto": "Auto",
"regenerate": "Regenerate",
"transcriptEmpty": "Transcript is empty.",
"notGeneratedHint": "Not generated yet — pick a language and click regenerate.",
- "generating": "Generating",
- "generationFailed": "Generation failed",
- "generated": "Generated",
"generationFailedHint": "Generation failed — pick a language and regenerate.",
- "noPreviewAvailable": "No preview available",
- "restart": "Restart",
"detectedLanguage": "Detected language: {{language}}",
"noAudioTrack": "No audio track",
"noAudioTrackHint": "This media has no audio track — there is nothing to transcribe.",
@@ -213,18 +207,6 @@
"deleteRegion": "Delete region",
"freehandRendersAsBox": "In the export, a freehand shape is covered by its bounding box — over-covered, never under."
},
- "leftPanel": {
- "mediaTitle": "Media",
- "searchPlaceholder": "Search…",
- "clearSearch": "Clear search",
- "emptyHint": "No media in this project yet. Import a video below.",
- "transcriptReadyBadge": "TRANSCRIPT READY"
- },
- "leftRail": {
- "chat": "Chat",
- "media": "Media",
- "ariaLabel": "Left tools"
- },
"chat": {
"changeProvider": "Change provider",
"back": "Back",
diff --git a/src/i18n/locales/es/common.json b/src/i18n/locales/es/common.json
index 29a364265..3900ed611 100644
--- a/src/i18n/locales/es/common.json
+++ b/src/i18n/locales/es/common.json
@@ -52,12 +52,6 @@
"failed": "No se pudieron buscar actualizaciones.",
"downloadFailed": "No se pudo descargar la actualización."
},
- "playback": {
- "play": "Reproducir",
- "pause": "Pausar",
- "fullscreen": "Pantalla completa",
- "exitFullscreen": "Salir de pantalla completa"
- },
"units": {
"pixelsPerSecond": "{{value}} píxeles/s",
"pixels": "{{value}} píxeles"
diff --git a/src/i18n/locales/es/editor.json b/src/i18n/locales/es/editor.json
index e2ef21429..4d10b36a6 100644
--- a/src/i18n/locales/es/editor.json
+++ b/src/i18n/locales/es/editor.json
@@ -138,7 +138,6 @@
"sourceTranscript": "Transcripción de la fuente",
"close": "Cerrar",
"transcriptReady": "Transcripción lista",
- "notGeneratedYet": "Aún no generada",
"regenerateAs": "Regenerar en",
"auto": "Auto",
"regenerate": "Regenerar",
@@ -151,12 +150,7 @@
"transcriptionFailed": "Error de transcripción",
"cpuBackendHint": "Ejecutándose en la CPU — unas 2× más lento que en la GPU",
"noTranscript": "Sin transcripción",
- "generating": "Generando",
- "generationFailed": "Error de generación",
- "generated": "Generado",
"generationFailedHint": "Error de generación — elige un idioma y vuelve a generar.",
- "noPreviewAvailable": "Vista previa no disponible",
- "restart": "Reiniciar",
"detectedLanguage": "Idioma detectado: {{language}}",
"noAudioTrack": "Sin pista de audio",
"noAudioTrackHint": "Este medio no tiene pista de audio: no hay nada que transcribir.",
@@ -213,18 +207,6 @@
"deleteRegion": "Eliminar región",
"freehandRendersAsBox": "En la exportación, una forma libre se cubre con su caja contenedora: cubre de más, nunca de menos."
},
- "leftPanel": {
- "mediaTitle": "Medios",
- "searchPlaceholder": "Buscar…",
- "clearSearch": "Borrar búsqueda",
- "emptyHint": "Aún no hay medios en este proyecto. Importa un vídeo a continuación.",
- "transcriptReadyBadge": "TRANSCRIPCIÓN LISTA"
- },
- "leftRail": {
- "chat": "Chat",
- "media": "Medios",
- "ariaLabel": "Herramientas izquierdas"
- },
"chat": {
"changeProvider": "Cambiar proveedor",
"back": "Atrás",
diff --git a/src/i18n/locales/fr/common.json b/src/i18n/locales/fr/common.json
index c74ef66b8..cf4f55c86 100644
--- a/src/i18n/locales/fr/common.json
+++ b/src/i18n/locales/fr/common.json
@@ -52,12 +52,6 @@
"failed": "Impossible de rechercher les mises à jour.",
"downloadFailed": "Impossible de télécharger la mise à jour."
},
- "playback": {
- "play": "Lecture",
- "pause": "Pause",
- "fullscreen": "Plein écran",
- "exitFullscreen": "Quitter le plein écran"
- },
"units": {
"pixelsPerSecond": "{{value}} pixels/s",
"pixels": "{{value}} pixels"
diff --git a/src/i18n/locales/fr/editor.json b/src/i18n/locales/fr/editor.json
index 61694c0d2..7a719ade2 100644
--- a/src/i18n/locales/fr/editor.json
+++ b/src/i18n/locales/fr/editor.json
@@ -138,7 +138,6 @@
"sourceTranscript": "Transcription de la source",
"close": "Fermer",
"transcriptReady": "Transcription prête",
- "notGeneratedYet": "Pas encore générée",
"regenerateAs": "Régénérer en",
"auto": "Auto",
"regenerate": "Régénérer",
@@ -151,12 +150,7 @@
"transcriptionFailed": "Échec de la transcription",
"cpuBackendHint": "Exécution sur le processeur — environ 2× plus lent que sur le GPU",
"noTranscript": "Aucune transcription",
- "generating": "Génération en cours",
- "generationFailed": "Échec de la génération",
- "generated": "Généré",
"generationFailedHint": "Échec de la génération — choisissez une langue et régénérez.",
- "noPreviewAvailable": "Aucun aperçu disponible",
- "restart": "Redémarrer",
"detectedLanguage": "Langue détectée : {{language}}",
"noAudioTrack": "Aucune piste audio",
"noAudioTrackHint": "Ce média n'a pas de piste audio — il n'y a rien à transcrire.",
@@ -213,18 +207,6 @@
"deleteRegion": "Supprimer la zone",
"freehandRendersAsBox": "À l'export, un tracé libre est couvert par sa boîte englobante — on couvre trop, jamais trop peu."
},
- "leftPanel": {
- "mediaTitle": "Médias",
- "searchPlaceholder": "Rechercher…",
- "clearSearch": "Effacer la recherche",
- "emptyHint": "Aucun média dans ce projet pour l'instant. Importez une vidéo ci-dessous.",
- "transcriptReadyBadge": "TRANSCRIPTION PRÊTE"
- },
- "leftRail": {
- "chat": "Chat",
- "media": "Médias",
- "ariaLabel": "Outils de gauche"
- },
"chat": {
"changeProvider": "Changer de fournisseur",
"back": "Retour",
diff --git a/src/i18n/locales/it/common.json b/src/i18n/locales/it/common.json
index 24f10fc61..27b410447 100644
--- a/src/i18n/locales/it/common.json
+++ b/src/i18n/locales/it/common.json
@@ -52,12 +52,6 @@
"failed": "Impossibile controllare gli aggiornamenti.",
"downloadFailed": "Impossibile scaricare l'aggiornamento."
},
- "playback": {
- "play": "Riproduci",
- "pause": "Pausa",
- "fullscreen": "Schermo intero",
- "exitFullscreen": "Esci dallo schermo intero"
- },
"units": {
"pixelsPerSecond": "{{value}} pixel/s",
"pixels": "{{value}} pixel"
diff --git a/src/i18n/locales/it/editor.json b/src/i18n/locales/it/editor.json
index 81603e049..70a680a7a 100644
--- a/src/i18n/locales/it/editor.json
+++ b/src/i18n/locales/it/editor.json
@@ -138,7 +138,6 @@
"sourceTranscript": "Trascrizione sorgente",
"close": "Chiudi",
"transcriptReady": "Trascrizione pronta",
- "notGeneratedYet": "Non ancora generata",
"regenerateAs": "Rigenera in",
"auto": "Auto",
"regenerate": "Rigenera",
@@ -151,12 +150,7 @@
"transcriptionFailed": "Trascrizione non riuscita",
"cpuBackendHint": "In esecuzione su CPU — circa 2× più lento che su GPU",
"noTranscript": "Nessuna trascrizione",
- "generating": "Generazione in corso",
- "generationFailed": "Generazione non riuscita",
- "generated": "Generato",
"generationFailedHint": "Generazione non riuscita — scegli una lingua e rigenera.",
- "noPreviewAvailable": "Anteprima non disponibile",
- "restart": "Riavvia",
"detectedLanguage": "Lingua rilevata: {{language}}",
"noAudioTrack": "Nessuna traccia audio",
"noAudioTrackHint": "Questo contenuto non ha una traccia audio: non c'è nulla da trascrivere.",
@@ -213,18 +207,6 @@
"deleteRegion": "Elimina regione",
"freehandRendersAsBox": "Nell'esportazione, una forma libera è coperta dal suo rettangolo di delimitazione: copre di più, mai di meno."
},
- "leftPanel": {
- "mediaTitle": "Contenuti multimediali",
- "searchPlaceholder": "Cerca…",
- "clearSearch": "Cancella ricerca",
- "emptyHint": "Nessun contenuto multimediale in questo progetto. Importa un video qui sotto.",
- "transcriptReadyBadge": "TRASCRIZIONE PRONTA"
- },
- "leftRail": {
- "chat": "Chat",
- "media": "Contenuti multimediali",
- "ariaLabel": "Strumenti a sinistra"
- },
"chat": {
"changeProvider": "Cambia provider",
"back": "Indietro",
diff --git a/src/i18n/locales/ja-JP/common.json b/src/i18n/locales/ja-JP/common.json
index 0d3ca001b..9a8266b5c 100644
--- a/src/i18n/locales/ja-JP/common.json
+++ b/src/i18n/locales/ja-JP/common.json
@@ -52,12 +52,6 @@
"failed": "アップデートを確認できませんでした。",
"downloadFailed": "アップデートをダウンロードできませんでした。"
},
- "playback": {
- "play": "再生",
- "pause": "一時停止",
- "fullscreen": "全画面表示",
- "exitFullscreen": "全画面表示を終了"
- },
"units": {
"pixelsPerSecond": "{{value}} px/秒",
"pixels": "{{value}} px"
diff --git a/src/i18n/locales/ja-JP/editor.json b/src/i18n/locales/ja-JP/editor.json
index d053b2fb3..bcbc57164 100644
--- a/src/i18n/locales/ja-JP/editor.json
+++ b/src/i18n/locales/ja-JP/editor.json
@@ -138,7 +138,6 @@
"sourceTranscript": "ソースの文字起こし",
"close": "閉じる",
"transcriptReady": "文字起こし完了",
- "notGeneratedYet": "まだ生成されていません",
"regenerateAs": "この言語で再生成",
"auto": "自動",
"regenerate": "再生成",
@@ -151,12 +150,7 @@
"transcriptionFailed": "文字起こしに失敗しました",
"cpuBackendHint": "CPU で実行中 — GPU より約 2 倍低速です",
"noTranscript": "文字起こしなし",
- "generating": "生成中",
- "generationFailed": "生成に失敗しました",
- "generated": "生成済み",
"generationFailedHint": "生成に失敗しました — 言語を選んで再生成してください。",
- "noPreviewAvailable": "プレビューがありません",
- "restart": "再生位置を先頭に戻す",
"detectedLanguage": "検出された言語: {{language}}",
"noAudioTrack": "音声トラックがありません",
"noAudioTrackHint": "このメディアには音声トラックがないため、文字起こしできません。",
@@ -213,18 +207,6 @@
"deleteRegion": "区間を削除",
"freehandRendersAsBox": "書き出しでは、フリーハンドの形は外接する矩形で覆われます。覆いすぎることはあっても、足りないことはありません。"
},
- "leftPanel": {
- "mediaTitle": "メディア",
- "searchPlaceholder": "検索…",
- "clearSearch": "検索をクリア",
- "emptyHint": "このプロジェクトにはまだメディアがありません。下から動画をインポートしてください。",
- "transcriptReadyBadge": "文字起こし準備完了"
- },
- "leftRail": {
- "chat": "チャット",
- "media": "メディア",
- "ariaLabel": "左側のツール"
- },
"chat": {
"changeProvider": "プロバイダーを変更",
"back": "戻る",
diff --git a/src/i18n/locales/ko-KR/common.json b/src/i18n/locales/ko-KR/common.json
index 98d025d9a..a525f3ac3 100644
--- a/src/i18n/locales/ko-KR/common.json
+++ b/src/i18n/locales/ko-KR/common.json
@@ -52,12 +52,6 @@
"failed": "업데이트를 확인할 수 없습니다.",
"downloadFailed": "업데이트를 다운로드하지 못했습니다."
},
- "playback": {
- "play": "재생",
- "pause": "일시정지",
- "fullscreen": "전체화면",
- "exitFullscreen": "전체화면 종료"
- },
"units": {
"pixelsPerSecond": "{{value}} px/초",
"pixels": "{{value}} px"
diff --git a/src/i18n/locales/ko-KR/editor.json b/src/i18n/locales/ko-KR/editor.json
index c45d8d74b..96e6c5339 100644
--- a/src/i18n/locales/ko-KR/editor.json
+++ b/src/i18n/locales/ko-KR/editor.json
@@ -138,7 +138,6 @@
"sourceTranscript": "소스 대본",
"close": "닫기",
"transcriptReady": "대본 준비 완료",
- "notGeneratedYet": "아직 생성되지 않음",
"regenerateAs": "다음 언어로 재생성",
"auto": "자동",
"regenerate": "재생성",
@@ -151,12 +150,7 @@
"transcriptionFailed": "받아쓰기 실패",
"cpuBackendHint": "CPU에서 실행 중 — GPU보다 약 2배 느립니다",
"noTranscript": "대본 없음",
- "generating": "생성 중",
- "generationFailed": "생성 실패",
- "generated": "생성됨",
"generationFailedHint": "생성 실패 — 언어를 선택하고 다시 생성하세요.",
- "noPreviewAvailable": "미리보기를 사용할 수 없습니다",
- "restart": "다시 시작",
"detectedLanguage": "감지된 언어: {{language}}",
"noAudioTrack": "오디오 트랙 없음",
"noAudioTrackHint": "이 미디어에는 오디오 트랙이 없어 받아쓸 내용이 없습니다.",
@@ -213,18 +207,6 @@
"deleteRegion": "구간 삭제",
"freehandRendersAsBox": "내보내기에서 자유형 도형은 외곽 사각형으로 덮입니다. 더 많이 덮되, 부족하게 덮지는 않습니다."
},
- "leftPanel": {
- "mediaTitle": "미디어",
- "searchPlaceholder": "검색…",
- "clearSearch": "검색 지우기",
- "emptyHint": "이 프로젝트에는 아직 미디어가 없습니다. 아래에서 동영상을 가져오세요.",
- "transcriptReadyBadge": "대본 준비 완료"
- },
- "leftRail": {
- "chat": "채팅",
- "media": "미디어",
- "ariaLabel": "왼쪽 도구"
- },
"chat": {
"changeProvider": "제공업체 변경",
"back": "뒤로",
diff --git a/src/i18n/locales/pt-BR/common.json b/src/i18n/locales/pt-BR/common.json
index d74e5b215..385b79feb 100644
--- a/src/i18n/locales/pt-BR/common.json
+++ b/src/i18n/locales/pt-BR/common.json
@@ -52,12 +52,6 @@
"failed": "Não foi possível verificar atualizações.",
"downloadFailed": "Não foi possível baixar a atualização."
},
- "playback": {
- "play": "Play",
- "pause": "Pause",
- "fullscreen": "Tela Cheia",
- "exitFullscreen": "Sair da Tela Cheia"
- },
"units": {
"pixelsPerSecond": "{{value}} pixels/s",
"pixels": "{{value}} pixels"
diff --git a/src/i18n/locales/pt-BR/editor.json b/src/i18n/locales/pt-BR/editor.json
index 5551edf96..e5f828d3c 100644
--- a/src/i18n/locales/pt-BR/editor.json
+++ b/src/i18n/locales/pt-BR/editor.json
@@ -138,7 +138,6 @@
"sourceTranscript": "Transcrição da Fonte",
"close": "Fechar",
"transcriptReady": "Transcrição pronta",
- "notGeneratedYet": "Ainda não gerada",
"regenerateAs": "Regenerar em",
"auto": "Automático",
"regenerate": "Regenerar",
@@ -151,12 +150,7 @@
"transcriptionFailed": "Falha na transcrição",
"cpuBackendHint": "Executando na CPU — cerca de 2× mais lento do que na GPU",
"noTranscript": "Sem transcrição",
- "generating": "Gerando",
- "generationFailed": "Falha na geração",
- "generated": "Gerado",
"generationFailedHint": "Falha na geração — escolha um idioma e gere novamente.",
- "noPreviewAvailable": "Pré-visualização indisponível",
- "restart": "Reiniciar",
"detectedLanguage": "Idioma detectado: {{language}}",
"noAudioTrack": "Sem faixa de áudio",
"noAudioTrackHint": "Esta mídia não tem faixa de áudio — não há nada para transcrever.",
@@ -213,18 +207,6 @@
"deleteRegion": "Excluir região",
"freehandRendersAsBox": "Na exportação, uma forma livre é coberta pela sua caixa delimitadora — cobre demais, nunca de menos."
},
- "leftPanel": {
- "mediaTitle": "Mídia",
- "searchPlaceholder": "Pesquisar…",
- "clearSearch": "Limpar pesquisa",
- "emptyHint": "Ainda não há mídia neste projeto. Importe um vídeo abaixo.",
- "transcriptReadyBadge": "TRANSCRIÇÃO PRONTA"
- },
- "leftRail": {
- "chat": "Chat",
- "media": "Mídia",
- "ariaLabel": "Ferramentas à esquerda"
- },
"chat": {
"changeProvider": "Trocar provedor",
"back": "Voltar",
diff --git a/src/i18n/locales/ru/common.json b/src/i18n/locales/ru/common.json
index 141e8b984..9706151bd 100644
--- a/src/i18n/locales/ru/common.json
+++ b/src/i18n/locales/ru/common.json
@@ -52,12 +52,6 @@
"failed": "Не удалось проверить наличие обновлений.",
"downloadFailed": "Не удалось загрузить обновление."
},
- "playback": {
- "play": "Воспроизвести",
- "pause": "Пауза",
- "fullscreen": "Полный экран",
- "exitFullscreen": "Выход из полного экрана"
- },
"units": {
"pixelsPerSecond": "{{value}} пикс/с",
"pixels": "{{value}} пикс"
diff --git a/src/i18n/locales/ru/editor.json b/src/i18n/locales/ru/editor.json
index e6eeae171..4abdc63f3 100644
--- a/src/i18n/locales/ru/editor.json
+++ b/src/i18n/locales/ru/editor.json
@@ -138,7 +138,6 @@
"sourceTranscript": "Транскрипт источника",
"close": "Закрыть",
"transcriptReady": "Транскрипт готов",
- "notGeneratedYet": "Ещё не создан",
"regenerateAs": "Пересоздать на",
"auto": "Авто",
"regenerate": "Пересоздать",
@@ -151,12 +150,7 @@
"transcriptionFailed": "Ошибка расшифровки",
"cpuBackendHint": "Выполняется на процессоре — примерно в 2× медленнее, чем на GPU",
"noTranscript": "Нет расшифровки",
- "generating": "Создание",
- "generationFailed": "Ошибка создания",
- "generated": "Создано",
"generationFailedHint": "Ошибка создания — выберите язык и создайте заново.",
- "noPreviewAvailable": "Предпросмотр недоступен",
- "restart": "Перезапустить",
"detectedLanguage": "Обнаруженный язык: {{language}}",
"noAudioTrack": "Нет аудиодорожки",
"noAudioTrackHint": "В этом медиафайле нет аудиодорожки — расшифровывать нечего.",
@@ -213,18 +207,6 @@
"deleteRegion": "Удалить участок",
"freehandRendersAsBox": "При экспорте произвольная форма закрывается своим ограничивающим прямоугольником — с запасом, а не с недостатком."
},
- "leftPanel": {
- "mediaTitle": "Медиа",
- "searchPlaceholder": "Поиск…",
- "clearSearch": "Очистить поиск",
- "emptyHint": "В этом проекте пока нет медиафайлов. Импортируйте видео ниже.",
- "transcriptReadyBadge": "РАСШИФРОВКА ГОТОВА"
- },
- "leftRail": {
- "chat": "Чат",
- "media": "Медиа",
- "ariaLabel": "Левые инструменты"
- },
"chat": {
"changeProvider": "Сменить провайдера",
"back": "Назад",
diff --git a/src/i18n/locales/tr/common.json b/src/i18n/locales/tr/common.json
index 923079b1e..08deaaecb 100644
--- a/src/i18n/locales/tr/common.json
+++ b/src/i18n/locales/tr/common.json
@@ -52,12 +52,6 @@
"failed": "Güncellemeler denetlenemedi.",
"downloadFailed": "Güncelleme indirilemedi."
},
- "playback": {
- "play": "Oynat",
- "pause": "Duraklat",
- "fullscreen": "Tam Ekran",
- "exitFullscreen": "Tam Ekrandan Çık"
- },
"units": {
"pixelsPerSecond": "{{value}} piks/sn",
"pixels": "{{value}} piks"
diff --git a/src/i18n/locales/tr/editor.json b/src/i18n/locales/tr/editor.json
index 555fc7de0..d4bb46a10 100644
--- a/src/i18n/locales/tr/editor.json
+++ b/src/i18n/locales/tr/editor.json
@@ -138,7 +138,6 @@
"sourceTranscript": "Kaynak Metin Dökümü",
"close": "Kapat",
"transcriptReady": "Metin dökümü hazır",
- "notGeneratedYet": "Henüz oluşturulmadı",
"regenerateAs": "Şu dilde yeniden oluştur",
"auto": "Otomatik",
"regenerate": "Yeniden oluştur",
@@ -151,12 +150,7 @@
"transcriptionFailed": "Metne dökme başarısız oldu",
"cpuBackendHint": "CPU üzerinde çalışıyor — GPU'ya göre yaklaşık 2× daha yavaş",
"noTranscript": "Transkript yok",
- "generating": "Oluşturuluyor",
- "generationFailed": "Oluşturma başarısız oldu",
- "generated": "Oluşturuldu",
"generationFailedHint": "Oluşturma başarısız oldu — bir dil seçip yeniden oluşturun.",
- "noPreviewAvailable": "Önizleme kullanılamıyor",
- "restart": "Yeniden başlat",
"detectedLanguage": "Algılanan dil: {{language}}",
"noAudioTrack": "Ses parçası yok",
"noAudioTrackHint": "Bu medyada ses parçası yok — metne dökülecek bir şey bulunmuyor.",
@@ -213,18 +207,6 @@
"deleteRegion": "Bölgeyi sil",
"freehandRendersAsBox": "Dışa aktarmada serbest çizim, sınırlayıcı dikdörtgeniyle kapatılır — eksik değil, fazla kapatır."
},
- "leftPanel": {
- "mediaTitle": "Medya",
- "searchPlaceholder": "Ara…",
- "clearSearch": "Aramayı temizle",
- "emptyHint": "Bu projede henüz medya yok. Aşağıdan bir video içe aktarın.",
- "transcriptReadyBadge": "TRANSKRİPT HAZIR"
- },
- "leftRail": {
- "chat": "Sohbet",
- "media": "Medya",
- "ariaLabel": "Sol araçlar"
- },
"chat": {
"changeProvider": "Sağlayıcıyı değiştir",
"back": "Geri",
diff --git a/src/i18n/locales/vi/common.json b/src/i18n/locales/vi/common.json
index 089cf992a..b6fdc3c16 100644
--- a/src/i18n/locales/vi/common.json
+++ b/src/i18n/locales/vi/common.json
@@ -52,12 +52,6 @@
"failed": "Không thể kiểm tra bản cập nhật.",
"downloadFailed": "Không thể tải xuống bản cập nhật."
},
- "playback": {
- "play": "Phát",
- "pause": "Tạm dừng",
- "fullscreen": "Toàn màn hình",
- "exitFullscreen": "Thoát toàn màn hình"
- },
"units": {
"pixelsPerSecond": "{{value}} px/giây",
"pixels": "{{value}} px"
diff --git a/src/i18n/locales/vi/editor.json b/src/i18n/locales/vi/editor.json
index 17db6ec4b..6f55d77a5 100644
--- a/src/i18n/locales/vi/editor.json
+++ b/src/i18n/locales/vi/editor.json
@@ -138,7 +138,6 @@
"sourceTranscript": "Bản ghi lời thoại nguồn",
"close": "Đóng",
"transcriptReady": "Bản ghi lời thoại đã sẵn sàng",
- "notGeneratedYet": "Chưa được tạo",
"regenerateAs": "Tạo lại bằng",
"auto": "Tự động",
"regenerate": "Tạo lại",
@@ -151,12 +150,7 @@
"transcriptionFailed": "Phiên âm thất bại",
"cpuBackendHint": "Đang chạy trên CPU — chậm hơn khoảng 2× so với GPU",
"noTranscript": "Không có bản ghi lời thoại",
- "generating": "Đang tạo",
- "generationFailed": "Tạo thất bại",
- "generated": "Đã tạo",
"generationFailedHint": "Tạo thất bại — chọn ngôn ngữ và tạo lại.",
- "noPreviewAvailable": "Không có bản xem trước",
- "restart": "Bắt đầu lại",
"detectedLanguage": "Ngôn ngữ phát hiện: {{language}}",
"noAudioTrack": "Không có bản âm thanh",
"noAudioTrackHint": "Media này không có bản âm thanh — không có gì để phiên âm.",
@@ -213,18 +207,6 @@
"deleteRegion": "Xóa vùng",
"freehandRendersAsBox": "Khi xuất, hình vẽ tay được che bằng khung bao của nó — che dư, không bao giờ che thiếu."
},
- "leftPanel": {
- "mediaTitle": "Media",
- "searchPlaceholder": "Tìm kiếm…",
- "clearSearch": "Xóa tìm kiếm",
- "emptyHint": "Chưa có media nào trong dự án này. Nhập video bên dưới.",
- "transcriptReadyBadge": "BẢN GHI LỜI THOẠI ĐÃ SẴN SÀNG"
- },
- "leftRail": {
- "chat": "Trò chuyện",
- "media": "Media",
- "ariaLabel": "Công cụ bên trái"
- },
"chat": {
"changeProvider": "Đổi nhà cung cấp",
"back": "Quay lại",
diff --git a/src/i18n/locales/zh-CN/common.json b/src/i18n/locales/zh-CN/common.json
index 0a7b2bd9b..01e9e9339 100644
--- a/src/i18n/locales/zh-CN/common.json
+++ b/src/i18n/locales/zh-CN/common.json
@@ -52,12 +52,6 @@
"failed": "无法检查更新。",
"downloadFailed": "无法下载更新。"
},
- "playback": {
- "play": "播放",
- "pause": "暂停",
- "fullscreen": "全屏",
- "exitFullscreen": "退出全屏"
- },
"units": {
"pixelsPerSecond": "{{value}} 像素/秒",
"pixels": "{{value}} 像素"
diff --git a/src/i18n/locales/zh-CN/editor.json b/src/i18n/locales/zh-CN/editor.json
index de7e52b55..dcfeb282b 100644
--- a/src/i18n/locales/zh-CN/editor.json
+++ b/src/i18n/locales/zh-CN/editor.json
@@ -138,7 +138,6 @@
"sourceTranscript": "来源转录文本",
"close": "关闭",
"transcriptReady": "转录已就绪",
- "notGeneratedYet": "尚未生成",
"regenerateAs": "重新生成为",
"auto": "自动",
"regenerate": "重新生成",
@@ -151,12 +150,7 @@
"transcriptionFailed": "转录失败",
"cpuBackendHint": "正在使用 CPU 运行 — 比 GPU 慢约 2 倍",
"noTranscript": "没有转录文本",
- "generating": "正在生成",
- "generationFailed": "生成失败",
- "generated": "已生成",
"generationFailedHint": "生成失败 — 选择语言并重新生成。",
- "noPreviewAvailable": "无法预览",
- "restart": "重新开始",
"detectedLanguage": "检测到的语言:{{language}}",
"noAudioTrack": "无音频轨道",
"noAudioTrackHint": "此媒体没有音频轨道,没有可转录的内容。",
@@ -213,18 +207,6 @@
"deleteRegion": "删除区间",
"freehandRendersAsBox": "导出时,手绘形状会以其外接矩形遮挡——宁可多遮,绝不少遮。"
},
- "leftPanel": {
- "mediaTitle": "媒体",
- "searchPlaceholder": "搜索…",
- "clearSearch": "清除搜索",
- "emptyHint": "此项目中还没有媒体。请在下方导入视频。",
- "transcriptReadyBadge": "转录已就绪"
- },
- "leftRail": {
- "chat": "聊天",
- "media": "媒体",
- "ariaLabel": "左侧工具"
- },
"chat": {
"changeProvider": "更换提供方",
"back": "返回",
diff --git a/src/i18n/locales/zh-TW/common.json b/src/i18n/locales/zh-TW/common.json
index c54dc17ed..abb92e1c8 100644
--- a/src/i18n/locales/zh-TW/common.json
+++ b/src/i18n/locales/zh-TW/common.json
@@ -52,12 +52,6 @@
"failed": "無法檢查更新。",
"downloadFailed": "無法下載更新。"
},
- "playback": {
- "play": "播放",
- "pause": "暫停",
- "fullscreen": "全螢幕",
- "exitFullscreen": "退出全螢幕"
- },
"units": {
"pixelsPerSecond": "{{value}} 像素/秒",
"pixels": "{{value}} 像素"
diff --git a/src/i18n/locales/zh-TW/editor.json b/src/i18n/locales/zh-TW/editor.json
index f567810a5..4893e4caf 100644
--- a/src/i18n/locales/zh-TW/editor.json
+++ b/src/i18n/locales/zh-TW/editor.json
@@ -138,7 +138,6 @@
"sourceTranscript": "來源逐字稿",
"close": "關閉",
"transcriptReady": "逐字稿已就緒",
- "notGeneratedYet": "尚未產生",
"regenerateAs": "以此語言重新產生",
"auto": "自動",
"regenerate": "重新產生",
@@ -151,12 +150,7 @@
"transcriptionFailed": "轉錄失敗",
"cpuBackendHint": "正在使用 CPU 執行 — 比 GPU 慢約 2 倍",
"noTranscript": "沒有逐字稿",
- "generating": "產生中",
- "generationFailed": "產生失敗",
- "generated": "已產生",
"generationFailedHint": "產生失敗 — 選擇語言並重新產生。",
- "noPreviewAvailable": "無法預覽",
- "restart": "重新開始",
"detectedLanguage": "偵測到的語言:{{language}}",
"noAudioTrack": "無音訊軌道",
"noAudioTrackHint": "此媒體沒有音訊軌道,沒有可轉錄的內容。",
@@ -213,18 +207,6 @@
"deleteRegion": "刪除區間",
"freehandRendersAsBox": "匯出時,手繪形狀會以其外接矩形遮蔽——寧可多遮,絕不少遮。"
},
- "leftPanel": {
- "mediaTitle": "媒體",
- "searchPlaceholder": "搜尋…",
- "clearSearch": "清除搜尋",
- "emptyHint": "此專案中尚無媒體。請在下方匯入影片。",
- "transcriptReadyBadge": "逐字稿已就緒"
- },
- "leftRail": {
- "chat": "聊天",
- "media": "媒體",
- "ariaLabel": "左側工具"
- },
"chat": {
"changeProvider": "更換提供者",
"back": "返回",
diff --git a/src/lib/ai-edition/document/transcribe.test.ts b/src/lib/ai-edition/document/transcribe.test.ts
index 72dc8d00b..18857ed29 100644
--- a/src/lib/ai-edition/document/transcribe.test.ts
+++ b/src/lib/ai-edition/document/transcribe.test.ts
@@ -1,6 +1,6 @@
import { describe, expect, it, vi } from "vitest";
import { type AxcutDocument, type AxcutTranscript, axcutSchemaVersion } from "../schema";
-import { toAxcutTranscriptDsl, transcribeAsset } from "./transcribe";
+import { transcribeAsset } from "./transcribe";
vi.mock("@/components/video-editor/projectPersistence", () => ({
toFileUrl: (path: string) => `file://${path}`,
@@ -53,77 +53,6 @@ function makeDoc(): AxcutDocument {
};
}
-describe("toAxcutTranscriptDsl", () => {
- it("emits the AXCUT_TRANSCRIPT v1 header + META + segments + words", () => {
- const transcript: AxcutTranscript = {
- assetId: "asset_1",
- language: "en",
- segments: [
- {
- id: "seg_1",
- kind: "speech",
- startSec: 0,
- endSec: 1.2,
- text: "okay so let's",
- wordIds: ["word_1", "word_2", "word_3"],
- },
- ],
- words: [
- { id: "word_1", segmentId: "seg_1", startSec: 0, endSec: 0.4, text: "okay" },
- { id: "word_2", segmentId: "seg_1", startSec: 0.4, endSec: 0.7, text: "so" },
- { id: "word_3", segmentId: "seg_1", startSec: 0.7, endSec: 1.2, text: "let's" },
- ],
- };
-
- const dsl = toAxcutTranscriptDsl(transcript, "demo.mp4", 1.2);
- const lines = dsl.split("\n");
-
- expect(lines[0]).toBe("AXCUT_TRANSCRIPT v1");
- expect(lines[1]).toBe(
- 'META source_video="demo.mp4" duration=1.200 language="en" kind="source"',
- );
- expect(lines).toContain(`SEGMENT id=s0001 start=0.000 end=1.200 text="okay so let''s"`);
- expect(lines).toContain('WORD id=w000001 segment=s0001 start=0.000 end=0.400 text="okay"');
- expect(lines).toContain('WORD id=w000002 segment=s0001 start=0.400 end=0.700 text="so"');
- expect(lines).toContain(`WORD id=w000003 segment=s0001 start=0.700 end=1.200 text="let''s"`);
- expect(lines.at(-1)).toBe("ENDSEGMENT");
- });
-
- it("escapes quotes in segment/word text (both kinds)", () => {
- const transcript: AxcutTranscript = {
- assetId: "asset_1",
- language: "auto",
- segments: [
- {
- id: "seg_1",
- kind: "speech",
- startSec: 0,
- endSec: 1,
- text: 'he said "hi"',
- wordIds: ["word_1"],
- },
- ],
- words: [{ id: "word_1", segmentId: "seg_1", startSec: 0, endSec: 1, text: "let's" }],
- };
-
- const dsl = toAxcutTranscriptDsl(transcript);
- expect(dsl).toContain(`text="he said ""hi"""`);
- expect(dsl).toContain(`text="let''s"`);
- });
-
- it("omits duration when not provided", () => {
- const transcript: AxcutTranscript = {
- assetId: "asset_1",
- language: "fr",
- segments: [],
- words: [],
- };
-
- const dsl = toAxcutTranscriptDsl(transcript, "x.mp4");
- expect(dsl).toBe('AXCUT_TRANSCRIPT v1\nMETA source_video="x.mp4" language="fr" kind="source"');
- });
-});
-
describe("transcribeAsset language handling", () => {
it("forwards a forced language to the worker and stores it on the transcript", async () => {
transcribeMock.mockResolvedValueOnce({
diff --git a/src/lib/ai-edition/document/transcribe.ts b/src/lib/ai-edition/document/transcribe.ts
index d0e587e6a..04d170718 100644
--- a/src/lib/ai-edition/document/transcribe.ts
+++ b/src/lib/ai-edition/document/transcribe.ts
@@ -122,52 +122,6 @@ export async function transcribeAsset(
};
}
-// ponytail: emit the upstream `AXCUT_TRANSCRIPT v1` plain-text DSL for display
-// in the Source Transcript modal. Mirrors `axcut_core/dsl.py` just enough for
-// the modal's <pre> body — a small segment/word loop, no Python needed. The
-// runtime still uses the structured `AxcutTranscript`; this string is the
-// "what the user reads" view of the same data.
-// Escape both single and double quotes — the DSL wraps every string in
-// double quotes and uses SQL/Python-style `''` doubling for an embedded
-// single quote.
-function escapeDslString(s: string): string {
- return s.replace(/"/g, '""').replace(/'/g, "''");
-}
-
-export function toAxcutTranscriptDsl(
- transcript: AxcutTranscript,
- sourceLabel?: string,
- durationSec?: number,
-): string {
- const lines: string[] = ["AXCUT_TRANSCRIPT v1"];
- const meta: string[] = [];
- if (sourceLabel) meta.push(`source_video="${sourceLabel}"`);
- if (typeof durationSec === "number" && Number.isFinite(durationSec)) {
- meta.push(`duration=${durationSec.toFixed(3)}`);
- }
- meta.push(`language="${transcript.language || "auto"}"`, `kind="source"`);
- lines.push(`META ${meta.join(" ")}`);
-
- const segIndexById = new Map<string, number>();
- transcript.segments.forEach((seg, i) => segIndexById.set(seg.id, i + 1));
-
- for (const seg of transcript.segments) {
- lines.push(
- `SEGMENT id=s${String(segIndexById.get(seg.id) ?? 0).padStart(4, "0")} start=${seg.startSec.toFixed(3)} end=${seg.endSec.toFixed(3)} text="${escapeDslString(seg.text)}"`,
- );
- for (const wordId of seg.wordIds) {
- const word = transcript.words.find((w) => w.id === wordId);
- if (!word) continue;
- const wSegIdx = segIndexById.get(word.segmentId) ?? 0;
- lines.push(
- `WORD id=w${String(transcript.words.indexOf(word) + 1).padStart(6, "0")} segment=s${String(wSegIdx).padStart(4, "0")} start=${word.startSec.toFixed(3)} end=${word.endSec.toFixed(3)} text="${escapeDslString(word.text)}"`,
- );
- }
- lines.push("ENDSEGMENT");
- }
- return lines.join("\n");
-}
-
export function withTranscript(
document: AxcutDocument,
transcript: AxcutTranscript,
diff --git a/src/lib/ai-edition/timeline/format.test.ts b/src/lib/ai-edition/timeline/format.test.ts
index df4289e97..fc1d068d8 100644
--- a/src/lib/ai-edition/timeline/format.test.ts
+++ b/src/lib/ai-edition/timeline/format.test.ts
@@ -62,9 +62,9 @@ describe("formatMs", () => {
});
});
-// Exported so LeftPanel's `formatTimecode` (h:mm:ss.t, a third shape that formats
-// itself) shares the carry instead of re-deriving it. Pinned here because that
-// caller has no test of its own.
+// Both formatters above depend on this carry, so it is pinned directly: a
+// regression reads as one failing case here rather than as two failing format
+// assertions that don't say why.
describe("splitRoundedTime", () => {
it("carries a second that rounds up to 60 into the minute field", () => {
expect(splitRoundedTime(59.96)).toEqual({ totalMinutes: 1, seconds: 0 });
diff --git a/src/lib/ai-edition/timeline/format.ts b/src/lib/ai-edition/timeline/format.ts
index eeac5cd08..bd6d99a61 100644
--- a/src/lib/ai-edition/timeline/format.ts
+++ b/src/lib/ai-edition/timeline/format.ts
@@ -8,9 +8,7 @@
//
// Not covered here, deliberately: ExportDialog's `formatHms` (hh:mm:ss, always
// padded hours, no tenths) and timeUtils' `formatTimePadded` (mm:ss) are
-// different formats, not copies of these. LeftPanel's `formatTimecode`
-// (h:mm:ss.t, hours always shown) is a third format for the same reason — it
-// stays local, but it shares `splitRoundedTime` so the carry lives in one place.
+// different formats, not copies of these.
/**
* Rounds to a tenth and carries the result, so the minute and second fields can
@@ -18,9 +16,9 @@
* `0:60.0` renderable: at 59.96 the minutes field still saw 59.96 while the
* seconds field had already rounded to 60.0.
*
- * Exported for the one formatter that lives outside this file (LeftPanel's
- * `formatTimecode`) — its always-padded `h:mm:ss.t` matches neither shape here,
- * so it formats itself, but it must not re-derive the carry.
+ * Exported so the carry can be pinned directly (see format.test.ts): both
+ * formatters below depend on it, and a regression here is easier to read as a
+ * failing `splitRoundedTime` case than as two failing format assertions.
*/
export function splitRoundedTime(value: number): { totalMinutes: number; seconds: number } {
const safe = Number.isFinite(value) && value > 0 ? value : 0;
diff --git a/technical-documentation/architecture/decisions.md b/technical-documentation/architecture/decisions.md
index 96d97bff1..d3805cc4f 100644
--- a/technical-documentation/architecture/decisions.md
+++ b/technical-documentation/architecture/decisions.md
@@ -57,3 +57,4 @@ behaviour lives now.
| `BackgroundPane`, and the `"background"` inspector facet | the **Background** section of `VideoEffectsPane` (`src/components/ai-edition/RightPanes.tsx`). Four of the five "effects" controls were background controls — the blur blurs it, the shadow falls on it, roundness and padding exist to let it show through — so the split put the answer to "how do I remove the background" in the tab that doesn't say background ([#84](https://github.com/getopenscreen/openscreen/issues/84)). |
| The browser-based exporter | the native compositor export path — see [export-pipeline.md](export-pipeline.md) |
| CTranslate2 speech-to-text | whisper.cpp — see [transcription-and-captions.md](transcription-and-captions.md) |
+| `LeftRail`, and `LeftPanel`'s `MediaPane` branch (with `MediaList` and `SourceTranscriptModal`) | the Media/Edit/Rec mode switch in `src/components/ai-edition/v4/EditorTopBar.tsx` and the stage it selects, `src/components/ai-edition/v4/MediaStage.tsx`. The v4 refactor (`03972b0e`) moved the Chat/Media choice from a left rail into the top bar and stopped rendering `LeftRail`, pinning the sole `LeftPanel` mount to the literal `active="chat"` — but left the `media` half in the tree. Unreachable code that still *looks* live attracts fixes: two later commits (`493c7917`, `05eb06b4`) landed language-picker work on `SourceTranscriptModal` before anyone noticed no user could open it. `LeftPanel` is gone too — `ChatStripPanel`, the only branch that ever ran, is now exported and mounted directly. |
diff --git a/technical-documentation/architecture/editor-shell.md b/technical-documentation/architecture/editor-shell.md
index c2efb4297..70974f3f4 100644
--- a/technical-documentation/architecture/editor-shell.md
+++ b/technical-documentation/architecture/editor-shell.md
@@ -16,7 +16,7 @@ colours.
flowchart TD
Shell["NewEditorShell<br/>(NewEditorShell.tsx)"]
TopBar["EditorTopBar<br/>(v4/EditorTopBar.tsx)"]
- Chat["LeftPanel (active=chat)<br/>(LeftPanel.tsx)"]
+ Chat["ChatStripPanel<br/>(LeftPanel.tsx)"]
Stage{{"Stage — picks one by mode"}}
Preview["Preview<br/>(Preview.tsx)"]
Inspector["FloatingInspector<br/>(v4/FloatingInspector.tsx)"]
@@ -58,7 +58,7 @@ of those are local React state, with the document itself read through
| **Stage — Rec mode** | `src/components/ai-edition/v4/RecStage.tsx` | Pre-flight config for a new recording — mic / camera / system audio / cursor capture mode — then hands off to the standalone recorder HUD window when the user hits record. |
| **Bottom timeline** | `src/components/ai-edition/v4/V4Timeline.tsx` | Renders the clips, the ruler, and the five lanes (`annPills`, `speedPills`, `trimPills`, `zoomPills`, `cameraFullscreenPills`, computed at `:321-363`). Owns transport (play / prev / next / loop), zoom/pan, scrub, drag-and-drop of asset cards, the "smart zooms + cuts" AI prompt, and resize/move/delete of every pill. Pills render through `coalesceRegionsForRuler` and `coalescedTrimGroups` so what the user sees is exactly what the rules in [timeline-model.md](timeline-model.md) describe. |
| **Floating inspector** | `src/components/ai-edition/v4/FloatingInspector.tsx` | Floating facet rail over the stage; the open panel either shows the `FacetBody` for the current facet (`effects` / `layout` / `audio` / `cursor` / `captions` / `transcript`) or, when a region is selected, a `SelectionPane` (`:434`) that edits the selected pill by id. The "pencil" rail button opens `EditClipModal` for crop + trim. |
-| **Left chat column** | `src/components/ai-edition/LeftPanel.tsx` | Only mounted when `mode === "edit"` and `chatOpen` is true (`NewEditorShell.tsx` `:1133-1151`). Sends user messages to the LLM via IPC. Resize handle is `v4.chatResizeHandle`; width persists in `localStorage` as `os-editor-chat-width`. |
+| **Left chat column** (`ChatStripPanel`) | `src/components/ai-edition/LeftPanel.tsx` | Only mounted when `mode === "edit"` and `chatOpen` is true (`NewEditorShell.tsx` `:1133-1151`). Sends user messages to the LLM via IPC. Resize handle is `v4.chatResizeHandle`; width persists in `localStorage` as `os-editor-chat-width`. |
| **Modals** | `src/components/ai-edition/Modals.tsx` | `OpenProjectModal`, `NewProjectModal`, `EditClipModal` (per-clip crop + in/out), `UnsavedChangesModal`. Mounted at the shell level (`:1286-1332`) so every trigger site reuses the same instance. |
| **Export dialog** | `src/components/ai-edition/ExportDialog.tsx` | Format / quality / frame-rate / codec / size; calls `exportAxcutDocument` (GIF path, WebCodecs) or `exportMultiNative` (MP4 path, native D3D compositor). The MP4 path is the one that goes through `src/lib/ai-edition/exporter/documentExporter.ts`'s `projectRegionsToSourceTime` and the multi-clip native bridge. |
| **Captions pane** | `src/components/ai-edition/CaptionsPane.tsx` | Mounted as a facet body from `FloatingInspector.tsx` (`:1062`). Controls caption appearance + translations; the cues themselves are a derived view over `document.transcripts` (see [`src/lib/ai-edition/captions/`](../../src/lib/ai-edition/captions/)). |
diff --git a/technical-documentation/architecture/llm-providers.md b/technical-documentation/architecture/llm-providers.md
index 125805b7c..dc132e234 100644
--- a/technical-documentation/architecture/llm-providers.md
+++ b/technical-documentation/architecture/llm-providers.md
@@ -16,7 +16,7 @@ The provider layer defines model metadata, protects credentials, discovers model
> **Two doors, one dialog.** The settings dialog is opened from the AI panel — its gear, the
> welcome card's CTA, the model pill with nothing configured, the quick-pick popover's "full
> settings" row, and a send attempt with no provider — and from the app menu under the
-> wordmark. Its open state lives in a context rather than in `LeftPanel` because that panel
+> wordmark. Its open state lives in a context rather than in `ChatStripPanel` because that panel
> mounts only in Edit mode with the chat panel expanded, which would have left the menu item
> dead in Media and Rec (issue #420).
diff --git a/technical-documentation/architecture/overview.md b/technical-documentation/architecture/overview.md
index 2d9af4b46..ad97061c7 100644
--- a/technical-documentation/architecture/overview.md
+++ b/technical-documentation/architecture/overview.md
@@ -63,7 +63,7 @@ goes back through it.
```mermaid
flowchart TD
User(("User"))
- Chat["LeftPanel.tsx<br/>(chat + media list)"]
+ Chat["ChatStripPanel<br/>(LeftPanel.tsx)"]
LLM["LLM provider<br/>electron/ai-edition/deep-agent/chat-model.ts<br/>provider-registry.ts"]
DSL[["AxcutDocument<br/>src/lib/ai-edition/schema/index.ts<br/>— SSOT —"]]
Store["useProjectStore<br/>(Zustand, in renderer)"]
diff --git a/technical-documentation/architecture/transcription-and-captions.md b/technical-documentation/architecture/transcription-and-captions.md
index 245519ab5..ce2514d2b 100644
--- a/technical-documentation/architecture/transcription-and-captions.md
+++ b/technical-documentation/architecture/transcription-and-captions.md
@@ -679,25 +679,23 @@ it deletes data
## Known gaps
- **Language selector.** The "Regenerate as" picker offers `"auto"` plus
- every language the `small` multilingual model resolves. There are two
- copies of it in the tree — `MediaStage.tsx`'s Media stage panel
+ every language the `small` multilingual model resolves. There is one
+ copy of it — `MediaStage.tsx`'s Media stage panel
([`src/components/ai-edition/v4/MediaStage.tsx`](../../src/components/ai-edition/v4/MediaStage.tsx)),
- the one actually mounted by `NewEditorShell`, and `SourceTranscriptModal`
- ([`src/components/ai-edition/Modals.tsx`](../../src/components/ai-edition/Modals.tsx)),
- which is currently unreachable: `LeftPanel` (its only mount site) is only
- ever rendered with `active="chat"` by `NewEditorShell.tsx`, so the
- `MediaPane` branch that would render it never runs. Both are kept correct
- rather than deleting the unreachable one, since nothing marks it dead code
- and a future rewire could reach it. `TRANSCRIPT_LANGUAGE_CODES` in
+ the one `NewEditorShell` mounts. A second, unreachable copy lived in the
+ v3 left panel's transcript modal until it was deleted along with the rest
+ of that orphaned surface (see
+ [decisions.md](decisions.md)) — it had already absorbed two language
+ fixes that never reached a user. `TRANSCRIPT_LANGUAGE_CODES` in
[`src/lib/ai-edition/schema/index.ts`](../../src/lib/ai-edition/schema/index.ts)
mirrors whisper.cpp's own `g_lang` table verbatim — a code outside that
list fails to resolve a language id in `wparams.language`
(`electron/native/whisper-stt/src/main.cpp`) — and `languageLabel` /
`sortedLanguageOptions` in
[`src/lib/ai-edition/transcription/languageLabels.ts`](../../src/lib/ai-edition/transcription/languageLabels.ts)
- are the single place both pickers build their options and labels from, so
- the two copies cannot drift from each other the way two hand-duplicated
- lists would. Option labels come from `Intl.DisplayNames` in the active UI
+ are the single place the picker builds its options and labels from, so a
+ future second entry point cannot drift from it the way a hand-duplicated
+ list would. Option labels come from `Intl.DisplayNames` in the active UI
locale, falling back to whisper.cpp's own English name for a code that
locale's ICU data can't resolve. Forcing a language skips detection on the
first window and slightly improves WER.