Skip to content

feat(story): bind cover and cue audio through the shared picker - #245

Merged
IAnMove merged 2 commits into
developmentfrom
grok/agente2-story-audio-06ffec07
Sep 7, 2026
Merged

feat(story): bind cover and cue audio through the shared picker#245
IAnMove merged 2 commits into
developmentfrom
grok/agente2-story-audio-06ffec07

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Problem

Story cover, Lyria import and custom cue MP3 used hidden type=file inputs. Cover could be confused with a generated song, and catalog audio was re-uploaded.

Behavior

  • AUD-07 cover goes through the shared dual-origin picker. It writes coverReferenceFilename / coverReferenceName only.
  • AUD-08 Lyria import adds a cue candidate with provider lyria.
  • AUD-09 custom MP3 adds a cue candidate with upload provenance; non-mp3 catalog rows are rejected.
  • Switching project remounts the picker so a late upload cannot land on another story.

IDs

AUD-07..09

Base / HEAD

origin/development 96818265 (#241). HEAD b57e4b0614757caf847d0c8aa8314417d4a061ff.

Tests

storyAudioPick.test.mjs + storyLabResponsive.test.tsx: 17/17. ESLint on touched files, 0 warnings.

Limits

Draft until CI. No GPU. Independent of G2-G3 #240.


Note

Medium Risk
Changes how story music audio is selected and persisted (catalog vs upload), which could affect cue/cover binding if validation or stale-selection guards regress.

Overview
Story Lab cover references, Lyria imports, and custom cue MP3s no longer use hidden file inputs and api.uploadAudio. They go through a new StoryAudioPicker (workspace AssetInput) so users can pick existing catalog audio or upload once, without re-uploading assets already in the workspace.

storyAudioPick.ts centralizes binding: cover choices only set coverReferenceFilename / coverReferenceName (not song candidates); Lyria and custom imports build StoryMusicCandidate rows from the chosen ApiOutput URL. commitStoryAudioChoice ignores stale project/cue selections, rejects non-audio, and enforces MP3-only for custom imports. StoryLabPanel handlers are synchronous commits instead of upload activities; hidden Lyria/custom inputs and musicCoverRef are removed.

Tests add storyAudioPick.test.mjs, update responsive/UI contract tests for the picker flow, and point Python source checks at storyAudioPick.ts for custom-audio-upload provenance.

Reviewed by Cursor Bugbot for commit 12b07db. Configure here.

Cover stays a reference, not a generated song. Lyria and custom MP3
imports keep cue identity and provenance. Catalog picks reuse the
server URL instead of uploading again.
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 11 file(s); +329/-177; 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/stories/StoryAudioPicker.tsx, ui/src/features/stories/storyAudioPick.ts, ui/tests/storyAudioPick.test.mjs
  • modified: tests/test_story_lab_audio_ui.py, ui/src/features/stories/ManualSongPanel.tsx, ui/src/features/stories/MusicCueCard.tsx, ui/src/features/stories/StoryLabPanel.tsx, ui/src/features/stories/StoryMusicHeader.tsx, ui/src/features/stories/StoryMusicTab.tsx, ui/src/features/stories/storyLabProductions.ts, ui/tests/storyLabResponsive.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% 37.0 +0.1
Modularity 10% 75.1 +0.1

Change vs PR base: +0.0 points.

Metric Value
Production LOC 264,111
Production files 700
Test LOC 92,819
Functions measured 17,034
Functions complexity ≥ 15 833
Maximum complexity 672
Policy code-health-policy-v1
HEAD 5670009d854754b979a3824d678204237a09e50c
Base 968182658c3d8d83fc642555cfbd808a6d01b1f1
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 +130
Test LOC +204
Functions ≥ 15 +0
Maximum complexity +0

Warnings

  • production LOC increased by +130
  • complexity hotspot ui/src/components/Sidebar/ControlVideoSection.tsx rose 17 -> 19

Ratchet passed.

The source contract still requires custom-audio-upload and an mp3
accept list; those now live on the shared picker helper.
@IAnMove
IAnMove marked this pull request as ready for review September 7, 2026 20:52
@IAnMove
IAnMove merged commit ba09b58 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_4fb608c1-b50b-46b4-b60a-1cf6855739cb)

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