Skip to content

feat(video-editor): add timeline clips through the shared catalog picker - #251

Merged
IAnMove merged 1 commit into
developmentfrom
grok/agente1-g1d2-videoeditor
Sep 7, 2026
Merged

feat(video-editor): add timeline clips through the shared catalog picker#251
IAnMove merged 1 commit into
developmentfrom
grok/agente1-g1d2-videoeditor

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Resumen ejecutivo

Qué cambia

El Video Editor deja el modal propio de catálogo (multiselección + Load more) y abre el explorador compartido. Confirmar añade un clip al final del montaje.

Para qué sirve

VID-11: mismo picker que Studio, búsqueda/paginación remota, sin resetear timeline, trims ni orden. Importar varios archivos locales sigue igual.

Impacto para el usuario

From HocusPocus abre el explorador común. Choose añade un clip; Cancelar no toca el montaje. Para varios vídeos de biblioteca se confirma uno a uno.

Riesgo

  • Bajo
  • Medio
  • Alto

Estado

  • Listo para revisión

Summary

G1-D2: VideoEditorPanel catalog add uses AssetExplorerDialog.

  • Device Import remains multiple input type=file + drop.
  • Catalog confirm maps ApiOutput → probe source via videoEditorClipFromOutput and addSource, which appends.
  • Existing clips, trims, order and draft persistence are unchanged.
  • The old in-panel multi-select/load-more modal is removed.

Overview

Opening From HocusPocus lazy-loads the shared explorer with remote pages of 24 and video-only constraints. Confirm closes the explorer and probes the chosen URL. Close/Escape does not call add. Local multi-import and handoff/replacement flows are untouched.

Detailed changes

Backend

None.

UI and Wizard

  • VideoEditorPanel.tsx: drop custom picker state/UI; lazy AssetExplorerDialog.
  • videoEditorCatalogPick.ts: URL/thumbnail from catalog row.

Data, provenance and compatibility

Draft storage format unchanged. Clip source is still the workspace file name after editorSourcePath.

Files and ownership

  • ui/src/features/video-editor/VideoEditorPanel.tsx
  • ui/src/features/video-editor/videoEditorCatalogPick.ts
  • ui/tests/videoEditorPicker.test.tsx

Left untouched: AlternativeSongs (VID-12), Studio VideoEdit/MultiClip (#250), Story/Wizard/Scene3D.

Validation

  • Date (UTC): 2026-09-07

  • Base SHA: 5e08edb

  • Head SHA: 3b1484b

  • Validation scope: focused

  • python scripts/verify_clean_repo.py

  • python -m compileall -q app/services app/launch.py scripts

  • Focused Python tests: N/A

  • cd ui && npm run i18n:check

  • UI tests: npx tsx --tsconfig tsconfig.app.json --test tests/videoEditorPicker.test.tsx — 3/3 pass

  • cd ui && npm run lint -- --max-warnings=0

  • cd ui && npm run build

  • git diff --check

  • E2E/smoke checks: N/A (picker contract; explorer not opened; no GPU)

Code quality

  • Score: pending CI
  • Complexity trend: pending CI
  • Production LOC trend: pending CI
  • Regression versus main: pending CI
  • Ratchet: pending CI

CI and review

  • CI of this HEAD: pending
  • Independent agent review of this HEAD: pending
  • Human merge click (operational, not code review): pending
  • Pending

Coste de la tarea

  • Tests simulados: 0 tokens externos
  • Tests reales: N/A
  • Llamadas LLM externas: 0
  • Tokens de prompt: N/A
  • Tokens de respuesta: N/A
  • Tokens totales: N/A
  • Generaciones de imágenes/audio/vídeo: 0
  • Tiempo transcurrido: N/A
  • Proveedores/modelos: N/A

Notes and limitations

Catalog add is one clip per confirm (nucleus does not take a global multi-select). Local import still accepts multiple files. Tests do not open the explorer.

Follow-up work

G1-D3 AlternativeSongsDialog (VID-12). G1-HUI Director UI after Studio is stable.

Checklist

  • The executive summary is understandable without reading the code.
  • The detailed Summary/Overview has not been removed or shortened.
  • Tests and their actual results are recorded.
  • Generated assets, secrets and local-only files are not committed.
  • Required CI and Cursor/Bugbot review are complete, or the PR is clearly marked as waiting for them.

Note

Low Risk
Frontend-only picker swap with a deliberate UX change (single library clip per pick); no backend or auth changes.

Overview
From HocusPocus in the video editor now opens the shared AssetExplorerDialog (lazy-loaded) instead of the old in-panel modal with paginated fetchOutputs, shift-range multi-select, and batch Add.

Choosing a catalog row closes the explorer and appends one video clip via addCatalogOutputvideoEditorClipFromOutput → existing addSource / probe flow. Constraints are video-only and maxCount: 1, so library clips are added one confirmation at a time; Import and drag-and-drop still accept multiple local files. Timeline, trims, draft persistence, and handoff paths are not intentionally changed.

Tests drop the multi-select picker scenario and add coverage for catalog URL binding and that the panel shows Import / From HocusPocus without mounting the explorer until opened.

Reviewed by Cursor Bugbot for commit 3b1484b. Configure here.

@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_eee012c9-d39b-4f01-8664-1828b8aaaa4e)

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 3 file(s); +77/-287; React UI

