Skip to content

fix(viggle): show the complete video after sliding-window generation - #255

Merged
IAnMove merged 1 commit into
developmentfrom
fix/viggle-complete-output
Sep 7, 2026
Merged

fix(viggle): show the complete video after sliding-window generation#255
IAnMove merged 1 commit into
developmentfrom
fix/viggle-complete-output

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Long Viggle runs save cumulative videos after each sliding window. Character Replacement selected the first video in the completed job's output list, showing about 5.17 seconds from a 31.7-second run. It now selects the last video in API registration order, which contains the complete result.

Selection remains scoped to that job, ignores non-video artifacts, and preserves the original output list and task identity. Image and audio selection are unchanged.

Validation:

  • Regression reproduced before the fix: 9/10 tests passed; the new cumulative-window case selected the first window.
  • After the fix: 10/10 directed generation tests passed, including mixed artifact types, nonalphabetic registration order, polling until completion, and no gallery fallback.
  • TypeScript and targeted ESLint passed.
  • Code-health ratchet passed against base 119c9d391735641556bc3ea7ce8d45651f652f08.

Tests simulate API status responses. This change has not been deployed to the running generation process.


Note

Low Risk
UI-only output selection in character replacement polling; behavior is narrower and covered by directed tests, with no auth or API contract changes.

Overview
Character replacement now picks the last video artifact in the completed job’s output_files list (in API registration order), not the first match. Long Viggle runs emit cumulative window previews followed by the full render; the earlier logic surfaced only the first window (~5s) instead of the complete clip.

Selection still filters to video extensions only, stays tied to that job’s status payload (no gallery fallback), and leaves image/audio completion paths unchanged. New tests cover mixed artifacts, non-alphabetic filenames, polling until completion, and explicit failure when the job completes without a real video file.

Reviewed by Cursor Bugbot for commit 52505dd. Configure here.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 2 file(s); +44/-1; 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

  • modified: ui/src/features/characterReplacement/generation.ts, ui/tests/characterReplacementGeneration.test.ts

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.9/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.0
File concentration 25% 61.5 +0.0
Oversized-file debt 20% 37.3 +0.0
Modularity 10% 75.8 +0.0

Change vs PR base: +0.0 points.

Metric Value
Production LOC 264,920
Production files 710
Test LOC 94,596
Functions measured 17,132
Functions complexity ≥ 15 836
Maximum complexity 672
Policy code-health-policy-v1
HEAD 29561444e7c61577261c4edbcc951534e68bb802
Base 119c9d391735641556bc3ea7ce8d45651f652f08
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:4084 Async method 'startGeneration'
355 app/_launch_runtime.py:23613 _run_generation
308 app/wgp.py:12359 generate_video_tab
268 ui/src/stores/useStore.ts:8631 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 +2
Test LOC +41
Functions ≥ 15 +0
Maximum complexity +0

Warnings

  • production LOC increased by +2

Ratchet passed.

@IAnMove
IAnMove marked this pull request as ready for review September 7, 2026 23:04
@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_557368ba-2cc7-4ed6-9857-0f97b13ba36e)

@IAnMove
IAnMove merged commit 4859e78 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