Split Story Lab tabs and show code-health tables on PRs - #97
Conversation
PR Review — Loreframe StudioRisk: medium Automated review from Findings
Changed files
CONTRIBUTING checklist
Posted by the repo PR review workflow. Re-runs on each push to the PR. |
Code health
Markdown, JSON catalogs and tests are out of this table. Only Most complex functions
Trend vs baseline
Ratchet passed. |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
1 issue from previous review remains unresolved.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit a277588. Configure here.
Extract Music, Trailer, Productions and Compact workspace into composable panels so the files that CI treated as new 100-complexity hotspots are no longer single functions. Refresh the code-health baseline after that split. CI now prints a GitHub table in the job summary and upserts the same table as a PR comment. Markdown, JSON catalogs and tests stay out of the product complexity scan. The token heuristic no longer matches `task-generation-...` ids (false positive on #95).
`--markdown` without `--check` was printing **Ratchet passed.** because an empty warning list is not None. Status is now tied to a baseline comparison. Also rewrite the baseline after the extracted files are tracked so CI does not warn about the split's own new files.
a277588 to
0feb124
Compare
|
cursor review |
There was a problem hiding this comment.
✅ 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 0feb124. Configure here.

Why
#94 failed the code-health ratchet because #91 landed after the #92 baseline: CI treated
StoryProductionsMusicPanel(complexity 101) and the other extracted tabs as new files over the 25 limit. That is not a Character Kits docs problem, and a baseline-only PR would have hidden the real split.Doing the split now is compatible with Codex/#95: this PR does not touch
_launch_runtime.pyoruseStore.ts.What
scripts/code_health_baseline.jsonafter the split.<!-- code-health-report -->).task-generation-...(false positive on feat(provenance): trace Studio generations from Wizard to asset #95). Realsk-.../ghp_/hf_tokens still flag.Remaining Story Lab hotspots after the split (now in the baseline, not new-file failures): Film card 44, trailer clip 42,
MusicCueCard38, music models 32.Checks
tsc -p tsconfig.app.json --noEmittest_story_lab_audio_ui,test_story_lab_trailer_ui,test_model_selection_persistence,test_code_health,test_analyze_prpython scripts/code_health.py --check --markdownNote
Low Risk
Refactor-only Story Lab UI with no auth or data-path changes; CI and ratchet tooling changes are additive aside from baseline and scope exclusions.
Overview
Story Lab oversized tabs are broken into dedicated components (compact prep, music, trailer, productions) so behavior and i18n stay the same while each file sits under the complexity ratchet. Parent tabs mostly compose the new modules;
check-i18n-catalogs.mjsand Story Lab source tests now cover the fullstories/tree instead of a fixed file list.Code health gains
--markdownand--publish-pr-comment: CI onui-checkwrites the ratchet table to the job summary and upserts a single PR comment (<!-- code-health-report -->), withpull-requests: writeandGH_TOKEN. Production scope no longer counts tracked.md/.json(documented and tested).code_health_baseline.jsonis refreshed for the split.PR analysis tightens the token-shaped-secret regex so strings like
task-generation-job-studio-…are not flagged; realsk-/ghp_/hf_patterns still match.Reviewed by Cursor Bugbot for commit 0feb124. Configure here.