Automated review from scripts/analyze_pr.py. This is a heuristic pass (no LLM) so humans still own the merge decision.

Findings

  • low — UI changed — rebuild before merge
    Run cd ui && npm run build (CI already does this). Pinokio Update rebuilds for end users; keep ui/dist untracked.

Changed files

  • added: ui/src/features/video-editor/videoEditorCatalogPick.ts
  • modified: ui/src/features/video-editor/VideoEditorPanel.tsx, ui/tests/videoEditorPicker.test.tsx

CONTRIBUTING checklist

  • python scripts/verify_clean_repo.py
  • python -m compileall -q app/services app/launch.py scripts
  • cd ui && npm run build if the UI changed
  • No weights, CivitAI sidecars, or generated guides
  • Stays local-first (no required accounts / telemetry)

Posted by the repo PR review workflow. Re-runs on each push to the PR.

Replace the ad-hoc HocusPocus multi-select modal with AssetExplorerDialog.
Catalog confirm appends one clip via the existing probe path and keeps
the current timeline, trims and order. Local multi-file import is unchanged.
@IAnMove
IAnMove force-pushed the grok/agente1-g1d2-videoeditor branch from 3b1484b to 8361e1f Compare September 7, 2026 21:11
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Code health

Quality score: 54.7/100

Higher is better. The score is a trend dashboard; the independent ratchet below remains the CI gate.

Component Weight Current Change
Cyclomatic health 45% 54.3 -0.1
File concentration 25% 61.3 +0.0
Oversized-file debt 20% 37.0 +0.0
Modularity 10% 75.3 +0.1

Change vs PR base: +0.0 points.

Metric Value
Production LOC 263,909
Production files 702
Test LOC 93,062
Functions measured 16,999
Functions complexity ≥ 15 832
Maximum complexity 672
Policy code-health-policy-v1
HEAD af51946dc535d4762fe061f918dc13bb14ada77b
Base bd1b3bca5bba0a65fc327613bf58e0d70665027a
UI measurement complete

Markdown, JSON catalogs and tests are out of this table. Only app/ runtime + ui/src TS/JS count.

Most complex functions

Complexity Where
672 app/wgp.py:7219 generate_video
381 ui/src/stores/useStore.ts:4053 Async method 'startGeneration'
355 app/_launch_runtime.py:23581 _run_generation
308 app/wgp.py:12359 generate_video_tab
268 ui/src/stores/useStore.ts:8600 Async method 'loadSettingsFromOutput'
258 app/services/director/planners/short_film.py:3433 ShortFilmPlanner._plan_story_driven
258 ui/src/components/Sidebar/SceneAnimatorPanel.tsx:493 Function 'SceneAnimatorPanel'
248 app/services/director_pipeline.py:13607 _run_video_generation
245 app/services/director_pipeline.py:7712 _run_pipeline
244 ui/src/features/agent/agentActions.ts:1145 Function 'parseAction'
226 app/services/director_pipeline.py:6541 update_comic_preview
225 ui/src/features/agent/agentActions.ts:2892 Async function 'executeAgentActions'

Trend vs baseline

Metric Δ
Production LOC -185
Test LOC -25
Functions ≥ 15 +0
Maximum complexity +0

Ratchet passed.

@IAnMove
IAnMove merged commit 150b96a into development Sep 7, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant