Skip to content

refactor: split labActions into story, series and comic modules - #38

Merged
IAnMove merged 1 commit into
mainfrom
refactor/paso3-lab-seams
Sep 1, 2026
Merged

refactor: split labActions into story, series and comic modules#38
IAnMove merged 1 commit into
mainfrom
refactor/paso3-lab-seams

Conversation

@IAnMove

@IAnMove IAnMove commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Qué

Troceo mínimo del hotspot labActions.ts (Paso 3, primer PR de lógica).

  • labActions.ts se queda con Story Lab + stage Director + el barrel.
  • seriesLabActions.ts — episodios, plan, render, review, assembly, canon.
  • comicLabActions.ts — create / generate / panel.
  • labActionHelpers.tsnormalizeName, duración, personajes por defecto, showLab.

applicationAdapters sigue importando ./labActions. Cero JSX. Cero cambio de contrato JSON.

El gate agentCapabilityPorts actualiza el grafo de labActions.ts. La allowlist de useStore.setState no cambia: sigue en stageStoryVideo / stageStoryMusicVideo.

Por qué

Sin este corte, Story/Series/Comics no pueden ir en PRs disjuntos.

Verificación

npm test — 447 pass.

Dueño del merge: humano. No auto-merge.


Note

Low Risk
Mechanical file split with barrel re-exports; no agent JSON contract or runtime behavior changes intended.

Overview
Refactors the oversized labActions.ts by moving Series Lab and Comic Lab agent handlers into seriesLabActions.ts and comicLabActions.ts, with shared utilities in labActionHelpers.ts.

labActions.ts now holds Story Lab, Director staging/start flows, and re-exports the series and comic symbols so existing import('./labActions') call sites stay unchanged. Logic in the extracted modules is a move, not a rewrite.

The agentCapabilityPorts test updates the allowed import graph: labActions may depend on the new modules instead of pulling comic/series internals directly.

Reviewed by Cursor Bugbot for commit e2404da. Configure here.

Keep Story (and its setState allowlist) in labActions.ts. Move Series
and Comics implementations behind a barrel so later slice PRs no longer
have to edit the same 2.6k file. Shared name/duration helpers live in
labActionHelpers.ts.
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

PR Review — Loreframe Studio

Risk: medium
Scope: 5 file(s); +1072/-1026; React UI

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
    1072 additions / 1026 deletions. Reviewers will have an easier time with smaller, focused PRs.
  • medium — Very large file change (ui/src/features/agent/seriesLabActions.ts)
    ui/src/features/agent/seriesLabActions.ts adds 596 lines. Consider splitting the PR.
  • 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/agent/comicLabActions.ts, ui/src/features/agent/labActionHelpers.ts, ui/src/features/agent/seriesLabActions.ts
  • modified: ui/src/features/agent/labActions.ts, ui/tests/agentCapabilityPorts.test.mjs

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 1, 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 e2404da. Configure here.

@IAnMove
IAnMove merged commit 46d3657 into main Sep 1, 2026
5 checks passed
@IAnMove
IAnMove deleted the refactor/paso3-lab-seams branch September 5, 2026 11:54
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