The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.
TypeScript agent-skillsagentic-aiai-agentsai-videobyokclaude-codecodexdeepseek-harnessdsh-plugingenerative-ailocal-firstmcpmotionmotion-graphicsmultimodalopenmotionreverse-engineeringvideo-editingvideo-generationworkbuddy
fix(studio): polish MVP controls and preserve track audio access
open-design-crew[bot]41760b72135d
diff --git a/docs/product/architecture.md b/docs/product/architecture.mdindex 83e41b13..2dd64730 100644--- a/docs/product/architecture.md+++ b/docs/product/architecture.md@@ -20,13 +20,13 @@ Model Gateway remains a shared media-generation backend for MCP, using local Cod- The project sidebar opens as a modal drawer over the editor at every viewport size. It starts closed, leaves the editor dimensions unchanged, and closes via its button, outside click or Escape. The header toggle remains mounted for focus restoration; privacy, theme and language settings live in the drawer footer. Error and empty-session views retain a drawer toggle so users can select an existing project or create one. Project rows show names without dates; the heading offers a New project button instead of a count. Creation uses the existing save and revision guards before opening the blank project.- An empty, loaded root composition shows a centered import/drop prompt over the mounted preview and hides transport controls, including the placeholder duration. The empty state requires both no timeline clips and no authored preview content; loading, failed previews and nested compositions retain their existing states. Import uses the existing timeline gateway and file-drop pipeline. The empty timeline retains its drop target and ruler, with a muted dashed track sketch instead of a duplicate import prompt or button. Empty timelines disable zoom controls. A confirmed empty composition blocks new exports at both the settings button and the shared editor render-start handler, while existing export history remains available. Properties distinguish no content from no selection; small panel empty states share muted text and icon sizing. Preview zoom percentage and Fit sit in the MVP preview header, outside the picture. Browser fullscreen is unavailable in the MVP, including its playback button and keyboard entry; workspace preview expansion remains available. Playback controls respond to their own container width: secondary-button gaps narrow below 420px, and speed/loop controls hide below 420px so timecode, play/pause and volume remain on one row. Preview and track volume use upward floating vertical sliders, opened by hover or keyboard focus; clicking the speaker still toggles mute.- The composition list places the full video first, preserves the remaining clip order, and marks the live preview target. A confirmed empty root is omitted from this list using the same loaded-preview content check; when no clips remain, the panel shows a brief empty state. The MVP omits the duplicate preview breadcrumb; composition switching and existing return shortcuts remain available.-- The editor header keeps the OpenDesign logo, drawer toggle and template library on the left, centers the editable project name, and places undo/redo and export on the right. Transient save/error status remains available. Workspace and export failures show concise causes and available next steps, with raw diagnostics behind expandable, copyable details. Reconnecting retries status reads only; dismissing a notice does not bypass write guards. Toasts stack at the top center of the editor. Informational toasts disappear after three seconds without a close control; actionable error notices remain dismissible and do not auto-expire. Save-queue pauses use a brief, localized feedback toast without paths, diagnostics or a retry action; it expires after three seconds without clearing the write guard or claiming that failed edits were saved. The template library reuses the website catalog layout: brand/use-case/video-type facets, configured featured templates, search and sorting, without site navigation, promotional hero or footer. Prism metadata and local cache updates drive the list. The catalog selects the editor locale from a shared multilingual publication, falling back to English and then the Resource default; template-copy prompts support the same eleven UI languages. Previews, author/source links and editable-project opening remain available. The detail view keeps the motion.md download action (`motionDocumentUrl`) above its guide content (`styleDescription`, `reviewFocus`, `motionGuideUrl`). Recreate opens a separate prompt dialog; copied instructions never occupy the guide area.+- The editor header keeps the OpenDesign logo, drawer toggle and template library on the left, centers the editable project name, and places undo/redo and export on the right. A logo-only community link sits immediately before Export: Chinese opens the Feishu community, while all other interface languages open Discord. The destination and accessible tooltip update with the active language; external links open separately from the editor. Transient save/error status remains available. Workspace and export failures show concise causes and available next steps, with raw diagnostics behind expandable, copyable details. Workspace connection failures use a persistent single-line feedback toast at the top center with a Reconnecting status and no buttons or diagnostic details. Automatic polling continues and removes the toast on recovery; it does not start a stopped service. Other notice dismissal does not bypass write guards. Toasts stack at the top center of the editor. Informational toasts disappear after three seconds without a close control; actionable error notices remain dismissible and do not auto-expire. Save-queue pauses use a brief, localized feedback toast without paths, diagnostics or a retry action; it expires after three seconds without clearing the write guard or claiming that failed edits were saved. The template library reuses the website catalog layout: brand/use-case/video-type facets, configured featured templates, search and sorting, without site navigation, promotional hero or footer. Prism metadata and local cache updates drive the list. The catalog selects the editor locale from a shared multilingual publication, falling back to English and then the Resource default; template-copy prompts support the same eleven UI languages. Previews, author/source links and editable-project opening remain available. The detail view keeps the motion.md download action (`motionDocumentUrl`) above its guide content (`styleDescription`, `reviewFocus`, `motionGuideUrl`). Recreate opens a separate prompt dialog; copied instructions never occupy the guide area.- The asset panel shows only the current project, with compact search/import controls, type filters, and a dedicated scrollable list. Usage filtering is omitted; used assets still sort first within each type. In both My assets and the official animation library, hover plays only the card thumbnail, while clicking opens a centered modal preview over a gray full-editor backdrop. The modal reuses Studio-styled playback, volume and speed controls; closing it restores access to the paused composition; previewing media does not add it to the project. The global cache view remains in source but has no editor entry in the MVP.-- Panel positions are fixed. Export settings and render history live in a compact popover below the header Export button, outside the right panel. Both side groups can temporarily collapse into 48px vertical icon rails, giving their width to preview; the rail toggle restores the previous width and tab, while a module icon opens that module. Collapse does not remove panels or remount the player. Opening the MVP starts both sides collapsed and the timeline at 30% of the available dock height (subject to minimum sizes); users can then drag the divider to enlarge or reduce it. The fixed layout reserves at least 360px for preview and 320px for each expanded side. Side availability is derived from these minimums plus rail/gap space: below 740px both side groups and rails hide; from 740px to 1011px only one side can expand; wider hosts allow both only when their requested widths leave the preview floor intact. Opening a side through a toggle, module shortcut or programmatic activation uses the same fit check and closes the opposite side when necessary. Shrinking the host collapses expanded sides when they no longer fit; widening restores collapsed rails without automatically reopening panels. At widths smaller than the preview floor, preview uses the available workspace. Remembered expanded side widths remain available when reopening a side. Divider resizing and per-project expanded-size persistence remain; panel movement, closing and layout presets are absent. Preview alone can temporarily expand within the editor workspace, keeping the host chat visible and the player mounted. Its header button or Escape restores the previous layout and playback position; expansion is not persisted across reloads.+- Panel positions are fixed. Export settings and render history live in a compact popover below the header Export button, outside the right panel. Both side groups can temporarily collapse into 48px vertical icon rails, giving their width to preview; the rail toggle restores the previous width and tab, while a module icon opens that module. Collapse does not remove panels or remount the player. Opening the MVP starts both sides collapsed and the timeline at 30% of the available dock height (subject to minimum sizes); users can then drag the divider to enlarge or reduce it. The fixed layout reserves at least 360px for preview, 260px for each expanded side panel. Side availability retains the existing conservative breakpoints, independently of the resizable minimums: below 740px both side groups and rails hide; from 740px to 1011px only one side can expand; wider hosts allow both only when their requested widths leave the preview floor intact. Opening a side through a toggle, module shortcut or programmatic activation uses the same fit check and closes the opposite side when necessary. Shrinking the host collapses expanded sides when they no longer fit; widening restores collapsed rails without automatically reopening panels. At widths smaller than the preview floor, preview uses the available workspace. Remembered expanded side widths remain available when reopening a side. Divider resizing and per-project expanded-size persistence remain; panel movement, closing and layout presets are absent. Preview alone can temporarily expand within the editor workspace, keeping the host chat visible and the player mounted. Its header button or Escape restores the previous layout and playback position; expansion is not persisted across reloads.- MVP controls share a locally bundled Remix Icon 4.9.1 set with the reference design system. Expanded side-panel tabs remain text-only; collapsed rails use the corresponding panel icons. Brand artwork and timeline geometry are separate from control icons.- The editor startup shell and project/editor loading boundaries share a centered, theme-aware OD symbol without adding a minimum loading delay. Below 700px of workspace content width, the editor header stays on one row: undo/redo and version history hide, the template library becomes icon-only, the project title truncates, and Export stays at the right edge.-- MVP audio-bearing tracks expose a single speaker button before visibility in the track header: click toggles mute, while hover or keyboard focus opens a compact volume slider, writing every audio/video clip in that row through native saves and undo. Video visibility remains separate, and preview-monitor volume remains a playback preference. Clip-count badges are omitted to make room for these controls. The audio-meter toolbar toggle, meter display and audio FX entry points (track presets, group effects and inspector rack) are omitted in the MVP. Track volume sliders cover 0–100% and show effective zero output while muted, retaining the saved volume for unmute.-- Timeline clips omit a title that duplicates the track header, giving its space to the preview. Distinct clip names, accessible labels, status badges and track visibility controls remain available.+- MVP audio-bearing tracks expose a single speaker button before visibility in the track header: click toggles mute, while hover or keyboard focus opens a compact volume slider, writing every audio/video clip in that row through native saves and undo. Video visibility remains separate, and preview-monitor volume remains a playback preference. Clip-count badges are omitted to make room for these controls. The audio-meter toolbar toggle, meter display and audio FX entry points (track presets, group effects and inspector rack) are omitted in the MVP. The media inspector exposes source, speed, media start, loop, fit and position; it omits path-copy, cutout controls, gain/volume automation, speed automation/presets, audio fades, mute and audio-track toggles. Existing authored media/audio values remain intact, with track mute and volume available in the timeline. Track audio controls use cached source audio-track detection independently of mute and gain; unknown video sources retain controls until confirmed silent. Track volume sliders cover 0–100% and show effective zero output while muted, retaining the saved volume for unmute.+- MVP timeline clips omit visible name bands, giving their space to thumbnails or waveforms. Track headers, hover titles, accessible clip names, the FX badge and track visibility controls remain available. Volume badges are omitted in the MVP; the track speaker retains the volume readout.- Export offers native MP4, MOV, WebM and GIF. GIF includes loop-count controls and a 30 fps limit. MOV and WebP use short format names; ProRes appears in the MOV format help. WebP remains disabled; its encoding backend is not implemented.- The MVP omits the standalone timeline title strip to give its space to tracks, retaining the tool row and ruler.- The MVP shows Select and Split as adjacent timeline tools. Split at playhead remains available by keyboard shortcut, without a duplicate toolbar button. Tooltips add a short explanation for less familiar controls while simple actions retain a name-only hint. Overlay surfaces share subtle entrance motion; Base UI popovers and media-preview dialogs also retain their surfaces through a short exit. Tooltip hover delay is 200ms, with instant keyboard-focus hints. Reduced-motion preferences disable overlay transitions; dock expansion keeps its separate animation.diff --git a/docs/reviews/motion-mvp-ui-followup/README.md b/docs/reviews/motion-mvp-ui-followup/README.mdnew file mode 100644index 00000000..3078bc27--- /dev/null+++ b/docs/reviews/motion-mvp-ui-followup/README.md@@ -0,0 +1,21 @@+# Motion MVP UI follow-up evidence++These changes follow the already merged PR #272. The new PR targets `feature/motion` independently and contains only the later interaction adjustments.++Screenshots were captured from the working checkout at localhost:4173 on November 11, 2026. The publication checkout applies the changes to `eabdaa0`, preserving the newer history feedback and style-gate fixes. Production compilation and focused tests cover the integrated tree; these screenshots do not claim browser coverage of every upstream difference.++- [Final editor](motion-timeline-controls-final.jpg): both side panels at their 260px minimum, matching Import buttons, no plus icon, compact 8px zoom/import gap without the right divider, single toolbar/ruler boundary, and FX-only clip badges. The left speaker remains available after raising a muted track to 54%; refresh preserved its availability. The final test project remains unmuted at 54%.+- [Asset menu](motion-asset-menu-unified.jpg) and [timeline menu](motion-timeline-menu-light.jpg): matching 180px white surfaces, 8px corners, 11px text, 28px rows, soft shadow and pale-gray interaction highlight. The captures use keyboard focus, which shares the hover background; its focus outline remains visible. These detail captures predate the final removal of clip-volume badges and import spacing adjustment.+- [Media inspector](motion-media-basic-controls.jpg): basic media controls without path copy, cutout, advanced gain/automation, fades, mute or audio-track toggles. Existing source values are preserved; timeline speaker controls own mute/volume.+- [Community icon size](motion-community-16px.jpg) and [localized tooltip](motion-community-tooltip.jpg): 16px logo before Export, Feishu for Chinese and Discord for other supported locales. The tooltip capture predates the final icon-size reduction. Native app launches and successful community joins were not tested.+- [Reconnecting feedback](motion-reconnecting-toast.jpg): simulated connection failure through a temporary read-only local proxy. One-line top-centered feedback displays automatic reconnection status with no retry/details buttons. Removing the simulated failure cleared the toast through normal polling. The proxy and its test tab were removed.++Additional browser checks confirmed neutral hidden-track icons, a stable editor viewport when focusing the volume slider, persistent volume controls through mute/unmute, and 28px-high Import buttons with 6px corners in both locations. The main and earlier integration checkouts retain their existing uncommitted work; runtime projects and the supplied video are not added to Git.++## Validation++- CI-pinned Node 26.11.1; existing dependencies reused because manifests and lockfiles are unchanged.+- `npm run check`, `npm run typecheck:studio`, `npm run build:studio`, and `git diff --check` passed.+- Focused Studio validation covered 21 files and 320 tests. A test-only CSS marker initially failed the style gate; converting it to a data attribute fixed it, and both the gate and host suite passed on rerun (26 tests).+- Coverage includes docking, media inspector, assets, shared menus, timeline clips and audio controls, locale routing, connection feedback and theme/token checks.+- No full suite, installer validation, new export or external-service join was performed for this frontend-only change. Existing Happy DOM network diagnostics do not represent a failed test.diff --git a/docs/reviews/motion-mvp-ui-followup/motion-asset-menu-unified.jpg b/docs/reviews/motion-mvp-ui-followup/motion-asset-menu-unified.jpgnew file mode 100644index 00000000..111a8c34Binary files /dev/null and b/docs/reviews/motion-mvp-ui-followup/motion-asset-menu-unified.jpg differdiff --git a/docs/reviews/motion-mvp-ui-followup/motion-community-16px.jpg b/docs/reviews/motion-mvp-ui-followup/motion-community-16px.jpgnew file mode 100644index 00000000..6277079eBinary files /dev/null and b/docs/reviews/motion-mvp-ui-followup/motion-community-16px.jpg differdiff --git a/docs/reviews/motion-mvp-ui-followup/motion-community-tooltip.jpg b/docs/reviews/motion-mvp-ui-followup/motion-community-tooltip.jpgnew file mode 100644index 00000000..1bac7ba9Binary files /dev/null and b/docs/reviews/motion-mvp-ui-followup/motion-community-tooltip.jpg differdiff --git a/docs/reviews/motion-mvp-ui-followup/motion-media-basic-controls.jpg b/docs/reviews/motion-mvp-ui-followup/motion-media-basic-controls.jpgnew file mode 100644index 00000000..d1d65a41Binary files /dev/null and b/docs/reviews/motion-mvp-ui-followup/motion-media-basic-controls.jpg differdiff --git a/docs/reviews/motion-mvp-ui-followup/motion-reconnecting-toast.jpg b/docs/reviews/motion-mvp-ui-followup/motion-reconnecting-toast.jpgnew file mode 100644index 00000000..57788738Binary files /dev/null and b/docs/reviews/motion-mvp-ui-followup/motion-reconnecting-toast.jpg differdiff --git a/docs/reviews/motion-mvp-ui-followup/motion-timeline-controls-final.jpg b/docs/reviews/motion-mvp-ui-followup/motion-timeline-controls-final.jpgnew file mode 100644index 00000000..f8d1afb7Binary files /dev/null and b/docs/reviews/motion-mvp-ui-followup/motion-timeline-controls-final.jpg differdiff --git a/docs/reviews/motion-mvp-ui-followup/motion-timeline-menu-light.jpg b/docs/reviews/motion-mvp-ui-followup/motion-timeline-menu-light.jpgnew file mode 100644index 00000000..de254a4cBinary files /dev/null and b/docs/reviews/motion-mvp-ui-followup/motion-timeline-menu-light.jpg differdiff --git a/studio/src/components/StudioHeader.tsx b/studio/src/components/StudioHeader.tsxindex 797e3e24..28c04cb1 100644--- a/studio/src/components/StudioHeader.tsx+++ b/studio/src/components/StudioHeader.tsx@@ -150,6 +150,7 @@ export const StudioHeader = memo(function StudioHeader({{host?.languageMenu}{host?.windowMenu ?? <Dock.WindowMenu />}{host?.desktopLink !== false && <OpenInDesktopButton />}+ {host?.communityAction}<Tooltipdisabled={host?.mvpEditor}label={diff --git a/studio/src/components/StudioToast.tsx b/studio/src/components/StudioToast.tsxindex d1794214..70f6b638 100644--- a/studio/src/components/StudioToast.tsx+++ b/studio/src/components/StudioToast.tsx@@ -8,9 +8,11 @@ interface StudioToastProps {/** Plays the exit animation when true (owner removes the node after ~160ms). */leaving?: boolean;onDismiss?: () => void;+ singleLine?: boolean;+ status?: string;}-export function StudioToast({ message, tone, presentation, leaving, onDismiss }: StudioToastProps) {+export function StudioToast({ message, tone, presentation, leaving, onDismiss, singleLine, status }: StudioToastProps) {const { t } = useI18n();const isError = tone === "error";return (@@ -21,7 +23,10 @@ export function StudioToast({ message, tone, presentation, leaving, onDismiss }:{isError && presentation !== "feedback" ? <div className="max-w-[min(420px,calc(100vw-48px))] rounded-2xl border border-danger/40 bg-raised p-3 shadow-popover"><ErrorNotice key={message} message={message} compact onDismiss={onDismiss} /></div> : <div className={`max-w-[min(420px,calc(100vw-48px))] overflow-hidden rounded-2xl px-4 py-2 text-[12px] shadow-popover bg-toast-feedback text-toast-feedback-ink`}>- <span className="line-clamp-3 leading-5 [overflow-wrap:anywhere]" title={systemMessage(message, t)}>{systemMessage(message, t)}</span>+ <div className={status ? "flex min-w-0 items-center gap-3" : undefined}>+ <span className={singleLine ? "block min-w-0 truncate leading-5" : "line-clamp-3 leading-5 [overflow-wrap:anywhere]"} title={systemMessage(message, t)}>{systemMessage(message, t)}</span>+ {status && <span className="shrink-0 leading-5 opacity-70">{t(status)}</span>}+ </div></div>}</div>);diff --git a/studio/src/components/dock/Dock.test.tsx b/studio/src/components/dock/Dock.test.tsxindex a3cbf2d2..2e6b570a 100644--- a/studio/src/components/dock/Dock.test.tsx+++ b/studio/src/components/dock/Dock.test.tsx@@ -752,10 +752,10 @@ it.each([740, 800, 1000])("keeps compact sides exclusive and readable at %ipx acact(() => controller.setGroupCollapsed!("design", false, true));act(() => vi.advanceTimersByTime(240));expect(left.width).toBe(48);- expect(right.width).toBeGreaterThanOrEqual(320);+ expect(right.width).toBeGreaterThanOrEqual(260);act(() => useDockLayoutStore.getState().activatePanel("assets"));expect(right.width).toBe(48);- expect(left.width).toBeGreaterThanOrEqual(320);+ expect(left.width).toBeGreaterThanOrEqual(260);expect(left.activePanel?.id).toBe("assets");act(() => {controller.setGroupCollapsed!("design", false, true);@@ -765,7 +765,7 @@ it.each([740, 800, 1000])("keeps compact sides exclusive and readable at %ipx acdockLayout.applySideMinimums(api, width, true);});expect(right.width).toBe(48);- expect(left.width).toBeGreaterThanOrEqual(320);+ expect(left.width).toBeGreaterThanOrEqual(260);expect(useDockLayoutStore.getState().collapsedZones).toEqual(["right"]);expect(api.getPanel("preview")!.group.width).toBeGreaterThanOrEqual(360);expect(left.width + right.width + api.getPanel("preview")!.group.width).toBeLessThanOrEqual(width);@@ -807,7 +807,7 @@ it("collapses oversized remembered sides when reopening would crowd the previewcontroller.setGroupCollapsed!("compositions", false);});expect(right.width).toBe(48);- expect(left.width).toBeGreaterThanOrEqual(320);+ expect(left.width).toBeGreaterThanOrEqual(260);expect(api.getPanel("preview")!.group.width).toBeGreaterThanOrEqual(360);});@@ -830,3 +830,43 @@ it("finishes an in-flight opening before narrowing into preview-only mode", () =expect(api.getPanel("compositions")!.group.width).toBe(0);expect(api.getPanel("preview")!.group.width).toBeGreaterThanOrEqual(468);});+++it("retains both sides' 260px minimum through resizing and side-panel animations", () => {+ mount("narrow-library", {}, { panels: MVP_PANEL_IDS, fixedLayout: true, dockWidth: () => 1400 });+ const api = dockApi!;+ act(() => api.layout(1400, 800));+ const left = api.getPanel("compositions")!.group;+ const right = api.getPanel("design")!.group;+ const controller = useDockLayoutStore.getState().controller!;+ act(() => {+ controller.setGroupCollapsed!("compositions", false);+ left.api.setSize({ width: 260 });+ });+ expect(left.width).toBe(260);+ act(() => {+ controller.setGroupCollapsed!("compositions", true, true);+ vi.advanceTimersByTime(240);+ controller.setGroupCollapsed!("compositions", false, true);+ vi.advanceTimersByTime(240);+ controller.setGroupCollapsed!("design", false, true);+ vi.advanceTimersByTime(240);+ dockLayout.applySideMinimums(api, 1400, true);+ left.api.setSize({ width: 220 });+ right.api.setSize({ width: 260 });+ });+ expect(left.width).toBe(260);+ expect(left.minimumWidth).toBe(260);+ expect(right.width).toBe(260);+ expect(right.minimumWidth).toBe(260);+ act(() => {+ controller.setGroupCollapsed!("design", true, true);+ vi.advanceTimersByTime(240);+ controller.setGroupCollapsed!("design", false, true);+ vi.advanceTimersByTime(240);+ right.api.setSize({ width: 220 });+ });+ expect(right.width).toBe(260);+ expect(right.minimumWidth).toBe(260);+ expect(api.getPanel("preview")!.group.width).toBeGreaterThanOrEqual(360);+});diff --git a/studio/src/components/dock/Dock.tsx b/studio/src/components/dock/Dock.tsxindex 794f43fd..a006c1fd 100644--- a/studio/src/components/dock/Dock.tsx+++ b/studio/src/components/dock/Dock.tsx@@ -334,7 +334,7 @@ function Root({.reduce((sum, group) => sum + (isSideCollapsed(group) ? collapsedSideWidth(width, true) : Math.max(group.width, sideMinimumWidth(width, true))), 0);// Revalidate restored layouts, shrinking hosts and expanded widths alike.// A height-only resize leaves an expansion intact whenever it still fits.- if (fixedLayout && (width < PREVIEW_ONLY_DOCK_WIDTH || (expandedSides.length > 0 && sidesWidth + MIN_PREVIEW_W + DOCK_GAPS > width))) {+ if (fixedLayout && (width < PREVIEW_ONLY_DOCK_WIDTH || (width < COMPACT_DOCK_WIDTH && expandedSides.length > 1) || (expandedSides.length > 0 && sidesWidth + MIN_PREVIEW_W + DOCK_GAPS > width))) {for (const zone of ["left", "right"] as const) {const id = panels.find(id => PANEL_DEFINITIONS[id].zone === zone);if (id) controller.setGroupCollapsed?.(id, true);diff --git a/studio/src/components/dock/dockLayout.ts b/studio/src/components/dock/dockLayout.tsindex f8c8c9e9..48e3b895 100644--- a/studio/src/components/dock/dockLayout.ts+++ b/studio/src/components/dock/dockLayout.ts@@ -11,11 +11,12 @@ const DEFAULT_TIMELINE_H = 360;const DEFAULT_LEFT = ["compositions", "assets", "code", "catalog"] as const;const DEFAULT_RIGHT = ["design", "layers", "renders", "variables", "motionBlur"] as const;export const COLLAPSED_SIDE_WIDTH = 48;-const COMPACT_SIDE_WIDTH = 320;+const BREAKPOINT_SIDE_WIDTH = 320;+const MIN_MVP_SIDE_WIDTH = 260;export const DOCK_GAPS = 12;-// Breakpoints derive from usable panel sizes, not an independent viewport guess.-export const COMPACT_DOCK_WIDTH = MIN_PREVIEW_W + 2 * COMPACT_SIDE_WIDTH + DOCK_GAPS;-export const PREVIEW_ONLY_DOCK_WIDTH = MIN_PREVIEW_W + COMPACT_SIDE_WIDTH + COLLAPSED_SIDE_WIDTH + DOCK_GAPS;+// Preserve existing narrow-host collapse breakpoints independently of resizable side minimums.+export const COMPACT_DOCK_WIDTH = MIN_PREVIEW_W + 2 * BREAKPOINT_SIDE_WIDTH + DOCK_GAPS;+export const PREVIEW_ONLY_DOCK_WIDTH = MIN_PREVIEW_W + BREAKPOINT_SIDE_WIDTH + COLLAPSED_SIDE_WIDTH + DOCK_GAPS;export const collapsedSideWidth = (width: number, fixedLayout = false) =>fixedLayout && width < PREVIEW_ONLY_DOCK_WIDTH ? 0 : COLLAPSED_SIDE_WIDTH;export const isSideCollapsed = (group: DockviewApi["groups"][number]) =>@@ -37,7 +38,7 @@ export function defaultSideWidths(viewportWidth: number) {* when space runs out. Free-layout sides retain the native shrinking policy.*/export function sideMinimumWidth(dockWidth: number, fixedLayout = false): number {- if (fixedLayout) return COMPACT_SIDE_WIDTH;+ if (fixedLayout) return MIN_MVP_SIDE_WIDTH;const fair = Math.floor((dockWidth - MIN_PREVIEW_W) / 2);return Math.min(MIN_SIDE_W, Math.max(MIN_SIDE_W_FLOOR, fair));}@@ -52,7 +53,7 @@ function holdsPreview(group: DockviewApi["groups"][number]) {}/** The zone of a group whose every tab is a side panel, else null. */-function sideZone(group: DockviewApi["groups"][number]): "left" | "right" | null {+export function sideZone(group: DockviewApi["groups"][number]): "left" | "right" | null {const zones = group.panels.map((panel) =>isPanelId(panel.id) ? PANEL_DEFINITIONS[panel.id].zone : "center",);@@ -63,7 +64,6 @@ function sideZone(group: DockviewApi["groups"][number]): "left" | "right" | null/** Idempotent; rewrites every group's minimum, since dockview keeps a constraint once set. */export function applySideMinimums(api: DockviewApi, dockWidth = window.innerWidth, fixedLayout = false) {- const minimumWidth = sideMinimumWidth(dockWidth, fixedLayout);const compact = fixedLayout && dockWidth < COMPACT_DOCK_WIDTH;const cap = defaultSideWidths(dockWidth);const railWidth = collapsedSideWidth(dockWidth, fixedLayout);@@ -79,8 +79,9 @@ export function applySideMinimums(api: DockviewApi, dockWidth = window.innerWidtgroup.api.setConstraints({ minimumWidth: previewMinimumWidth(dockWidth, fixedLayout) });continue;}- group.api.setConstraints({ minimumWidth, maximumWidth: Number.POSITIVE_INFINITY });const zone = sideZone(group);+ const minimumWidth = sideMinimumWidth(dockWidth, fixedLayout);+ group.api.setConstraints({ minimumWidth, maximumWidth: Number.POSITIVE_INFINITY });const limit = zone === "right" ? cap.right : cap.left;if (zone && !compact && minimumWidth < MIN_SIDE_W && group.width > limit) {group.api.setSize({ width: limit });diff --git a/studio/src/components/editor/LayersPanel.tsx b/studio/src/components/editor/LayersPanel.tsxindex ac1b5267..24184d5f 100644--- a/studio/src/components/editor/LayersPanel.tsx+++ b/studio/src/components/editor/LayersPanel.tsx@@ -493,7 +493,7 @@ export const LayersPanel = memo(function LayersPanel({ host }: { host?: LayersPaisDragged? "opacity-40": selected- ? "bg-panel-accent/14 text-accent-ink"+ ? mvp ? "bg-panel-hover text-panel-text-1" : "bg-panel-accent/14 text-accent-ink": "text-panel-text-2 hover:bg-panel-hover/40 hover:text-panel-text-1"} ${dragKey ? "cursor-grabbing" : "cursor-pointer"}`}style={{ paddingLeft: 8 + layer.depth * CHILD_INDENT }}@@ -514,7 +514,9 @@ export const LayersPanel = memo(function LayersPanel({ host }: { host?: LayersPadata-layer-kind={kind}title={hint ? `${t(kindName)} · ${t(hint)}` : t(kindName)}className={`flex h-5 w-5 shrink-0 items-center justify-center rounded ${- selected+ mvp+ ? selected ? "bg-panel-hover text-panel-text-1" : "bg-panel-hover text-panel-text-4"+ : selected? "bg-panel-accent/18 text-accent-ink": isCompHost? "bg-on text-accent-ink"diff --git a/studio/src/components/editor/PropertyPanelEmptyState.tsx b/studio/src/components/editor/PropertyPanelEmptyState.tsxindex a0e1b542..f0e6ebca 100644--- a/studio/src/components/editor/PropertyPanelEmptyState.tsx+++ b/studio/src/components/editor/PropertyPanelEmptyState.tsx@@ -15,8 +15,7 @@ function FlatEmptyState() {const projectId = useStudioShellContextOptional()?.projectId ?? "";const empty = useEmptyPreview(projectId, mvp);if (mvp) return <PanelEmptyState icon="cursor-line"- message={t(empty ? "No editable content" : "Nothing selected")}- description={empty ? undefined : t("Click any element on the canvas to edit it.")} />;+ message={t(empty ? "No editable content" : "Select an element to edit its properties")} />;return (<div className="flex h-full flex-col items-center justify-center gap-2.5 px-8 py-10 text-center"><span className="flex h-11 w-11 items-center justify-center rounded-xl border border-panel-border-input bg-panel-input text-panel-text-3">diff --git a/studio/src/components/editor/propertyPanelFlatMediaSection.test.tsx b/studio/src/components/editor/propertyPanelFlatMediaSection.test.tsxindex ba8c3e35..315590b9 100644--- a/studio/src/components/editor/propertyPanelFlatMediaSection.test.tsx+++ b/studio/src/components/editor/propertyPanelFlatMediaSection.test.tsx@@ -3,6 +3,7 @@import React, { act } from "react";import { createRoot } from "react-dom/client";import { afterEach, describe, expect, it, vi } from "vitest";+import { StudioHostContext } from "../../motion/StudioHost";import { FlatMediaSection } from "./propertyPanelFlatMediaSection";import { MediaSection } from "./propertyPanelMediaSection";import type { DomEditSelection } from "./domEditing";@@ -50,14 +51,14 @@ function makeVideoElement(overrides: Partial<DomEditSelection> = {}): DomEditSel} as DomEditSelection;}-function renderSection(overrides: Partial<DomEditSelection> = {}) {+function renderSection(overrides: Partial<DomEditSelection> = {}, mvp = false) {const host = document.createElement("div");document.body.append(host);const root = createRoot(host);const element = makeVideoElement(overrides);act(() => {root.render(- <FlatMediaSection+ <StudioHostContext.Provider value={{ mvpEditor: mvp }}><FlatMediaSectionprojectDir={null}element={element}styles={{}}@@ -65,12 +66,33 @@ function renderSection(overrides: Partial<DomEditSelection> = {}) {onSetAttribute={vi.fn()}onSetHtmlAttribute={vi.fn()}onSetAttributeBatch={vi.fn()}- />,+ /></StudioHostContext.Provider>,);});return { host, root };}+describe("FlatMediaSection — MVP scope", () => {+ it.each(["video", "audio", "img"])("keeps basic %s controls without advanced or duplicate actions", (tagName) => {+ const { host, root } = renderSection({ tagName }, true);+ expect(host.textContent).toContain("assets/intro-loop.mp4");+ expect(host.querySelector("[data-flat-media-copy]")).toBeNull();+ expect(host.querySelector("[data-flat-media-remove-bg]")).toBeNull();+ expect(host.querySelector(".hf-volume-row")).toBeNull();+ for (const label of ["Cutout", "Gain", "Quality", "BG plate", "Muted", "Has audio track", "Speed preset", "Fade in", "Fade out"]) {+ expect(host.textContent).not.toContain(label);+ }+ expect(host.querySelector('[aria-label="Automate Speed"]')).toBeNull();+ if (tagName !== "img") {+ for (const label of ["Speed", "Media start", "Loop"]) expect(host.textContent).toContain(label);+ }+ if (tagName !== "audio") {+ for (const label of ["Fit", "Position"]) expect(host.textContent).toContain(label);+ }+ act(() => root.unmount());+ });+});+describe("FlatMediaSection — source row", () => {it("renders the source path and copies it to clipboard on click", () => {Object.defineProperty(navigator, "clipboard", {diff --git a/studio/src/components/editor/propertyPanelFlatMediaSection.tsx b/studio/src/components/editor/propertyPanelFlatMediaSection.tsxindex 529fc648..08dc8e0d 100644--- a/studio/src/components/editor/propertyPanelFlatMediaSection.tsx+++ b/studio/src/components/editor/propertyPanelFlatMediaSection.tsx@@ -1,4 +1,5 @@import { useI18n } from "../../i18n/I18n";+import { useMvpEditor } from "../../motion/StudioHost";import { useEffect, useState } from "react";import { isVideoAudible } from "../../player/lib/timelineElementHelpers";import { useTrackDesignInput } from "../../contexts/DesignPanelInputContext";@@ -83,6 +84,7 @@ export function FlatMediaSection({) => Promise<BackgroundRemovalResult>;}) {const { t } = useI18n();+ const mvp = useMvpEditor();const track = useTrackDesignInput();const isVideo = element.tagName === "video";const isAudio = element.tagName === "audio";@@ -172,7 +174,7 @@ export function FlatMediaSection({{srcAttr}</span></span>- <button+ {!mvp && <buttontype="button"data-flat-media-copy="true"onClick={() => {@@ -186,9 +188,9 @@ export function FlatMediaSection({>{copied ? <Check size={11} /> : <ClipboardList size={11} />}{copied ? t("Copied") : t("Copy")}- </button>+ </button>}</div>- {isVisualMedia && (+ {!mvp && isVisualMedia && (<div className="ml-px border-l-2 border-panel-border-input py-1 pl-[10px]"><div className="flex min-h-6 items-center justify-between"><span className="flex items-baseline gap-[7px]">@@ -244,6 +246,7 @@ export function FlatMediaSection({)}{(isVideo || isAudio) && (<>+ {!mvp && <><FlatSliderlabel={t("Gain")}value={audioGainToFaderPosition(gain)}@@ -295,6 +298,7 @@ export function FlatMediaSection({}/></div>+ </>}<div className="flex items-center gap-1"><div className="min-w-0 flex-1"><FlatSlider@@ -321,18 +325,18 @@ export function FlatMediaSection({}}/></div>- <AutomationToggle+ {!mvp && <AutomationToggleparamKey="rate"label={t("Speed")}automated={Boolean(rate?.automated)}onAutomate={rate ? () => rate.onAutomate() : undefined}onRemoveAutomation={rate ? () => rate.onRemoveAutomation() : undefined}- />+ />}</div>{/* Speed presets are picture-driven ramps (slow-mo reveals, whipspeed-ups); on a bare audio clip they only warp pitch, so therow is video-only. */}- {rate?.canApplyPreset && !isAudio && (+ {!mvp && rate?.canApplyPreset && !isAudio && (<FlatSelectRowlabel={t("Speed preset")}value=""@@ -356,7 +360,7 @@ export function FlatMediaSection({return true;}}/>- {(isAudio || hasAudio) && (+ {!mvp && (isAudio || hasAudio) && (<MediaFadeSlidersfadeIn={fadeIn}fadeOut={fadeOut}@@ -369,12 +373,12 @@ export function FlatMediaSection({checked={hasLoop}onChange={(next) => void onSetHtmlAttribute("loop", next ? "true" : null)}/>- <FlatToggle+ {!mvp && <FlatTogglelabel={t("Muted")}checked={hasMuted}onChange={(next) => void commitMutedToggle(mediaEdit, next)}- />- {isVideo && (+ />}+ {!mvp && isVideo && (<FlatTogglelabel={t("Has audio track")}checked={hasAudio}diff --git a/studio/src/components/sidebar/AssetContextMenu.tsx b/studio/src/components/sidebar/AssetContextMenu.tsxindex 9a5f5b65..ea610c22 100644--- a/studio/src/components/sidebar/AssetContextMenu.tsx+++ b/studio/src/components/sidebar/AssetContextMenu.tsx@@ -4,6 +4,7 @@ import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "reactimport { createPortal } from "react-dom";import { filename } from "./assetHelpers";import { menuClasses } from "../ui/menuStyle";+import { popupSurface } from "../ui/Menu";/** Reject names that would escape the asset directory or break paths. */function isValidAssetName(name: string): boolean {@@ -122,7 +123,7 @@ export function ContextMenu({ref={menuRef}role="menu"aria-label={t("Actions for {value0}", { value0: filename(asset) })}- className={`${menuClasses.panel} absolute min-w-[160px] text-xs`}+ className={`${mvp ? `${popupSurface} motion-context-menu p-1 shadow-menu min-w-[180px]` : `${menuClasses.panel} min-w-[160px]`} absolute text-xs`}style={{ left: pos.x, top: pos.y, maxWidth: "calc(100vw - 16px)", maxHeight: "calc(100vh - 16px)", overflow: "auto" }}onClick={(e) => e.stopPropagation()}>diff --git a/studio/src/components/sidebar/AssetsTab.tsx b/studio/src/components/sidebar/AssetsTab.tsxindex be046513..db94c171 100644--- a/studio/src/components/sidebar/AssetsTab.tsx+++ b/studio/src/components/sidebar/AssetsTab.tsx@@ -109,6 +109,7 @@ export function deriveUsedPaths(elements: Array<{ src?: string }>): Set<string>* instead of leaving the author clicking a control that looks idle. */function ImportButton({ importing, onClick }: { importing: boolean; onClick: () => void }) {const { t } = useI18n();+ const mvp = useMvpEditor();return (<buttononClick={onClick}@@ -116,13 +117,13 @@ function ImportButton({ importing, onClick }: { importing: boolean; onClick: ()aria-busy={importing}aria-label={t("Import media")}title={t("Import media")}- className="flex shrink-0 items-center justify-center gap-1 rounded-md bg-panel-input px-2 py-[5px] text-[11px] font-medium text-panel-text-3 enabled:hover:text-panel-text-1 enabled:active:scale-[0.98] disabled:opacity-60 transition-colors"+ className="motion-import-button flex shrink-0 items-center justify-center gap-1 rounded-md bg-panel-input px-2 py-[5px] text-[11px] font-medium text-panel-text-3 enabled:hover:text-panel-text-1 enabled:active:scale-[0.98] disabled:opacity-60 transition-colors">{importing ? (<RemixIcon name="loader-4-line" size={14} className="animate-spin" />- ) : (+ ) : !mvp ? (<RemixIcon name="add-line" size={14} />- )}+ ) : null}{importing ? t("Importing…") : t("Import")}</button>);diff --git a/studio/src/i18n/error-ui.json b/studio/src/i18n/error-ui.jsonindex 3e2d350e..cfc51854 100644--- a/studio/src/i18n/error-ui.json+++ b/studio/src/i18n/error-ui.json@@ -1,5 +1,7 @@{"zh-CN": {+ "Reconnecting…": "重连中…",+ "Connection lost.": "连接已断开","The project changed elsewhere. Resolve the changes before continuing.": "工程已在其他地方修改,请先处理版本冲突。","Changes could not be saved. Check the connection and project before continuing.": "修改未能保存,请检查连接和工程后再继续。","A required file is missing. Check or replace it, then try again.": "所需文件已丢失,请检查或替换文件后重试。",@@ -24,6 +26,8 @@"Keep your changes and replace the version updated elsewhere?": "保留你的修改,并替换其他地方更新的版本?"},"ja": {+ "Reconnecting…": "再接続中…",+ "Connection lost.": "接続が切れました","The project changed elsewhere. Resolve the changes before continuing.": "プロジェクトが別の場所で変更されました。競合を解決してから続行してください。","Changes could not be saved. Check the connection and project before continuing.": "変更を保存できませんでした。接続とプロジェクトを確認してください。","A required file is missing. Check or replace it, then try again.": "必要なファイルが見つかりません。確認または差し替えて再試行してください。",@@ -48,6 +52,8 @@"Keep your changes and replace the version updated elsewhere?": "自分の変更を保持し、別の場所で更新された版を置き換えますか?"},"ko": {+ "Reconnecting…": "다시 연결 중…",+ "Connection lost.": "연결이 끊겼습니다","The project changed elsewhere. Resolve the changes before continuing.": "프로젝트가 다른 곳에서 변경되었습니다. 충돌을 해결한 후 계속하세요.","Changes could not be saved. Check the connection and project before continuing.": "변경 사항을 저장하지 못했습니다. 연결과 프로젝트를 확인하세요.","A required file is missing. Check or replace it, then try again.": "필요한 파일이 없습니다. 파일을 확인하거나 교체한 후 다시 시도하세요.",@@ -72,6 +78,8 @@"Keep your changes and replace the version updated elsewhere?": "내 변경 사항을 유지하고 다른 곳에서 업데이트된 버전을 바꿀까요?"},"de": {+ "Reconnecting…": "Verbindung wird hergestellt…",+ "Connection lost.": "Verbindung unterbrochen","The project changed elsewhere. Resolve the changes before continuing.": "Das Projekt wurde andernorts geändert. Lösen Sie den Konflikt, bevor Sie fortfahren.","Changes could not be saved. Check the connection and project before continuing.": "Änderungen konnten nicht gespeichert werden. Prüfen Sie Verbindung und Projekt.","A required file is missing. Check or replace it, then try again.": "Eine benötigte Datei fehlt. Prüfen oder ersetzen Sie sie und versuchen Sie es erneut.",@@ -96,6 +104,8 @@"Keep your changes and replace the version updated elsewhere?": "Eigene Änderungen behalten und die andernorts aktualisierte Version ersetzen?"},"fr": {+ "Reconnecting…": "Reconnexion…",+ "Connection lost.": "Connexion interrompue","The project changed elsewhere. Resolve the changes before continuing.": "Le projet a été modifié ailleurs. Résolvez le conflit avant de continuer.","Changes could not be saved. Check the connection and project before continuing.": "Les modifications n’ont pas pu être enregistrées. Vérifiez la connexion et le projet.","A required file is missing. Check or replace it, then try again.": "Un fichier nécessaire est introuvable. Vérifiez-le ou remplacez-le, puis réessayez.",@@ -120,6 +130,8 @@"Keep your changes and replace the version updated elsewhere?": "Garder vos modifications et remplacer la version mise à jour ailleurs ?"},"es": {+ "Reconnecting…": "Reconectando…",+ "Connection lost.": "Conexión perdida","The project changed elsewhere. Resolve the changes before continuing.": "El proyecto se modificó en otro lugar. Resuelve el conflicto antes de continuar.","Changes could not be saved. Check the connection and project before continuing.": "No se pudieron guardar los cambios. Revisa la conexión y el proyecto.","A required file is missing. Check or replace it, then try again.": "Falta un archivo necesario. Revísalo o reemplázalo y vuelve a intentarlo.",@@ -144,6 +156,8 @@"Keep your changes and replace the version updated elsewhere?": "¿Conservar tus cambios y reemplazar la versión actualizada en otro lugar?"},"pt-BR": {+ "Reconnecting…": "Reconectando…",+ "Connection lost.": "Conexão perdida","The project changed elsewhere. Resolve the changes before continuing.": "O projeto foi alterado em outro local. Resolva o conflito antes de continuar.","Changes could not be saved. Check the connection and project before continuing.": "Não foi possível salvar as alterações. Verifique a conexão e o projeto.","A required file is missing. Check or replace it, then try again.": "Um arquivo necessário está ausente. Verifique ou substitua o arquivo e tente novamente.",@@ -168,6 +182,8 @@"Keep your changes and replace the version updated elsewhere?": "Manter suas alterações e substituir a versão atualizada em outro local?"},"it": {+ "Reconnecting…": "Riconnessione…",+ "Connection lost.": "Connessione interrotta","The project changed elsewhere. Resolve the changes before continuing.": "Il progetto è stato modificato altrove. Risolvi il conflitto prima di continuare.","Changes could not be saved. Check the connection and project before continuing.": "Impossibile salvare le modifiche. Controlla la connessione e il progetto.","A required file is missing. Check or replace it, then try again.": "Manca un file necessario. Controllalo o sostituiscilo e riprova.",@@ -192,6 +208,8 @@"Keep your changes and replace the version updated elsewhere?": "Mantenere le tue modifiche e sostituire la versione aggiornata altrove?"},"ru": {+ "Reconnecting…": "Переподключение…",+ "Connection lost.": "Соединение потеряно","The project changed elsewhere. Resolve the changes before continuing.": "Проект изменён в другом месте. Разрешите конфликт, прежде чем продолжить.","Changes could not be saved. Check the connection and project before continuing.": "Не удалось сохранить изменения. Проверьте соединение и проект.","A required file is missing. Check or replace it, then try again.": "Нужный файл отсутствует. Проверьте или замените его и повторите попытку.",@@ -216,6 +234,8 @@"Keep your changes and replace the version updated elsewhere?": "Сохранить ваши изменения и заменить версию, обновлённую в другом месте?"},"tr": {+ "Reconnecting…": "Yeniden bağlanılıyor…",+ "Connection lost.": "Bağlantı kesildi","The project changed elsewhere. Resolve the changes before continuing.": "Proje başka bir yerde değiştirildi. Devam etmeden önce çakışmayı giderin.","Changes could not be saved. Check the connection and project before continuing.": "Değişiklikler kaydedilemedi. Bağlantıyı ve projeyi kontrol edin.","A required file is missing. Check or replace it, then try again.": "Gerekli bir dosya eksik. Dosyayı kontrol edin veya değiştirip tekrar deneyin.",diff --git a/studio/src/i18n/mvp-ui.json b/studio/src/i18n/mvp-ui.jsonindex 186f3c75..ab6655bb 100644--- a/studio/src/i18n/mvp-ui.json+++ b/studio/src/i18n/mvp-ui.json@@ -1,5 +1,6 @@{"ja": {+ "Join the OpenDesign community": "OpenDesign コミュニティに参加しませんか","Expand": "展開","Collapse": "折りたたむ","Expand left panel": "左パネルを展開",@@ -186,9 +187,11 @@"Edit y (whole animation)": "Y 座標を変更(アニメーション全体)","No clips yet": "クリップはまだありません","No editable content": "編集できる内容がありません",- "No content to export. Add media first.": "書き出す内容がありません。先に素材を追加してください。"+ "No content to export. Add media first.": "書き出す内容がありません。先に素材を追加してください。",+ "Select an element to edit its properties": "要素を選択してプロパティを編集"},"ko": {+ "Join the OpenDesign community": "OpenDesign 커뮤니티에 참여하세요","Expand": "펼치기","Collapse": "접기","Expand left panel": "왼쪽 패널 펼치기",@@ -375,9 +378,11 @@"Edit y (whole animation)": "Y 좌표 편집(전체 애니메이션)","No clips yet": "아직 클립이 없습니다","No editable content": "편집할 콘텐츠가 없습니다",- "No content to export. Add media first.": "내보낼 콘텐츠가 없습니다. 먼저 미디어를 추가하세요."+ "No content to export. Add media first.": "내보낼 콘텐츠가 없습니다. 먼저 미디어를 추가하세요.",+ "Select an element to edit its properties": "요소를 선택해 속성 편집"},"de": {+ "Join the OpenDesign community": "Tritt der OpenDesign-Community bei","Expand": "Erweitern","Collapse": "Einklappen","Expand left panel": "Linken Bereich öffnen",@@ -564,9 +569,11 @@"Edit y (whole animation)": "Y-Position ändern (gesamte Animation)","No clips yet": "Noch keine Clips","No editable content": "Keine bearbeitbaren Inhalte",- "No content to export. Add media first.": "Keine Inhalte zum Exportieren. Füge zuerst Medien hinzu."+ "No content to export. Add media first.": "Keine Inhalte zum Exportieren. Füge zuerst Medien hinzu.",+ "Select an element to edit its properties": "Element zum Bearbeiten wählen"},"fr": {+ "Join the OpenDesign community": "Rejoignez la communauté OpenDesign","Expand": "Développer","Collapse": "Réduire","Expand left panel": "Ouvrir le panneau gauche",@@ -753,9 +760,11 @@"Edit y (whole animation)": "Modifier la position Y (animation entière)","No clips yet": "Aucun clip pour le moment","No editable content": "Aucun contenu à modifier",- "No content to export. Add media first.": "Aucun contenu à exporter. Ajoutez d’abord des médias."+ "No content to export. Add media first.": "Aucun contenu à exporter. Ajoutez d’abord des médias.",+ "Select an element to edit its properties": "Sélectionnez un élément à modifier"},"ru": {+ "Join the OpenDesign community": "Присоединяйтесь к сообществу OpenDesign","Expand": "Развернуть","Collapse": "Свернуть","Expand left panel": "Развернуть левую панель",@@ -942,9 +951,11 @@"Edit y (whole animation)": "Изменить координату Y (вся анимация)","No clips yet": "Пока нет клипов","No editable content": "Нет содержимого для редактирования",- "No content to export. Add media first.": "Нет содержимого для экспорта. Сначала добавьте медиафайлы."+ "No content to export. Add media first.": "Нет содержимого для экспорта. Сначала добавьте медиафайлы.",+ "Select an element to edit its properties": "Выберите элемент для правки"},"es": {+ "Join the OpenDesign community": "Únete a la comunidad de OpenDesign","Expand": "Expandir","Collapse": "Contraer","Expand left panel": "Abrir panel izquierdo",@@ -1131,9 +1142,11 @@"Edit y (whole animation)": "Editar posición Y (toda la animación)","No clips yet": "Aún no hay clips","No editable content": "No hay contenido editable",- "No content to export. Add media first.": "No hay contenido para exportar. Añade archivos multimedia primero."+ "No content to export. Add media first.": "No hay contenido para exportar. Añade archivos multimedia primero.",+ "Select an element to edit its properties": "Selecciona un elemento para editar"},"pt-BR": {+ "Join the OpenDesign community": "Junte-se à comunidade OpenDesign","Expand": "Expandir","Collapse": "Recolher","Expand left panel": "Abrir painel esquerdo",@@ -1320,9 +1333,11 @@"Edit y (whole animation)": "Editar posição Y (animação inteira)","No clips yet": "Nenhum clipe ainda","No editable content": "Nenhum conteúdo editável",- "No content to export. Add media first.": "Não há conteúdo para exportar. Adicione mídia primeiro."+ "No content to export. Add media first.": "Não há conteúdo para exportar. Adicione mídia primeiro.",+ "Select an element to edit its properties": "Selecione um elemento para editar"},"it": {+ "Join the OpenDesign community": "Unisciti alla community OpenDesign","Expand": "Espandi","Collapse": "Comprimi","Expand left panel": "Apri pannello sinistro",@@ -1509,9 +1524,11 @@"Edit y (whole animation)": "Modifica posizione Y (intera animazione)","No clips yet": "Nessuna clip ancora","No editable content": "Nessun contenuto modificabile",- "No content to export. Add media first.": "Nessun contenuto da esportare. Aggiungi prima dei media."+ "No content to export. Add media first.": "Nessun contenuto da esportare. Aggiungi prima dei media.",+ "Select an element to edit its properties": "Seleziona un elemento da modificare"},"tr": {+ "Join the OpenDesign community": "OpenDesign topluluğuna katılın","Expand": "Genişlet","Collapse": "Daralt","Expand left panel": "Sol paneli aç",@@ -1698,6 +1715,7 @@"Edit y (whole animation)": "Y konumunu düzenle (tüm animasyon)","No clips yet": "Henüz klip yok","No editable content": "Düzenlenebilir içerik yok",- "No content to export. Add media first.": "Dışa aktarılacak içerik yok. Önce medya ekleyin."+ "No content to export. Add media first.": "Dışa aktarılacak içerik yok. Önce medya ekleyin.",+ "Select an element to edit its properties": "Düzenlemek için bir öğe seçin"}}diff --git a/studio/src/i18n/mvp-zh-CN.json b/studio/src/i18n/mvp-zh-CN.jsonindex d1c6c240..61525dc7 100644--- a/studio/src/i18n/mvp-zh-CN.json+++ b/studio/src/i18n/mvp-zh-CN.json@@ -1,4 +1,5 @@{+ "Join the OpenDesign community": "欢迎加入 OpenDesign 社群","System": "系统","Imported": "已导入","Document": "文档",@@ -987,5 +988,6 @@"Align left": "左对齐","No content to export. Add media first.": "暂无可导出的内容,请先添加素材。","Expand": "展开",- "No editable content": "暂无可编辑内容"+ "No editable content": "暂无可编辑内容",+ "Select an element to edit its properties": "选择元素后可编辑属性"}diff --git a/studio/src/motion/CommunityLink.tsx b/studio/src/motion/CommunityLink.tsxnew file mode 100644index 00000000..c3c04a87--- /dev/null+++ b/studio/src/motion/CommunityLink.tsx@@ -0,0 +1,20 @@+import { useI18n } from '../i18n/I18n';+import { Tooltip } from '../components/ui/Tooltip';+import feishuLogo from './community-feishu.svg';+import discordLogo from './community-discord.svg';++// Shared destinations and brand artwork from OpenDesign's community entry.+const FEISHU_URL = 'https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=a38j32fc-756c-4d02-846b-53356fee12a7';+const DISCORD_URL = 'https://discord.gg/mHAjSMV6gz';++export function CommunityLink() {+ const { locale, t } = useI18n();+ const chinese = locale === 'zh-CN';+ const label = t('Join the OpenDesign community');+ return <Tooltip label={label} side="bottom" lines={2}>+ <a className="motion-icon-button motion-community-link" href={chinese ? FEISHU_URL : DISCORD_URL}+ target="_blank" rel="noopener noreferrer" aria-label={label}>+ <img src={chinese ? feishuLogo : discordLogo} width="16" height="16" alt="" />+ </a>+ </Tooltip>;+}diff --git a/studio/src/motion/MotionStudioHost.test.tsx b/studio/src/motion/MotionStudioHost.test.tsxindex 0e558655..d5044347 100644--- a/studio/src/motion/MotionStudioHost.test.tsx+++ b/studio/src/motion/MotionStudioHost.test.tsx@@ -3,10 +3,13 @@ import React, { act } from 'react';import { createRoot, type Root } from 'react-dom/client';import { afterEach, beforeEach, expect, it, vi } from 'vitest';import { MotionEditorFrame, MotionStudioHost } from './MotionStudioHost';+import feishuLogo from './community-feishu.svg';+import discordLogo from './community-discord.svg';import { StudioHeader } from '../components/StudioHeader';import { useMotionHistoryOperation } from './MotionHistoryState';const state = vi.hoisted(() => ({+ connectionError: '',renderQueue: { isRendering: false, ffmpegMissing: false },writeBlockedReason: null as string | null,open: vi.fn(), export: vi.fn(), setTab: vi.fn(), setCollapsed: vi.fn(),@@ -28,7 +31,7 @@ vi.mock('../utils/studioTelemetry', () => ({ trackStudioEvent: vi.fn() }));vi.mock('./MotionHistoryPanel', () => ({ MotionHistoryPanel: () => <div>History versions</div> }));vi.mock('./useWorkspace', () => ({ useWorkspace: () => ({status: state.status, projects: [{ id: 'demo', title: 'Demo' }, { id: 'second', title: 'Second' }],- busy: false, error: '', clearError: vi.fn(), open: state.open, openSession: state.open, startSession: state.create, create: state.create, home: state.home, rename: state.rename,+ busy: false, error: state.connectionError, errorSource: 'connection', clearError: vi.fn(), open: state.open, openSession: state.open, startSession: state.create, create: state.create, home: state.home, rename: state.rename,}) }));vi.mock('./ConnectionDialog', () => ({ ConnectionDialog: ({ open, section, busy, onOpen }: { open: boolean; section: string; busy: boolean; onOpen: (id: string) => void }) =>open ? <div role="dialog" aria-label="MCP connections" data-section={section}>@@ -41,6 +44,7 @@ let container: HTMLDivElement;beforeEach(() => {vi.clearAllMocks();localStorage.clear();+ state.connectionError = '';state.renderQueue.isRendering = false;state.writeBlockedReason = null;state.status = { projectId: 'demo', historyRestoreError: null };@@ -221,3 +225,36 @@ it('dismissing a write-blocking notice does not enable project creation', () =>openSidebar();expect(document.querySelector<HTMLButtonElement>('.motion-session-heading button')?.disabled).toBe(true);});+++it.each(['zh-CN', 'en', 'ja', 'ko', 'de', 'fr', 'ru', 'es', 'pt-BR', 'it', 'tr'])('opens the language-appropriate community beside Export (%s)', locale => {+ localStorage.setItem('motion.studio.locale', locale);+ render();+ const link = container.querySelector<HTMLAnchorElement>('.motion-community-link')!;+ expect(link.href).toBe(locale === 'zh-CN'+ ? 'https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=a38j32fc-756c-4d02-846b-53356fee12a7'+ : 'https://discord.gg/mHAjSMV6gz');+ expect(link.target).toBe('_blank');+ expect(link.rel).toContain('noopener');+ expect(link.querySelector('img')?.getAttribute('src')).toBe(locale === 'zh-CN' ? feishuLogo : discordLogo);+ expect(link.getAttribute('aria-label')).toBeTruthy();+ const exportButton = container.querySelector('[data-testid="header-export"]')!;+ expect(link.compareDocumentPosition(exportButton) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();+});+++it('shows connection failure as a one-line reconnecting toast and removes it on recovery', () => {+ state.connectionError = 'Failed to fetch /private/project';+ render();+ const toast = container.querySelector('[data-testid="motion-connection-toast"]')!;+ expect(toast.textContent).toBe('连接已断开重连中…');+ expect(toast.querySelector('.truncate')).not.toBeNull();+ expect(container.querySelector('.motion-error-notice')).toBeNull();+ expect(toast.textContent).not.toMatch(/private|details|详情/);+ expect(toast.querySelector('button')).toBeNull();+ render();+ expect(container.querySelectorAll('[data-testid="motion-connection-toast"]')).toHaveLength(1);+ state.connectionError = '';+ render();+ expect(container.querySelector('[data-testid="motion-connection-toast"]')).toBeNull();+});diff --git a/studio/src/motion/MotionStudioHost.tsx b/studio/src/motion/MotionStudioHost.tsxindex f1895725..ee44392b 100644--- a/studio/src/motion/MotionStudioHost.tsx+++ b/studio/src/motion/MotionStudioHost.tsx@@ -1,3 +1,4 @@+import { CommunityLink } from './CommunityLink';import { StudioErrorBoundary } from '../components/StudioErrorBoundary';import { I18nProvider, useI18n } from "../i18n/I18n";import { useEffect, useRef, useState, type ReactNode } from 'react';@@ -138,6 +139,7 @@ const host: StudioHost = {brand: <WorkspaceBrand />,projectLabel: <WorkspaceProject />,headerActions: <WorkspaceActions />,+ communityAction: <CommunityLink />,historyActions: <WorkspaceHistoryActions />,previewAction: <></>,windowMenu: <></>,diff --git a/studio/src/motion/MotionTimelineMedia.tsx b/studio/src/motion/MotionTimelineMedia.tsxindex 504979f3..ae077a4d 100644--- a/studio/src/motion/MotionTimelineMedia.tsx+++ b/studio/src/motion/MotionTimelineMedia.tsx@@ -59,5 +59,5 @@ export function MotionTimelineMedia({ projectId, compositionId, disabled, onFilereturn () => { bound = false; bind(null); };}, [bind, projectId, compositionId, t]);if (!gateway) return null;- return <div className="motion-timeline-media-actions">{!mvp && <button disabled={disabled} onClick={event => gateway.openGenerator({ anchor: mediaPopoverAnchor(event.currentTarget) })}>{t('Generate media')}</button>}<button disabled={disabled || !onFileDrop} onClick={gateway.importFiles}>{t('Import files')}</button></div>;+ return <div className="motion-timeline-media-actions">{!mvp && <button disabled={disabled} onClick={event => gateway.openGenerator({ anchor: mediaPopoverAnchor(event.currentTarget) })}>{t('Generate media')}</button>}<button className={mvp ? "motion-import-button" : undefined} disabled={disabled || !onFileDrop} onClick={gateway.importFiles}>{t(mvp ? 'Import' : 'Import files')}</button></div>;}diff --git a/studio/src/motion/StudioHost.tsx b/studio/src/motion/StudioHost.tsxindex 2719d8f2..0e060fce 100644--- a/studio/src/motion/StudioHost.tsx+++ b/studio/src/motion/StudioHost.tsx@@ -7,6 +7,7 @@ export interface StudioHost {brand?: ReactNode;projectLabel?: ReactNode;headerActions?: ReactNode;+ communityAction?: ReactNode;previewAction?: ReactNode;historyActions?: ReactNode;windowMenu?: ReactNode;diff --git a/studio/src/motion/WorkspaceFrame.tsx b/studio/src/motion/WorkspaceFrame.tsxindex cca60426..48abf573 100644--- a/studio/src/motion/WorkspaceFrame.tsx+++ b/studio/src/motion/WorkspaceFrame.tsx@@ -7,6 +7,7 @@ import { useWorkspace } from './useWorkspace';import { ThemeToggle } from '../components/ThemeToggle';import { Tooltip } from '../components/ui/Tooltip';import { Dialog } from '@base-ui/react/dialog';+import { StudioToast } from '../components/StudioToast';import { ErrorNotice } from '../components/ui/ErrorNotice';import { isConnectionFailure } from '../components/ui/errorNoticeMessage';import { useShownStudioTheme } from '../utils/studioTheme';@@ -77,10 +78,13 @@ export function WorkspaceFrame({ children, waitForSaves, projectId, sessionId, b</Dialog.Popup></Dialog.Portal><div className="motion-workspace-content">- {visibleNotice && <ErrorNotice key={noticeKey} message={notice}- action={workspace.error && workspace.errorSource === 'connection' && isConnectionFailure(notice)- ? { label: 'Reconnect', run: workspace.retryConnection, busy: workspace.checkingConnection } : undefined}- onDismiss={() => { setDismissedNotice(noticeKey); if (workspace.error) workspace.clearError(); }} />}+ {visibleNotice && (workspace.error && workspace.errorSource === 'connection' && isConnectionFailure(notice)+ ? <div data-testid="motion-connection-toast" className="pointer-events-none absolute top-16 left-1/2 z-91 flex max-w-[calc(100%-32px)] -translate-x-1/2 justify-center">+ <StudioToast message="Connection lost." tone="error" presentation="feedback" singleLine+ status="Reconnecting…" />+ </div>+ : <ErrorNotice key={noticeKey} message={notice}+ onDismiss={() => { setDismissedNotice(noticeKey); if (workspace.error) workspace.clearError(); }} />)}{children}</div></div>diff --git a/studio/src/motion/community-discord.svg b/studio/src/motion/community-discord.svgnew file mode 100644index 00000000..165f2138--- /dev/null+++ b/studio/src/motion/community-discord.svg@@ -0,0 +1 @@+<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><path fill="#5865F2" d="M40.634 8.31121C37.5747 6.90744 34.294 5.87321 30.8638 5.28087C30.8013 5.26943 30.7389 5.298 30.7067 5.35514C30.2848 6.10557 29.8175 7.08457 29.4902 7.85406C25.8008 7.30172 22.1304 7.30172 18.5166 7.85406C18.1893 7.06747 17.705 6.10557 17.2811 5.35514C17.249 5.29991 17.1866 5.27134 17.1241 5.28087C13.6958 5.87132 10.4151 6.90555 7.35387 8.31121C7.32737 8.32263 7.30465 8.3417 7.28958 8.36644C1.06678 17.6632 -0.6379 26.7314 0.19836 35.6872C0.202144 35.731 0.22674 35.7729 0.260796 35.7995C4.36642 38.8146 8.34341 40.645 12.2466 41.8583C12.309 41.8773 12.3752 41.8545 12.415 41.803C13.3383 40.5422 14.1613 39.2127 14.867 37.8146C14.9086 37.7328 14.8688 37.6356 14.7837 37.6032C13.4783 37.108 12.2352 36.5042 11.0395 35.8186C10.9449 35.7634 10.9373 35.6281 11.0243 35.5633C11.2759 35.3748 11.5276 35.1786 11.7679 34.9805C11.8114 34.9443 11.872 34.9367 11.9231 34.9595C19.7786 38.5461 28.2831 38.5461 36.0459 34.9595C36.097 34.9348 36.1576 34.9424 36.203 34.9786C36.4433 35.1767 36.6949 35.3748 36.9484 35.5633C37.0354 35.6281 37.0298 35.7634 36.9352 35.8186C35.7394 36.5176 34.4964 37.108 33.189 37.6014C33.1039 37.6337 33.0661 37.7328 33.1077 37.8146C33.8285 39.2108 34.6515 40.5402 35.5578 41.8012C35.5956 41.8545 35.6637 41.8773 35.7262 41.8583C39.6483 40.645 43.6252 38.8146 47.7309 35.7995C47.7668 35.7729 47.7895 35.7329 47.7933 35.6891C48.7942 25.3352 46.117 16.3413 40.6964 8.36833C40.6832 8.3417 40.6605 8.32263 40.634 8.31121ZM16.04 30.234C13.675 30.234 11.7263 28.0627 11.7263 25.3962C11.7263 22.7296 13.6372 20.5583 16.04 20.5583C18.4617 20.5583 20.3916 22.7487 20.3538 25.3962C20.3538 28.0627 18.4428 30.234 16.04 30.234ZM31.9895 30.234C29.6245 30.234 27.6758 28.0627 27.6758 25.3962C27.6758 22.7296 29.5867 20.5583 31.9895 20.5583C34.4113 20.5583 36.3411 22.7487 36.3033 25.3962C36.3033 28.0627 34.4113 30.234 31.9895 30.234Z"/></svg>diff --git a/studio/src/motion/community-feishu.svg b/studio/src/motion/community-feishu.svgnew file mode 100644index 00000000..e6a47ec0--- /dev/null+++ b/studio/src/motion/community-feishu.svg@@ -0,0 +1 @@+<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#00D6B9" d="M12.9238 12.8029C12.9427 12.784 12.9616 12.7682 12.9806 12.7493C13.0184 12.7146 13.0563 12.6767 13.091 12.6389L13.1667 12.5631L13.397 12.336L14.7315 11.0173L15.0659 10.686C15.129 10.6229 15.1952 10.563 15.2615 10.5031C15.3845 10.3926 15.5076 10.2854 15.6369 10.1813C15.7536 10.0866 15.8767 9.99514 15.9997 9.9068C16.1732 9.78376 16.3499 9.67019 16.5329 9.55977C16.7127 9.45251 16.8957 9.35471 17.085 9.26322C17.2616 9.17804 17.4415 9.09917 17.6276 9.02661C17.7317 8.9856 17.8326 8.94774 17.9399 8.91304C17.9935 8.89411 18.044 8.87834 18.0977 8.86256C17.6276 7.00439 16.7632 5.3008 15.5991 3.84959C15.3719 3.56566 15.0249 3.40161 14.6589 3.40161H5.0084C4.83489 3.40161 4.76233 3.6256 4.90114 3.72656C8.18528 6.13997 10.9236 9.24114 12.9017 12.825C12.908 12.8187 12.9175 12.8124 12.9238 12.8029Z"/><path fill="#3370FF" d="M9.09696 21.2986C14.0815 21.2986 18.4225 18.5476 20.6877 14.4843C20.7666 14.3423 20.8454 14.1972 20.918 14.052C20.8044 14.2729 20.6751 14.4811 20.5394 14.6767C20.4889 14.7461 20.4385 14.8155 20.388 14.8818C20.3217 14.9669 20.2555 15.049 20.1861 15.1278C20.1324 15.1909 20.0757 15.2509 20.0189 15.3108C19.9021 15.4307 19.7823 15.5474 19.6561 15.6547C19.5867 15.7146 19.5141 15.7714 19.4415 15.8282C19.3564 15.8944 19.268 15.9575 19.1797 16.0143C19.1229 16.0522 19.0661 16.09 19.0093 16.1247C18.9494 16.1626 18.8895 16.1973 18.8264 16.232C18.7002 16.3014 18.574 16.3645 18.4446 16.4245C18.3311 16.4749 18.2175 16.5223 18.1008 16.5633C17.9746 16.6106 17.8452 16.6516 17.7159 16.6863C17.5234 16.7399 17.3247 16.7809 17.1259 16.8125C16.9808 16.8346 16.8357 16.8504 16.6874 16.863C16.5328 16.8724 16.3751 16.8787 16.2173 16.8756C16.0438 16.8724 15.8703 16.863 15.6936 16.844C15.5643 16.8314 15.435 16.8125 15.3056 16.7873C15.192 16.7683 15.0785 16.7431 14.9649 16.7178C14.9049 16.7021 14.845 16.6895 14.7851 16.6737C14.6179 16.6295 14.4538 16.5822 14.2898 16.5349C14.2077 16.5096 14.1257 16.4875 14.0437 16.4623C13.9206 16.4245 13.7976 16.3897 13.6777 16.3519C13.5768 16.3203 13.479 16.2888 13.378 16.2572C13.2834 16.2257 13.1887 16.1942 13.0941 16.1626C13.031 16.1405 12.9647 16.1184 12.9016 16.0964C12.8228 16.0711 12.7471 16.0427 12.6682 16.0143C12.6114 15.9954 12.5578 15.9765 12.501 15.9544C12.3906 15.9134 12.2802 15.8755 12.1729 15.8345C12.1098 15.8093 12.0467 15.7872 11.9836 15.7619C11.8984 15.7304 11.8132 15.6957 11.7312 15.6641C11.6429 15.6294 11.5514 15.5947 11.4631 15.5569C11.4063 15.5348 11.3463 15.5096 11.2895 15.4875C11.217 15.4591 11.1476 15.4275 11.075 15.3991C11.0214 15.3771 10.9646 15.3518 10.911 15.3297C10.8542 15.3045 10.7974 15.2793 10.7406 15.254C10.6901 15.2319 10.6428 15.2099 10.5923 15.1878C10.5482 15.1688 10.5008 15.1468 10.4567 15.1278C10.4094 15.1057 10.3652 15.0868 10.3179 15.0647C10.2705 15.0427 10.2232 15.0206 10.1759 14.9985C10.116 14.9701 10.056 14.9417 9.99608 14.9165C9.93299 14.8881 9.87304 14.8565 9.80995 14.8281C9.7437 14.7966 9.67745 14.765 9.6112 14.7303C9.55441 14.7019 9.49762 14.6735 9.44084 14.6483C6.45324 13.1592 3.80321 11.1717 1.54438 8.76145C1.43081 8.64157 1.23206 8.72044 1.23206 8.88449L1.23836 18.0933C1.23836 18.494 1.43712 18.8726 1.77153 19.0934C3.86631 20.4878 6.38699 21.2986 9.09696 21.2986Z"/><path fill="#133C9A" d="M23.7322 9.29488C22.7226 8.79642 21.5838 8.5188 20.3818 8.5188C19.6688 8.5188 18.9747 8.6166 18.3217 8.80273C18.246 8.82481 18.1703 8.8469 18.0977 8.86898C18.0441 8.88476 17.9905 8.90368 17.94 8.91946C17.8359 8.95416 17.7318 8.99202 17.6276 9.03303C17.4447 9.10559 17.2617 9.18446 17.085 9.26964C16.8957 9.36113 16.7128 9.45893 16.5329 9.56619C16.35 9.67345 16.1701 9.79018 15.9998 9.91322C15.8767 10.0016 15.7569 10.093 15.637 10.1877C15.5076 10.2918 15.3846 10.3991 15.2616 10.5095C15.1953 10.5694 15.1322 10.6325 15.066 10.6925L14.7315 11.0206L13.3939 12.3424L13.1636 12.5696L13.0879 12.6453C13.05 12.6831 13.0122 12.7178 12.9775 12.7557C12.9586 12.7746 12.9396 12.7904 12.9207 12.8093C12.8923 12.8377 12.8639 12.863 12.8355 12.8882C12.804 12.9166 12.7724 12.9481 12.7409 12.9765C11.9143 13.7368 10.9931 14.3899 9.99304 14.923C10.053 14.9514 10.1129 14.9798 10.1729 15.0051C10.2202 15.0271 10.2675 15.0492 10.3148 15.0713C10.359 15.0934 10.4063 15.1123 10.4536 15.1344C10.4978 15.1533 10.5451 15.1754 10.5893 15.1943C10.6398 15.2164 10.6871 15.2385 10.7376 15.2606C10.7944 15.2858 10.8511 15.3111 10.9079 15.3363C10.9616 15.3584 11.0184 15.3836 11.072 15.4057C11.1445 15.4373 11.2139 15.4657 11.2865 15.4941C11.3433 15.5193 11.4032 15.5414 11.46 15.5635C11.5484 15.5982 11.6367 15.636 11.7282 15.6707C11.8134 15.7023 11.8954 15.737 11.9806 15.7685C12.0437 15.7938 12.1068 15.8158 12.1699 15.8411C12.2803 15.8821 12.3875 15.9231 12.498 15.961C12.5547 15.9799 12.6084 16.002 12.6652 16.0209C12.744 16.0493 12.8197 16.0745 12.8986 16.1029C12.9617 16.125 13.028 16.1471 13.0911 16.1692C13.1857 16.2007 13.2803 16.2323 13.375 16.2638C13.4728 16.2954 13.5737 16.3269 13.6747 16.3585C13.7977 16.3963 13.9176 16.4342 14.0406 16.4689C14.1227 16.4941 14.2047 16.5162 14.2867 16.5414C14.4508 16.5888 14.618 16.6361 14.782 16.6803C14.842 16.696 14.9019 16.7118 14.9618 16.7244C15.0754 16.7528 15.189 16.7749 15.3026 16.7938C15.4319 16.8159 15.5613 16.8348 15.6906 16.8506C15.8673 16.8695 16.0408 16.8822 16.2143 16.8822C16.372 16.8853 16.5298 16.879 16.6844 16.8695C16.8326 16.8601 16.9778 16.8412 17.1229 16.8191C17.3248 16.7875 17.5204 16.7465 17.7128 16.6929C17.8422 16.6582 17.9715 16.6172 18.0977 16.5698C18.2144 16.5257 18.328 16.4815 18.4416 16.4279C18.5709 16.3679 18.7003 16.3048 18.8233 16.2354C18.8833 16.2007 18.9464 16.166 19.0063 16.1282C19.0631 16.0935 19.1199 16.0556 19.1767 16.0178C19.265 15.9578 19.3533 15.8947 19.4385 15.8316C19.5111 15.7748 19.5836 15.718 19.653 15.6581C19.7792 15.5508 19.8991 15.4341 20.0158 15.3142C20.0726 15.2543 20.1294 15.1943 20.183 15.1313C20.2524 15.0524 20.3187 14.9704 20.3849 14.8852C20.4354 14.8189 20.4859 14.7495 20.5364 14.6801C20.672 14.4845 20.7982 14.2763 20.9118 14.0586L21.0411 13.7999L22.2084 11.4748L22.2053 11.4812C22.5807 10.6578 23.1012 9.91953 23.7322 9.29488Z"/></svg>diff --git a/studio/src/motion/theme.css b/studio/src/motion/theme.cssindex 03d909bc..d6003909 100644--- a/studio/src/motion/theme.css+++ b/studio/src/motion/theme.css@@ -322,6 +322,8 @@ button, input, select, textarea { font-family: inherit; }.motion-studio-header.motion-studio-header-centered > div:last-child { justify-self: end; flex-wrap: nowrap; gap: 16px; }.motion-studio-header-centered .motion-header-history-actions { gap: 16px; }.motion-studio-header-centered .motion-workspace-actions { padding-right: 0; margin-right: 0; border-right: 0; }+.motion-community-link { flex-shrink: 0; }+.motion-community-link img { display: block; }.motion-header-brand { display: inline-flex; align-items: center; gap: 10px; }.motion-header-brand img { display: block; width: 104px; height: auto; }.motion-header-project .motion-project-control { justify-content: center; }@@ -369,7 +371,7 @@ button, input, select, textarea { font-family: inherit; }}/* Timeline menus use the shared floating surface and the same menu typography. */-:root[data-motion-ui] .hf-od-floating-surface.motion-clip-context-menu {+:root[data-motion-ui] .hf-od-floating-surface.motion-context-menu {font-family: var(--motion-font-sans);background: var(--motion-raised);-webkit-backdrop-filter: none;@@ -377,7 +379,7 @@ button, input, select, textarea { font-family: inherit; }border: 0;box-shadow: var(--motion-shadow-sm);}-:root[data-motion-ui] .motion-clip-context-menu [role="menuitem"] {+:root[data-motion-ui] .motion-context-menu [role="menuitem"] {min-height: 28px;padding: 6px 8px;border-radius: var(--motion-radius-sm);@@ -386,7 +388,8 @@ button, input, select, textarea { font-family: inherit; }font-weight: 400;line-height: 16px;}-:root[data-motion-ui] .motion-clip-context-menu [role="group"] { border-color: var(--motion-border); }+:root[data-motion-ui] .motion-context-menu [role="group"] { border-color: var(--motion-border); }+:root[data-motion-ui] .motion-context-menu [role="menuitem"]:is(:hover, :focus-visible) { background: var(--motion-hover); }/* Empty projects keep the preview mounted, but offer an actionable blank state. */.motion-preview-empty { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; overflow: auto; background: var(--motion-bg); color: var(--motion-text); padding: 20px; }@@ -406,10 +409,21 @@ button, input, select, textarea { font-family: inherit; }.motion-empty-timeline.is-drag-over .motion-empty-timeline-lane { border-color: var(--motion-accent); color: var(--motion-accent); }.motion-panel-empty-content { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }+/* Asset and timeline imports share one compact secondary-button recipe. */+:root[data-motion-ui] button.motion-import-button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex-shrink: 0; height: 28px; min-height: 28px; padding: 0 8px; border: 1px solid var(--motion-border); border-radius: 6px; background: var(--motion-raised); font-size: 11px; font-weight: 500; line-height: 16px; white-space: nowrap; }+:root[data-motion-ui] button.motion-import-button:enabled { color: var(--motion-strong); }+:root[data-motion-ui] button.motion-import-button:enabled:hover { background: var(--motion-hover); }+/* The toolbar owns the single separator above both populated and empty timelines. */+:root[data-motion-ui] :is([data-timeline-element-count], .motion-timeline-empty) { border-top: 0; }.motion-assets-empty-drop { width: min(240px, 100%); min-height: 132px; padding: 24px 16px; border: 1px dashed var(--motion-border); border-radius: 8px; }/* Passive empty hints share the disabled-control tone in both themes. */-.motion-panel-empty-content { color: color-mix(in srgb, var(--motion-strong) 30%, var(--motion-panel)); font-size: 10px; line-height: 1.5; }+.motion-panel-empty-content { color: color-mix(in srgb, var(--motion-strong) 30%, var(--motion-panel)); font-size: 12px; line-height: 1.5; }.motion-panel-empty-content :is(svg, p) { color: inherit; font-size: inherit; }:root[data-motion-ui] .motion-timeline-zoom input:disabled { opacity: .3; cursor: not-allowed; }:root[data-motion-ui] .motion-timeline-zoom input:disabled::-webkit-slider-thumb { cursor: not-allowed; }++/* The outlined Import button needs spacing, not another divider. */+:root[data-motion-ui] .motion-timeline-media-actions { border-left: 0; padding-left: 0; }+:root[data-motion-ui] .motion-timeline-zoom { margin-right: 0; }+:root[data-motion-ui] .motion-timeline-zoom::after { display: none; }diff --git a/studio/src/motion/workspace.css b/studio/src/motion/workspace.cssindex c9356ebe..1032b96b 100644--- a/studio/src/motion/workspace.css+++ b/studio/src/motion/workspace.css@@ -1,6 +1,7 @@/* Workspace navigation, project conversation and native editing are separate surfaces. */.motion-workspace { display: flex; height: 100%; min-height: 0; width: 100%; overflow: hidden; color: var(--motion-text); background: var(--motion-bg); }-.motion-workspace-content { position: relative; display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; container-type: inline-size; background: var(--motion-panel); overflow: hidden; }+/* The workspace is fixed; focusing portaled dock controls must not scroll it. */+.motion-workspace-content { position: relative; display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; container-type: inline-size; background: var(--motion-panel); overflow: clip; }.motion-workspace-content > .h-full { flex: 1; min-height: 0; height: auto; }.motion-sidebar { display: flex; flex-direction: column; flex: 0 0 224px; width: 224px; min-height: 0; padding: 12px 12px 12px; border-right: 1px solid var(--motion-border); background: var(--motion-bg); }.motion-sidebar-brand { display: flex; align-items: center; justify-content: flex-start; margin-bottom: 16px; padding-inline: 4px; gap: 10px; }diff --git a/studio/src/player/components/ClipBadges.tsx b/studio/src/player/components/ClipBadges.tsxindex 337d1abe..2d7670f2 100644--- a/studio/src/player/components/ClipBadges.tsx+++ b/studio/src/player/components/ClipBadges.tsx@@ -1,3 +1,4 @@+import { useMvpEditor } from "../../motion/StudioHost";import { useI18n } from "../../i18n/I18n";import { memo, type MouseEvent } from "react";import type { TimelineElement } from "../store/playerStore";@@ -38,7 +39,8 @@ export const ClipBadges = memo(function ClipBadges({const { t } = useI18n();const state = useClipToolState(el);const effects = readClipEffects(state);- const volume = clipVolumeBadge(state);+ const mvp = useMvpEditor();+ const volume = mvp ? null : clipVolumeBadge(state);const hasEffects = effects.length > 0;const openMenu = (event: MouseEvent) => {event.stopPropagation();diff --git a/studio/src/player/components/ClipContextMenu.tsx b/studio/src/player/components/ClipContextMenu.tsxindex 2eedc87d..2cb1294e 100644--- a/studio/src/player/components/ClipContextMenu.tsx+++ b/studio/src/player/components/ClipContextMenu.tsx@@ -140,7 +140,7 @@ export const ClipContextMenu = memo(function ClipContextMenu({ref={menuRef}role="menu"aria-label={t("Clip actions")}- className={`${mvp ? `${popupSurface} motion-clip-context-menu p-1 shadow-menu` : menuClasses.panel} fixed z-200 min-w-[180px]`}+ className={`${mvp ? `${popupSurface} motion-context-menu p-1 shadow-menu` : menuClasses.panel} fixed z-200 min-w-[180px]`}style={{ left: adjustedX, top: adjustedY }}>{hostItems.length > 0 && (diff --git a/studio/src/player/components/TimelineClip.test.tsx b/studio/src/player/components/TimelineClip.test.tsxindex a4777404..d8b6053d 100644--- a/studio/src/player/components/TimelineClip.test.tsx+++ b/studio/src/player/components/TimelineClip.test.tsx@@ -74,10 +74,10 @@ function renderClip({}describe("TimelineClip", () => {- it("removes only duplicate MVP titles while retaining clip identity, content and badges", () => {+ it.each(["First Bg", "Other track", undefined])("hides MVP clip titles for track %s while retaining identity, content and badges", (trackLabel) => {const { host, root, onClick } = renderClip({element: { id: "bg", label: "First Bg", tag: "div", start: 0, duration: 3, track: 0 },- trackLabel: "First Bg", mvp: true,+ trackLabel, mvp: true,});expect(host.querySelector(".timeline-clip__label")).toBeNull();expect(host.querySelector('[data-label-in-track="true"]')).not.toBeNull();@@ -91,9 +91,9 @@ describe("TimelineClip", () => {});it.each([- { trackLabel: "Other track", mvp: true },+ { trackLabel: "Other track", mvp: false },{ trackLabel: "First Bg", mvp: false },- ])("keeps titles when they add information or outside the MVP: %j", (options) => {+ ])("keeps titles outside the MVP: %j", (options) => {const { host, root } = renderClip({element: { id: "bg", label: "First Bg", tag: "div", start: 0, duration: 3, track: 0 },...options,diff --git a/studio/src/player/components/TimelineClip.tsx b/studio/src/player/components/TimelineClip.tsxindex c9cacb42..a35eb0e3 100644--- a/studio/src/player/components/TimelineClip.tsx+++ b/studio/src/player/components/TimelineClip.tsx@@ -65,7 +65,6 @@ export function clipZoomKey(el: TimelineElement, pps: number, interacting: boole// fallow-ignore-next-line complexityexport const TimelineClip = memo(function TimelineClip({el,- trackLabel,pps,passengerStyle,clipY,@@ -97,8 +96,7 @@ export const TimelineClip = memo(function TimelineClip({const isAudioClip = isAudioTimelineElement(el);const ladder = clipWidthLadder(widthPx);const showHandles = handleOpacity > 0.01 && (widthPx >= HANDLES_MIN_PX || isSelected);- const duplicateLabel = mvp && trackLabel === displayLabel;- const showLabel = !duplicateLabel && (!isAudioClip || ladder === "labeled");+ const showLabel = !mvp && (!isAudioClip || ladder === "labeled");const showDefaultText = !hasCustomContent && ladder === "labeled";const startLabel = el.start.toFixed(1);const endLabel = (el.start + el.duration).toFixed(1);@@ -159,7 +157,7 @@ export const TimelineClip = memo(function TimelineClip({data-clip-start={el.start}data-clip-end={el.start + el.duration}data-clip-hidden={el.hidden ? "true" : undefined}- data-label-in-track={duplicateLabel ? "true" : undefined}+ data-label-in-track={mvp ? "true" : undefined}data-link-color={linkColor ?? undefined}data-ladder={ladder}data-active={isActive ? "" : undefined}diff --git a/studio/src/player/components/TimelineEmptyState.tsx b/studio/src/player/components/TimelineEmptyState.tsxindex 00ce74ca..dbfb4ddb 100644--- a/studio/src/player/components/TimelineEmptyState.tsx+++ b/studio/src/player/components/TimelineEmptyState.tsx@@ -38,7 +38,7 @@ export function TimelineEmptyState({const hideGuide = !!gateway?.generationOpen && !isDragOver;return (<div- className={`h-full border-t bg-[var(--timeline-shell-bg)] flex flex-col select-none transition-colors duration-150 ${+ className={`${mvp ? "motion-timeline-empty" : ""} h-full border-t bg-[var(--timeline-shell-bg)] flex flex-col select-none transition-colors duration-150 ${isDragOver ? "border-studio-accent/50 bg-studio-accent/3" : "border-neutral-800/50"}`}onDragOver={onDragOver}diff --git a/studio/src/player/components/TimelineTrackAudioControls.test.tsx b/studio/src/player/components/TimelineTrackAudioControls.test.tsxindex f373b30a..0a9f49d2 100644--- a/studio/src/player/components/TimelineTrackAudioControls.test.tsx+++ b/studio/src/player/components/TimelineTrackAudioControls.test.tsx@@ -1,11 +1,14 @@// @vitest-environment happy-dom-import { act } from 'react';+import { act, useState } from 'react';import { afterEach, beforeEach, expect, it, vi } from 'vitest';import { mountHost, cleanupMounted } from '../../components/ui/mountHost.testHelpers';import { TimelineEditProvider } from '../../contexts/TimelineEditContext';import { TimelineTrackAudioControls } from './TimelineTrackAudioControls';import type { TimelineElement } from '../store/timelineElement';+const probe = vi.hoisted(() => vi.fn());+vi.mock('../lib/mediaProbe', () => ({ probeMediaUrl: probe }));+const write = vi.fn(async () => ({ status: 'saved' as const }));const clip = (id: string, tag: string, extra = {}): TimelineElement => ({ id, tag, start: 0, duration: 2, track: 1, ...extra });const video = clip('video', 'video', { hasAudio: true, volume: 0.7 });@@ -13,7 +16,7 @@ const audio = clip('audio', 'audio', { volume: 0.5 });const render = (elements: TimelineElement[]) => mountHost(<TimelineEditProvider value={{ onSetElementsAttributeQuiet: write }}><TimelineTrackAudioControls elements={elements} trackLabel="Track" isAudioOnly={false} hidden={false} onUnhide={() => {}} /></TimelineEditProvider>);-beforeEach(() => write.mockClear());+beforeEach(() => { write.mockClear(); probe.mockReset(); probe.mockResolvedValue(null); });afterEach(cleanupMounted);it('mutes all audible clips in the row without changing video visibility or volume', async () => {@@ -88,3 +91,52 @@ it('raising the muted slider saves volume and unmutes the track', async () => {expect(write).toHaveBeenNthCalledWith(1, [{ element: muted, value: '0.45' }], 'data-volume', 'Change volume');expect(write).toHaveBeenNthCalledWith(2, [{ element: muted, value: null }], 'muted', 'Unmute audio');});+++it('keeps source-audio controls through unmute, mute and volume changes when manifest audio metadata is absent', async () => {+ probe.mockResolvedValue({ hasAudio: true });+ let update!: (element: TimelineElement) => void;+ const source = clip('sound', 'video', { src: '/sound.mp4', muted: true });+ function Harness() {+ const [element, setElement] = useState(source);+ update = setElement;+ return <TimelineEditProvider value={{ onSetElementsAttributeQuiet: write }}>+ <TimelineTrackAudioControls elements={[element]} trackLabel="Track" isAudioOnly={false} hidden={false} onUnhide={() => {}} />+ </TimelineEditProvider>;+ }+ let host!: HTMLElement;+ await act(async () => { host = mountHost(<Harness />); });+ expect(host.querySelector('[aria-label="Unmute audio · Track"]')).not.toBeNull();+ await act(async () => host.querySelector<HTMLButtonElement>('button')!.click());+ await act(async () => update({ ...source, muted: undefined, volume: 0.54 }));+ const speaker = host.querySelector<HTMLButtonElement>('[aria-label="Mute audio · Track"]');+ expect(speaker).not.toBeNull();+ await act(async () => speaker!.focus());+ expect(document.querySelector<HTMLInputElement>('input[aria-label="Volume"]')?.value).toBe('54');+ await act(async () => speaker!.click());+ expect(write).toHaveBeenLastCalledWith([{ element: { ...source, muted: undefined, volume: 0.54 }, value: 'true' }], 'muted', 'Mute audio');+ await act(async () => update({ ...source, muted: true, volume: 0.54 }));+ expect(host.querySelector('[aria-label="Unmute audio · Track"]')).not.toBeNull();+ expect(probe).toHaveBeenCalledTimes(1);+});++it('hides controls only when the source is confirmed silent and reevaluates replaced media', async () => {+ probe.mockImplementation(async (src: string) => ({ hasAudio: src === '/sound.mp4' }));+ let update!: (element: TimelineElement) => void;+ function Harness() {+ const [element, setElement] = useState(clip('media', 'video', { src: '/silent.mp4', muted: true }));+ update = setElement;+ return <TimelineTrackAudioControls elements={[element]} trackLabel="Track" isAudioOnly={false} hidden={false} onUnhide={() => {}} />;+ }+ let host!: HTMLElement;+ await act(async () => { host = mountHost(<Harness />); });+ expect(host.querySelector('button')).toBeNull();+ await act(async () => update(clip('media', 'video', { src: '/sound.mp4', volume: 0 })));+ expect(host.querySelector('button')).not.toBeNull();+});++it('retains unknown video controls if audio probing is unavailable', async () => {+ let host!: HTMLElement;+ await act(async () => { host = render([clip('unknown', 'video', { src: '/unavailable.mp4' })]); });+ expect(host.querySelector('[aria-label="Mute audio · Track"]')).not.toBeNull();+});diff --git a/studio/src/player/components/TimelineTrackAudioControls.tsx b/studio/src/player/components/TimelineTrackAudioControls.tsxindex fe84c2ff..b4bb850d 100644--- a/studio/src/player/components/TimelineTrackAudioControls.tsx+++ b/studio/src/player/components/TimelineTrackAudioControls.tsx@@ -5,6 +5,9 @@ import { RemixIcon } from '../../icons/RemixIcons';import { useTimelineEditContextOptional } from '../../contexts/TimelineEditContext';import { useStudioShellContextOptional } from '../../contexts/StudioContext';import type { TimelineElement } from '../store/timelineElement';+import { usePlayerStore } from '../store/playerStore';+import { probeMediaUrl } from '../lib/mediaProbe';+import { authoredSrcPath, resolveMediaPreviewUrl } from './thumbnailUtils';const buttonClass = 'flex h-6 w-6 shrink-0 items-center justify-center rounded text-text-3 hover:bg-hover hover:text-text-0 disabled:opacity-40';@@ -19,7 +22,27 @@ export function TimelineTrackAudioControls({ elements, trackLabel, isAudioOnly,const { t } = useI18n();const { onSetElementsAttributeQuiet } = useTimelineEditContextOptional();const shell = useStudioShellContextOptional();- const clips = elements.filter(el => el.tag === 'audio' || (el.tag === 'video' && (el.hasAudio === true || el.muted === true)));+ const projectId = usePlayerStore(state => state.timelineProjectId);+ const sourceUrl = (el: TimelineElement) => el.src+ ? projectId ? resolveMediaPreviewUrl(authoredSrcPath(el.src), projectId, window.location.origin) : el.src+ : undefined;+ const sources = JSON.stringify([...new Set(elements.filter(el => el.tag === 'video').map(sourceUrl).filter((src): src is string => !!src))]);+ const [sourceAudio, setSourceAudio] = useState<Record<string, boolean>>({});+ useEffect(() => {+ let active = true;+ void Promise.all((JSON.parse(sources) as string[]).map(async src => {+ const metadata = await probeMediaUrl(src);+ return metadata ? [src, metadata.hasAudio] as const : null;+ })).then(results => {+ if (active) setSourceAudio(Object.fromEntries(results.filter(result => result !== null)));+ });+ return () => { active = false; };+ }, [sources]);+ // Source audio capability is independent of current mute/gain. Runtime manifests+ // can omit hasAudio after unmuting; keep unknown video controls until a probe+ // positively identifies a silent source. Reuse the shared bounded probe cache.+ const clips = elements.filter(el => el.tag === 'audio' ||+ (el.tag === 'video' && (sourceAudio[sourceUrl(el) ?? ''] ?? el.hasAudio) !== false));const signature = clips.map(el => `${el.key ?? el.id}:${el.volume ?? 1}:${!!el.muted}`).join('|');const volume = Math.round((clips[0]?.volume ?? 1) * 100);const sliderVolume = Math.min(100, Math.max(0, volume));diff --git a/studio/src/player/components/TimelineTrackPlainHeader.tsx b/studio/src/player/components/TimelineTrackPlainHeader.tsxindex 41b5bdf6..c3dfc97e 100644--- a/studio/src/player/components/TimelineTrackPlainHeader.tsx+++ b/studio/src/player/components/TimelineTrackPlainHeader.tsx@@ -1,3 +1,4 @@+import { useMvpEditor } from "../../motion/StudioHost";import { useI18n } from "../../i18n/I18n";import type React from "react";import { Music } from "../../icons/SystemIcons";@@ -21,6 +22,7 @@ export function VisibilityButton({onToggle: TimelineEditCallbacks["onToggleTrackHidden"];}) {const { t } = useI18n();+ const mvp = useMvpEditor();// Display number in the text, real key in the callback. The two must not be// conflated in either direction.const suffix = trackDisplaySuffix(trackDisplayNumber);@@ -31,7 +33,7 @@ export function VisibilityButton({aria-label={label}title={label}className={`flex h-6 w-6 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 transition-colors focus-visible:outline-solid focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-[var(--timeline-accent)] ${- hidden+ hidden && !mvp? "text-[var(--timeline-accent)] hover:text-[var(--timeline-text-solid)]": "text-[var(--timeline-text-faint)] hover:text-[var(--timeline-text-soft)]"}`}