Combined critique #36: split GamePlayerShell/DevtoolsOverlay/EditorChrome by ownership - #865
Merged
Merged
Conversation
…rome by ownership Pure structural split — no behavior, prop, or JSX-output change. GamePlayerShell.tsx 2355->905: extract scene models, scene lighting, world scene (markers/env/actors/view/remote), FrameDriver, HudOnlyDriver, runtime diagnostics, GamePhaseStamp, multiplayer-sync hook, shared consts. DevtoolsOverlay.tsx 1280->319: extract per-tab panels (Perf/Logs/Net/Keys/Col/Tune), shared atoms, perf diagnose, overrides persistence; overlay now composes them. EditorChrome.tsx 1264->651: extract TerrainPanel, InspectorPanel, shared field components and style constants. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pure structural split of three god components by lifecycle/ownership boundary. No behavior, prop, or JSX-output change — every extracted concern moved verbatim into its own module; each top-level component is now a thin composition. The 10 games render/play identically.
packages/shell/src/GamePlayerShell.tsx— 2355 → 905Concerns extracted:
render/SceneModels.tsx(EntityModel+ sprite/bone/part/material-map/fallback boundary).render/SceneLighting.tsx(ConfiguredLighting,BackdropFog, directional shadow light).world/WorldScene.tsx(WorldView/WorldActors/WorldEnvironment,EntityMarker/ObjectMarker,GroundPlane/RockField,RemotePlayers).drivers/FrameDriver.tsx,drivers/HudOnlyDriver.tsx.diagnostics/RuntimeDiagnostics.tsx(DiagnosticOverlay,GameUiErrorBoundary,logRuntimeError,RuntimeDiagnostic).GamePhaseStamp.tsx.useShellMultiplayerSync.ts(the join/presence/feed/chat effect as a hook).shellConstants.ts.packages/shell/src/devtools/DevtoolsOverlay.tsx— 1280 → 319Split by panel ownership:
PerfPanel.tsx,LogsPanel.tsx,NetPanel.tsx,KeysPanel.tsx,ColPanel.tsx,TunePanel.tsx.panelAtoms.tsx; perf culprit diagnosis →perfDiagnose.ts; overrides persistence →devtoolsOverrides.ts.DevtoolsOverlay,DevtoolsRendererProbe,withDevtoolsLatency,buildLeanReport,buildFullReport,applyStoredDevtoolsOverrides,persistDevtoolsOverrides) unchanged — re-exported where moved, soagentBridge/apps/dev/GamePlayerShellimports are untouched.packages/editor/src/EditorChrome.tsx— 1264 → 651TerrainPanel.tsx(TerrainPanel+ sculpt/paint controls + default-bounds helper).InspectorPanel.tsx(InspectorPanel+ kind/generator/clearance/parent/color/vegetation field components + object adapters).chromeFields.tsx(NumberField,SliderRow); shared style constants →chromeStyles.ts(BTN/INPUT/MICRO).Output identical: extractions are verbatim moves with narrowed prop/return surfaces; the exported component APIs and rendered JSX are unchanged. No new dependencies.
Gate
bun install✓bun run build✓bun scripts/check-types-all.ts→ 29/29 workspaces, 0 failing (baseline held) ✓bun run test:all→ 4503 pass, 1 skip, 0 fail ✓Note for maintainer: run
bun run gen:skill-apion a clean checkout if desired — no public component API changed, so skills were not regenerated here.Generated by Claude Code