Skip to content

refactor(studio): lift the carve out of the FX section file - #3181

Merged
vanceingalls merged 671 commits into
mainfrom
wa-20b1a-carve-extract
Aug 13, 2026
Merged

refactor(studio): lift the carve out of the FX section file#3181
vanceingalls merged 671 commits into
mainfrom
wa-20b1a-carve-extract

Conversation

@vanceingalls

Copy link
Copy Markdown
Collaborator

propertyPanelFxSection.tsx was 992 lines against the studio's 600-line cap. The carve is the one part not about the chain: it owns a source picker, a strength knob and a read-only list of what the analysis produced, none of it shared with an ordinary effect row.

Pure move — no behaviour change, no rendered-audio change. Section is 647 lines after this; the effect-row extraction is the next PR.

🤖 Generated with Claude Code

@terencecho terencecho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Empirical MOVE verified at 881608dd39b8 — two independent diff exit 0 runs (carve region + Section tail). Byte-identical extraction; only delta is the export keyword. No hook / dep-array / prop changes.

BC preserved via export type { AudioTrackOption } re-export in Section (consumer at propertyPanelAudioFxGroup.tsx:62 still compiles).

Tests untouched — carve is exercised via CSS class selectors (.hf-fx-carve*) and text strings ("Voiceover carve") which are preserved byte-identically. No new pin test needed for a byte-identical move.

OLD-assumption counterfactuals: (a) hook reorder / dep-array change / prop rename — pinned by diff exit 0. (b) AudioTrackOption consumer compiles — pinned by grep + re-export. (c) DOM contract (selectors + strings) — pinned by byte-identity of the extracted region.

CI: Preflight (lint + format) red on 9 pre-existing .md files (README, plans/*.md, skills/hyperframes-audio/*.md) — NONE touched by this PR; base-branch drift. preview-regression red downstream of preflight. regression + player-perf + Detect changes green.

— Review by tai (pr-review)

@miga-heygen miga-heygen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: refactor(studio): lift the carve out of the FX section file — #3181

Verdict: LGTM

Pure file-extraction refactor with zero behavioral changes. Verified line-by-line:

  • carveMemberName(), formatParamValue(), paramValueWidthCh(), FxCarveMember, FxCarveModule — all verbatim moves, only change is the required export keyword on FxCarveModule.
  • AudioTrackOption interface re-exported from the original module to preserve the public API for external consumers.
  • Import housekeeping is correct: HfAudioFxParam, FxParamRow, formatHz removed from old file (only used by moved code), added to new file. defaultAudioFxParams correctly kept in both (used independently).
  • No hooks exist in the moved code — FxCarveModule and FxCarveMember are pure render functions receiving all state via props. The extraction cannot change lifecycle behavior.

Ship it.


Review by Miga

🤖 Generated with Claude Code

# Conflicts:
#	packages/studio/src/components/editor/propertyPanelAudioFxGroup.test.tsx
#	packages/studio/src/components/editor/propertyPanelAudioFxGroup.tsx
#	packages/studio/src/components/editor/propertyPanelFxSection.tsx
# Conflicts:
#	packages/studio/src/components/editor/propertyPanelAudioFxGroup.test.tsx
#	packages/studio/src/components/editor/propertyPanelAudioFxGroup.tsx
#	packages/studio/src/components/editor/propertyPanelFxSection.tsx
#	skills-manifest.json
#	skills/hyperframes-audio/SKILL.md
#	skills/hyperframes-audio/references/attributes.md
#	skills/hyperframes-audio/scripts/carve.mjs
@vanceingalls
vanceingalls changed the base branch from wa-20a4-leveller to main August 13, 2026 14:44
@github-actions

Copy link
Copy Markdown

Fallow audit report

Found 2 findings.

Details
Severity Rule Location Description
critical fallow/high-complexity packages/studio/src/components/editor/propertyPanelFxCarveModule.tsx:140 'FxCarveModule' has cyclomatic complexity 24 (threshold: 20) and cognitive complexity 44 (threshold: 15)
minor fallow/high-cognitive-complexity packages/studio/src/components/editor/propertyPanelFxSection.tsx:334 'FxSection' has cognitive complexity 19 (threshold: 15)

Generated by fallow.

@vanceingalls
vanceingalls merged commit c327740 into main Aug 13, 2026
43 of 45 checks passed
@vanceingalls
vanceingalls deleted the wa-20b1a-carve-extract branch August 13, 2026 15:08
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.

3 participants