DI PR post-review follow-up 2 - 4 code quality tweaks#5315
Conversation
Remove commented-out world generator initialization code and the now-unused gameManifest field. The world generator setup was moved to RegisterWorldSystems during the DI migration. BSA flagged this on PR MovingBlocks#5299. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename the nonsensical variable name to something descriptive. This is a per-module child context used to inject widget-specific dependencies (TypeWidgetLibrary) during control widget initialization. BSA flagged this on PR MovingBlocks#5299. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Inject NetworkSystem as an explicit constructor parameter instead of pulling it from Context. Context is retained only for the lazy PermissionManager lookup (provided by @share at runtime, not available at construction time). BSA flagged this on PR MovingBlocks#5299: "This class does not require a full context. Inject NetworkSystem and PermissionManager instead." PermissionManager cannot be fully injected yet due to its lifecycle. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace Context parameter with explicit ReflectFactory and CopyStrategyLibrary parameters in both constructors. The Context was only used to pull these two dependencies, making it an unnecessary intermediary. BSA flagged this on PR MovingBlocks#5299: "We should not be injecting Context directly unless absolutely necessary." Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughFour classes were refactored to change dependency wiring: RegisterRemoteWorldSystems drops GameManifest, ConsoleImpl now receives NetworkSystem explicitly, BlockFamilyLibrary replaces Context with ReflectFactory and CopyStrategyLibrary, and NUIManagerInternal uses a local widgetContext for widget initialization. Changes
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
The GameManifest import was removed along with the dead code, but the constructor parameter still references the type. Restores the import. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dSystems BSA review feedback: the GameManifest parameter was left behind after removing the commented-out code that used it. Remove from constructor and update the caller in StateLoading. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Phase 2 code quality follow-up to #5313, addressing BSA's review comments on #5299.
Changes
gameManifestfieldtimedContextForModulesWidgets→widgetContextNetworkSystemdirectly instead of pulling from Context. Context retained only for lazyPermissionManagerlookup (runtime@Share, not available at construction)Contextparameter with explicitReflectFactoryandCopyStrategyLibraryin both constructorsTest Plan
🤖 Generated with Claude Code