Skip to content

feat(video3d): bind template slots through the shared asset picker - #240

Merged
IAnMove merged 5 commits into
developmentfrom
grok/agente2-templates-55b1729f
Sep 7, 2026
Merged

feat(video3d): bind template slots through the shared asset picker#240
IAnMove merged 5 commits into
developmentfrom
grok/agente2-templates-55b1729f

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Problem

Template composer used a private Library grid with click-to-confirm and its own pagination. That is not the shared dual-origin picker, and a click confirmed immediately.

Behavior

  • TPL-01..08 go through AssetInput / common explorer (workspaceId + remote catalog from feat(assets): page the shared explorer against the catalog API #230).
  • Confirm is Choose, not clicking a card.
  • Bindings still store durable asset.id. catalogBindingIssue still blocks incompatible items.
  • A local file without asset_id is rejected (canonical Library identity required).
  • JSON original import is unchanged.

IDs

TPL-01..08

Base / HEAD

origin/development 661d241c (#237).

Tests

templateSlotPick.test.mjs + templateAssetPicker.test.tsx: 6/6. ESLint on touched TS, 0 warnings. E2E composer flow updated to From HocusPocus → Choose.

Limits

Draft until CI. No GPU. Do not merge from this description if you are a bot; human asked to merge after review.


Note

Medium Risk
Changes how Video3D template slots bind to Library assets (shared picker + async commit), which could regress slot assignment or stale bindings if the race guards fail.

Overview
Replaces the template composer’s bespoke Library grid with the shared AssetInput / asset explorer, so slot assignment matches the dual-origin picker used elsewhere (From my computer / From HocusPocus) and confirms with Choose instead of clicking a catalog card.

commitTemplateSlotChoice in templateSlotPick.ts loads the durable catalog id via fetchAsset, ignores stale picks when workspace/slot/generation changes, and rejects local choices without asset_id (new needsCatalogIdentity copy). catalogBindingIssue and provided_only catalog lineage behavior stay the same; the dialog now wires onClear / optional slots through the picker.

Unit, composer, and E2E tests were updated for the explorer flow; the old paginated picker tests were dropped in favor of slot-commit coverage.

Reviewed by Cursor Bugbot for commit 1b40751. Configure here.

Replace the ad-hoc Library grid with AssetInput. Keep catalog asset.id
and catalogBindingIssue; local files without an id are rejected.
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 10 file(s); +304/-406; 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/sceneTemplates/templateSlotPick.ts, ui/tests/templateSlotPick.test.mjs
  • modified: ui/e2e/specs/scene-template-review.spec.ts, ui/src/features/sceneTemplates/TemplateAssetPicker.tsx, ui/src/features/sceneTemplates/TemplateComposerDialog.tsx, ui/src/i18n/locales/en/scene3d.json, ui/src/i18n/locales/es/scene3d.json, ui/tests/musicMotionComposer.test.tsx, ui/tests/templateAssetPicker.test.tsx, ui/tests/templateComposerDialog.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.

@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.4 +0.1
File concentration 25% 61.3 +0.0
Oversized-file debt 20% 36.9 +0.0
Modularity 10% 75.1 +0.1

Change vs PR base: +0.0 points.

Metric Value
Production LOC 263,966
Production files 699
Test LOC 92,708
Functions measured 17,022
Functions complexity ≥ 15 832
Maximum complexity 672
Policy code-health-policy-v1
HEAD 2553fcd5b1eeec87ba7da0a65715b73cbe1af5fd
Base f05bb2c8ec709717cdec8de2043ad140c2a68102
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:23563 _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 -56
Test LOC +216
Functions ≥ 15 -1
Maximum complexity +0

Warnings

  • complexity hotspot ui/src/components/Sidebar/ControlVideoSection.tsx rose 17 -> 19

Ratchet passed.

The shared explorer shows a kind/date title, not the filename, so
composer tests and the Library binding e2e must click title=filename
and Choose. Keep catalogBindingIssue text on incompatible picks.
Composer is already a dialog, so filtering dialogs that contain
asset-explorer matched both shells. Use the last overlay.
After Choose, the composer shows the catalog filename in the slot
card and again in AssetInput. Strict getByText matched both.
@IAnMove
IAnMove marked this pull request as ready for review September 7, 2026 20:51
@IAnMove
IAnMove merged commit df87153 into development Sep 7, 2026
11 checks passed
@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_3411c45a-c622-4a0d-9290-6cc71b2bf066)

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