Skip to content

refactor: NodeSettings.tsx の分割(2500行超の巨大コンポーネント)#125

Open
oboroge0 wants to merge 1 commit intomainfrom
refactor/split-node-settings
Open

refactor: NodeSettings.tsx の分割(2500行超の巨大コンポーネント)#125
oboroge0 wants to merge 1 commit intomainfrom
refactor/split-node-settings

Conversation

@oboroge0
Copy link
Copy Markdown
Owner

概要

NodeSettings.tsx(2571行)を3つのファイルに分割し、保守性を向上させました。

  • FormFieldRenderer.tsx(1235行): 各フォームフィールドタイプの描画ロジック(text, number, select, checkbox, password, animation-file, model-file, prompt-builder, expression-list, png-expression-map 等)
  • GlobalSettingsOverride.tsx(97行): グローバル設定オーバーライドのバナーUI・展開フィールド表示
  • NodeSettings.tsx(1392行): ノード設定スキーマ定義 + オーケストレーター(簡素化)

変更の詳細

  • PasswordField, InputListField, ExpressionListField, PngExpressionMapField コンポーネントを FormFieldRenderer.tsx に移動
  • renderField のswitch文ロジックを FormFieldRenderer コンポーネントとして抽出
  • GLOBAL_SETTINGS_MAP と グローバル設定バナー/オーバーライドUIを GlobalSettingsOverride.tsx に移動
  • PromptSectionExpression 型は NodeSettings.tsx からre-exportし、既存のimport元(Canvas.tsx)の互換性を維持
  • 機能変更なし(純粋なリファクタリング)

テスト計画

  • TypeScript型チェック(tsc --noEmit)パス
  • ESLintエラー0件(警告は既存のものと同一)
  • 全95テストパス
  • Canvas.tsxPromptSection import が正常動作
  • client-page.tsxNodeSettings default import が正常動作

closes #102

🤖 Generated with Claude Code

2571行の巨大コンポーネントを3つのファイルに分割:
- FormFieldRenderer.tsx: フォームフィールドの描画ロジック(各入力タイプ別の描画)
- GlobalSettingsOverride.tsx: グローバル設定オーバーライドのUI
- NodeSettings.tsx: オーケストレーター(簡素化)

機能変更なし。既存のexport(PromptSection, Expression型)はre-exportで互換性維持。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 26, 2026

Warning

Rate limit exceeded

@oboroge0 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 24 minutes and 54 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 4920ffd and f927bd9.

📒 Files selected for processing (3)
  • apps/web/components/panels/FormFieldRenderer.tsx
  • apps/web/components/panels/GlobalSettingsOverride.tsx
  • apps/web/components/panels/NodeSettings.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/split-node-settings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@oboroge0
Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 26, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@oboroge0
Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 26, 2026

✅ Actions performed

Full review triggered.

@oboroge0
Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 26, 2026

✅ Actions performed

Full review triggered.

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.

refactor: NodeSettings.tsx の分割(2500行超の巨大コンポーネント)

1 participant