Skip to content

refactor: extraer editores compartidos de Story Lab y tabs simples con i18n - #88

Merged
IAnMove merged 2 commits into
mainfrom
refactor/storylab-shared-editors
Sep 2, 2026
Merged

refactor: extraer editores compartidos de Story Lab y tabs simples con i18n#88
IAnMove merged 2 commits into
mainfrom
refactor/storylab-shared-editors

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Qué

PR mediano cohesivo de Story Lab (siguiente corte de la cola Codex): extrae primero los componentes y el controlador visual compartidos, y luego agrupa World / Characters / Relationships / Structure en tabs que importan esos módulos. No se pasan ReferenceGallery ni LocationEditor como props.

Contrato

  • ReferenceGallery, LocationEditor, CharacterEditor y BeatEditor viven en módulos propios.
  • StoryLabVisualsProvider + useStoryLabVisuals concentran generate/upload/remove/imageBusy. Los tabs dejan de recibir 16 props.
  • StoryCharactersTab y StoryStructureTab extraídos; StoryWorldTab y StoryRelationshipsTab dejan el inglés hardcoded.
  • Namespace nuevo storyLab (EN+ES) para chrome, galería y esos cuatro tabs.
  • Music, Productions y la mesa compacta de videoclip/tráiler/vídeo rápido siguen en el panel.

Fuera de alcance

  • No toca useStore.ts ni _launch_runtime.py.
  • No hay E2E del Wizard (va con Music/Productions).
  • Compact prep sigue con copy mezclado; se i18n-izará con ese PR.

Zona i18n

Migrada: chrome de sección (Generate text / Approve / hint LLM), galería de referencias, world, characters, relationships, structure y editores de location/character/beat.

Queda: overview, assets, music, productions, mesa compacta, navegación interna de Story Lab.

Pruebas locales

  • npx tsc -b --pretty false
  • npm run i18n:check
  • npm test (494)
  • npx eslint . --max-warnings=0
  • python scripts/architecture_contracts.py

No mezclar hasta que CI esté verde.


Note

Low Risk
UI refactor and copy migration only; behavior should match prior Story Lab editing flows, with risk limited to regressions in visual upload/generate wiring via the new context.

Overview
Story Lab “simple tabs” refactor: pulls ReferenceGallery, LocationEditor, CharacterEditor, and BeatEditor out of StoryLabPanel, adds StoryCharactersTab / StoryStructureTab, and wires World / Characters / Relationships / Structure through shared storyLabEditors helpers plus StoryLabVisualsProvider / useStoryLabVisuals so tabs no longer receive gallery components or upload/generate props as injectables.

i18n: introduces the storyLab namespace (EN+ES) for section chrome, reference gallery, and the four foundation tabs; SectionHeader / Field and the i18n pilot check guard former hardcoded phrases. Music, Productions, and compact prep UI stay in the panel with mixed copy.

Docs/tests: updates slice queue and i18n docs; extends storyLabResponsive and foundation tests for the new module layout and catalogs.

Reviewed by Cursor Bugbot for commit 4770902. Configure here.

World, characters, relationships and structure import shared gallery,
location, character and beat editors plus a visuals controller instead
of receiving 16 component props. Visible copy on those tabs moves into
the storyLab catalog (EN+ES). Music and Productions stay in the panel.
@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

PR Review — Loreframe Studio

Risk: medium
Scope: 22 file(s); +1041/-587; 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

  • medium — Large pull request
    1041 additions / 587 deletions. Reviewers will have an easier time with smaller, focused PRs.
  • 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/BeatEditor.tsx, ui/src/features/stories/CharacterEditor.tsx, ui/src/features/stories/LocationEditor.tsx, ui/src/features/stories/ReferenceGallery.tsx, ui/src/features/stories/StoryCharactersTab.tsx, ui/src/features/stories/StoryLabVisualsProvider.tsx, ui/src/features/stories/StoryStructureTab.tsx, ui/src/features/stories/storyLabEditors.ts, ui/src/features/stories/storyLabVisuals.ts, ui/src/i18n/locales/en/storyLab.json, ui/src/i18n/locales/es/storyLab.json
  • modified: docs/development/INTERNATIONALIZATION.md, docs/development/SLICE_QUEUE.md, tests/test_story_lab_audio_ui.py, ui/scripts/check-i18n-catalogs.mjs, ui/src/features/stories/StoryLabPanel.tsx, ui/src/features/stories/StoryRelationshipsTab.tsx, ui/src/features/stories/StoryWorldTab.tsx, ui/src/features/stories/storyLabChrome.tsx, ui/src/i18n/resources.ts, 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.

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

Python CI still sliced StoryLabPanel for function ReferenceGallery after
the shared editor extract. The confirm/modal contract now reads
ReferenceGallery.tsx and asserts the panel only imports it.
@IAnMove
IAnMove merged commit 9dd8c95 into main Sep 2, 2026
4 checks passed
@IAnMove
IAnMove deleted the refactor/storylab-shared-editors 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