From 2ebcf6a6739568c6c5ec2ff63dd9f7ff86d34ddb Mon Sep 17 00:00:00 2001 From: "haixin.yang" Date: Mon, 20 Jul 2026 19:29:21 +0800 Subject: [PATCH] Improve responsive editor workflows --- .../references/browser-workflow.md | 3 + .../references/current-capabilities.md | 2 + .../references/e2e-evaluation.md | 4 +- src/App.jsx | 22 +- src/components/EditorSidebar.jsx | 19 +- src/components/PreviewStage.jsx | 57 ++-- src/components/Timeline.jsx | 15 + src/components/panels.jsx | 30 +- src/hooks/useSourceAudioExtraction.js | 8 +- src/i18n.js | 17 +- src/i18nMobileDrawer.test.js | 28 ++ src/lib/assetDragControls.js | 4 +- src/lib/sourceAudioSync.js | 17 ++ src/lib/sourceAudioSync.test.js | 31 ++- src/styles.css | 259 ++++++++++++++++-- 15 files changed, 438 insertions(+), 78 deletions(-) create mode 100644 src/i18nMobileDrawer.test.js diff --git a/skills/edit-timeline-studio/references/browser-workflow.md b/skills/edit-timeline-studio/references/browser-workflow.md index 05716ea..2118d89 100644 --- a/skills/edit-timeline-studio/references/browser-workflow.md +++ b/skills/edit-timeline-studio/references/browser-workflow.md @@ -39,6 +39,9 @@ The first visual may open a shortcuts coach guide. Do not click an action that p - Separating audio creates derived source-audio clips and mutes embedded playback to prevent doubling. - Deleting a separated piece does not imply that the original visual has lost its embedded audio. - Verify audible playback, clip mute state, separation state, and exported audio instead of treating lane visibility as proof. +- When separating audio from a trimmed video clip, verify immediately that the project duration is unchanged and the visible source-audio piece matches the clip's timeline duration. The piece must resolve the visual clip's source start and source duration, not expose the full original media range. +- Generate captions from the selected mapped source-audio piece so transcription uses its source start, duration, and timeline start. Stop if separation expands the project or the caption source falls outside the visual clip. +- If export with a separated source track remains at the first frame for several progress checks without errors, preserve the `.timeline` archive and classify it as a product defect. After captions are safely stored, removing the derived source track is a valid recovery only when the video is configured to resume its embedded audio; verify the final file is audible. ## Handoff diff --git a/skills/edit-timeline-studio/references/current-capabilities.md b/skills/edit-timeline-studio/references/current-capabilities.md index 15c938f..a8e6938 100644 --- a/skills/edit-timeline-studio/references/current-capabilities.md +++ b/skills/edit-timeline-studio/references/current-capabilities.md @@ -30,6 +30,8 @@ Observed browser-path constraints: - Locator-scoped Escape can fail on the coach dialog when browser focus moves; a verified page-level Escape works as a session-only dismissal. - After splitting a very short visual, toolbar selection can be misread; a right-click clip menu provides a safer clip-scoped delete path. - Browser-control download events can time out even when `.timeline` or video files are successfully written; confirm with filesystem timestamps and media decoding before retrying. +- The local repository now resolves a timeline video clip's `assetId` when separating source audio, so trimmed clips retain their source start/duration and do not expand the project. Keep a regression for both timeline-clip and asset-library extraction entry points. +- A reloaded project with a separated source track was observed to stall offline export at frame 1/479 without a console error. Preserve the project artifact and treat this as an export product defect; an embedded-audio export completed after removing the derived track. ## Missing for reliable Agent editing diff --git a/skills/edit-timeline-studio/references/e2e-evaluation.md b/skills/edit-timeline-studio/references/e2e-evaluation.md index 620f57d..3f0b895 100644 --- a/skills/edit-timeline-studio/references/e2e-evaluation.md +++ b/skills/edit-timeline-studio/references/e2e-evaluation.md @@ -27,9 +27,9 @@ Run these across empty and pre-populated projects where applicable: 5. Verify the first-visual coach guide: persistent completion only through the user's explicit action; temporary dismissal through close or Escape. 6. Trim, split, reorder, delete, undo, redo, save, reopen, and compare media identity and source-time mapping. Include a sub-second split where mute controls and handles consume most of the clip width; verify clip-scoped context-menu deletion and immediate recovery from a deliberately detected wrong-target action. 7. Add and move captions, stickers, voiceover, music, source audio, and picture-in-picture; verify lane visibility and overlap packing. -8. Verify embedded video audio, mute, Separate audio, derived-piece deletion, link modes, preview playback, and export without doubled or missing sound. +8. Verify embedded video audio, mute, Separate audio, derived-piece deletion, link modes, preview playback, and export without doubled or missing sound. Separate audio from a clip trimmed at both ends and assert the project duration, source-audio piece duration, source start, source duration, and waveform range remain mapped to that clip rather than the full original asset. 9. Change transforms, masks, keyframes, speed, effects, animations, and aspect ratio; compare preview with deterministic export. -10. Export MP4/WebM and decode the entire result to verify dimensions, duration, frame count, visible captions/overlays, and a real non-silent audio track when expected. Test both a captured browser download event and the fallback where the event times out but a new artifact exists on disk. +10. Export MP4/WebM and decode the entire result to verify dimensions, duration, frame count, visible captions/overlays, and a real non-silent audio track when expected. Extract frames inside every caption range and visually verify the burned-in text. Test both a captured browser download event and the fallback where the event times out but a new artifact exists on disk. 11. Compare same-tab autosave, a newly opened same-origin tab, and explicit `.timeline` save/reopen. Verify duration, ordering, assets, track state, selections that should persist, and generated media links; never treat an “Autosaved” label as proof that local blobs will reopen. 12. Repeat critical flows in every supported interface language, narrow desktop panels, reduced motion, and at least the supported Chromium path; include Firefox/Windows regressions when available. 13. Exercise AI paths with cold and warm caches, unavailable models, download failure, cancellation, WASM/WebGPU fallback, and truthful backend reporting. diff --git a/src/App.jsx b/src/App.jsx index f6d4411..c121598 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -811,7 +811,7 @@ export function App() { toggleCaptionSegmentHidden, toggleVisionOption, trOption, updateCaptionSegmentText, updateScript, userAssets, visionJob, selectedVisualSegment, visualLocalTime, updateSelectedVisualEffects, - mobilePanel, setMobilePanel: changeMobilePanel, + mobilePanel, setMobilePanel: changeMobilePanel, applyAssetToTrack, }} /> { + setRatioId(nextRatioId); + setFitModeFromUser("contain"); + }} visualObjectFit={previewVisualObjectFit} visualObjectPosition={previewVisualObjectPosition} visionOverlayBoxes={previewVisionOverlayBoxes} @@ -1039,6 +1044,11 @@ export function App() { selectedTrack={selectedTrack} setSelectedTrack={setSelectedTrack} setActiveTool={setActiveTool} + openMobileMediaPicker={() => { + setActiveTool("media"); + setMediaTab("upload"); + changeMobilePanel("tools"); + }} requestCaptionVoiceFocus={() => setCaptionVoiceFocusRequest((request) => request + 1)} trackVisibility={trackVisibility} toggleTrackVisibility={toggleTrackVisibility} @@ -1123,6 +1133,16 @@ export function App() { startMusicMove={startMusicMove} /> + {mobilePanel ? ( +
+ {t(activeTool)} +
+ + + +
+
+ ) : null} {mobilePanel ? ))} - -