Skip to content

Extract Story Lab assembly tab and library chrome i18n - #102

Closed
IAnMove wants to merge 1 commit into
mainfrom
refactor/storylab-assembly-chrome
Closed

Extract Story Lab assembly tab and library chrome i18n#102
IAnMove wants to merge 1 commit into
mainfrom
refactor/storylab-assembly-chrome

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Why

Assets left StoryLabPanel in #100. The Assembly tab and leftover library chrome (header, tab labels, project types, Guided/Automatic, prepare buttons, Cancel/Resume/Storypack/Import/Smart assets/New/Duplicate, nav notes) still mixed EN/ES inline.

What

  • StoryAssemblyTab is presentational; StoryProductionTimeline stays here with initiallyOpen={index === 0}
  • StoryLabLibraryChrome owns the header toolbar; public panel handlers (generate, exportStorypack, importStorypack, newProject, reopen/restore) stay in StoryLabPanel
  • storyLabTabs.ts is data-driven (id: 'trailer', id: 'assembly'); labels come from i18n
  • EN/ES storyLab catalogs for library chrome, project types, tabs, nav notes and assembly copy
  • Python/UI source contracts retargeted to catalogs / storyLabTabs / StoryAssemblyTab

Does not touch useStore.ts or _launch_runtime.py. Independent of any in-flight useStore slice PR.

Checks

  • eslint on extracted files + tsc -p tsconfig.app.json --noEmit
  • i18n catalogs
  • Story Lab UI extract tests (storyLabResponsive, i18nFoundation)
  • test_story_lab_trailer_ui, test_series_lab_ui, test_story_lab_audio_ui

Humans merge; checks must be green.


Note

Low Risk
UI refactor and copy migration only; no changes to useStore.ts, backend, or generation behavior beyond wiring the same handlers into new components.

Overview
Pulls Assembly and the library header toolbar out of StoryLabPanel into StoryAssemblyTab and StoryLabLibraryChrome, with tab/project-type definitions centralized in storyLabTabs.ts. Generation, import/export, and reopen/restore handlers stay in the panel; the new pieces are mostly presentational and call back through props.

i18n (EN+ES): Adds storyLab keys for library chrome (save status, prepare buttons, Storypack/Import/Smart assets, etc.), project types, tab labels, nav notes, and assembly copy. StoryLabNavigation’s mobile swipe hint uses nav.swipe. The i18n pilot list and forbidden-literal checks cover the extracted files so mixed inline strings are blocked.

Tests/docs: Python UI contracts and Story Lab responsive/i18n tests now assert catalogs and storyLabTabs / StoryAssemblyTab instead of hardcoded strings in the panel. SLICE_QUEUE.md reflects Assets (#100) and describes this slice as the next Story Lab extract.

Reviewed by Cursor Bugbot for commit 37cee0f. Configure here.

Move assembly and leftover library chrome out of StoryLabPanel.
Handlers stay in the panel; tab labels, project types and chrome
copy live in storyLab EN/ES catalogs. 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: 13 file(s); +718/-217; React UI, docs

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/StoryAssemblyTab.tsx, ui/src/features/stories/StoryLabLibraryChrome.tsx, ui/src/features/stories/storyLabTabs.ts
  • modified: docs/development/SLICE_QUEUE.md, tests/test_series_lab_ui.py, tests/test_story_lab_trailer_ui.py, ui/scripts/check-i18n-catalogs.mjs, ui/src/features/stories/StoryLabNavigation.tsx, ui/src/features/stories/StoryLabPanel.tsx, ui/src/i18n/locales/en/storyLab.json, ui/src/i18n/locales/es/storyLab.json, ui/tests/i18nFoundation.test.tsx, 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 2, 2026

Copy link
Copy Markdown

Code health

Metric Value
Production LOC 234,553
Production files 503
Test LOC 64,144
Functions measured 14,649
Functions complexity ≥ 15 777
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:4426 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:9164 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 +888
Test LOC +330
Functions ≥ 15 +3
Maximum complexity +0

Warnings

  • production LOC increased by +888
  • functions at complexity >= 15 increased by +3
  • 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/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.

@IAnMove

IAnMove commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

cursor review

@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 37cee0f. Configure here.

@IAnMove

IAnMove commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #103 (this extract plus remaining visible i18n, restacked on current main). Branch kept.

@IAnMove

IAnMove commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

Closed as superseded by #103.

@IAnMove IAnMove closed this Sep 2, 2026
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