Skip to content

Extract Story Lab assets tab with i18n - #100

Merged
IAnMove merged 1 commit into
mainfrom
refactor/storylab-assets-tab
Sep 2, 2026
Merged

Extract Story Lab assets tab with i18n#100
IAnMove merged 1 commit into
mainfrom
refactor/storylab-assets-tab

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Why

Overview left StoryLabPanel in #98. The Assets tab (smart importer, style conversion, visual library) was the remaining inline chrome with English literals.

What

  • StoryAssetsTab composes importer, proposal cards, style converter and library
  • EN/ES storyLab.assets catalog
  • Python/UI source contracts retargeted to the catalog for moved copy
  • Complexity of new files ≤ 25

Does not touch useStore.ts or _launch_runtime.py. Independent of #99 (ratchet wording).

Checks

  • eslint + tsc -p tsconfig.app.json --noEmit
  • i18n catalogs
  • Story Lab UI extract tests
  • test_story_lab_audio_ui, test_story_lab_trailer_ui, test_provider_ternary_freeze

Note

Low Risk
Refactor and localization only; asset import, style conversion, and draft deletion logic remain in StoryLabPanel with no store or backend changes described.

Overview
Pulls the Story Lab Assets tab out of StoryLabPanel into StoryAssetsTab and smaller pieces (importer, proposal cards, style converter, visual library), with state and handlers still wired from the panel. User-visible copy moves into storyLab.assets (EN/ES) via useUiTranslation, and StoryLabPanel no longer embeds hundreds of lines of English literals for that tab.

Adds storyLabAssets.ts for PendingSmartAsset and storyAssetKey (used by proposal cards). i18n pilot coverage, Python UI contract tests, and Story Lab extract tests now target the catalog and new modules so moved strings stay enforced.

Reviewed by Cursor Bugbot for commit c6504c5. Configure here.

Move the smart importer, style conversion and visual library out of
StoryLabPanel. Handlers stay in the panel; the tab only renders. New
files stay at complexity ≤ 25.

Does not touch useStore.ts or _launch_runtime.py.
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: low
Scope: 12 file(s); +741/-315; 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/StoryAssetsImporter.tsx, ui/src/features/stories/StoryAssetsLibrary.tsx, ui/src/features/stories/StoryAssetsProposalCard.tsx, ui/src/features/stories/StoryAssetsStyleConverter.tsx, ui/src/features/stories/StoryAssetsTab.tsx, ui/src/features/stories/storyLabAssets.ts
  • modified: tests/test_story_lab_audio_ui.py, ui/scripts/check-i18n-catalogs.mjs, ui/src/features/stories/StoryLabPanel.tsx, ui/src/i18n/locales/en/storyLab.json, ui/src/i18n/locales/es/storyLab.json, 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.

@IAnMove

IAnMove commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

cursor review

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Code health

Metric Value
Production LOC 234,263
Production files 499
Test LOC 64,043
Functions measured 14,631
Functions complexity ≥ 15 778
Maximum complexity 667

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

Most complex functions

Complexity Where
667 app/wgp.py:7157 generate_video
374 ui/src/stores/useStore.ts:4532 Async method 'startGeneration'
356 app/_launch_runtime.py:23733 _run_generation
308 app/wgp.py:12274 generate_video_tab
272 ui/src/components/Sidebar/SceneAnimatorPanel.tsx:469 Function 'SceneAnimatorPanel'
266 ui/src/stores/useStore.ts:9658 Async method 'loadSettingsFromOutput'
258 app/services/director/planners/short_film.py:3433 ShortFilmPlanner._plan_story_driven
254 app/services/director_pipeline.py:13539 _run_video_generation
245 app/services/director_pipeline.py:7663 _run_pipeline
241 ui/src/features/agent/agentActions.ts:1077 Function 'parseAction'
227 ui/src/features/agent/agentActions.ts:2672 Async function 'executeAgentActions'
226 app/services/director_pipeline.py:6492 update_comic_preview

Trend vs baseline

Metric Δ
Production LOC +598
Test LOC +229
Functions ≥ 15 +4
Maximum complexity +0

Warnings

  • production LOC increased by +598
  • functions at complexity >= 15 increased by +4
  • complexity hotspot ui/src/stores/useStore.ts rose 373 -> 374
  • complexity hotspot app/services/model3d_service.py rose 51 -> 54
  • hotspot app/_launch_runtime.py increased by +66 lines
  • hotspot ui/src/stores/useStore.ts increased by +11 lines
  • hotspot ui/src/features/agent/agentActions.ts increased by +3 lines
  • hotspot ui/src/types/index.ts increased by +3 lines
  • hotspot app/services/model3d_service.py increased by +58 lines
  • hotspot ui/src/features/agent/capabilityRegistry.ts increased by +2 lines
  • hotspot ui/src/features/agent/applicationAdapters.ts increased by +5 lines

Ratchet passed.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit c6504c5. Configure here.

@IAnMove
IAnMove merged commit e865e77 into main Sep 2, 2026
5 checks passed
@IAnMove
IAnMove deleted the refactor/storylab-assets-tab branch September 5, 2026 11:53
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