Fold App's radial store reach into push-down Containers#356
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…onal Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…bel dispatch) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ection containers Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ctors) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
skymap | a235b35 | Commit Preview URL Branch Preview URL |
Jun 20 2026, 09:27 AM |
…ainers # Conflicts: # src/components/App/App.tsx
DoD audit READY: 2890 tests pass, typecheck + build clean. All nine containers + presentational pairs + SettingsPanel shell shipped; zero leaf-level store reach; no createSelector introduced; README documents the convention. App's selector set matches the plan plus the two selection-display reads the #350 selection-into-store merge moved into App (noted in the DoD). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What & why
App.tsxwas the single radial subscriber to the Redux store — ~25useAppSelectorcalls + ~24 dispatches funnelled down as props (SettingsPanel alone took ~40). Any one selector firing re-rendered App and cascaded through the entire HUD.This folds that reach into push-down Container components (a pattern borrowed from the repperjs reference impl): each container subscribes to only its slice at its own boundary, so a store change re-renders just that subtree. A point-size drag now re-renders only the Galaxies section, a label toggle only Labels, a debug checkbox only DebugPanel.
Purely structural — no Redux state shape change, no engine change, no behaviour change.
What shipped
src/components/containers/, eachmemo'd and subscribing only to its own slice:AutoRotateToggleContainer,DebugPanelContainer,TierChipContainer, and the 6 SettingsPanel section containers (Galaxies / CosmicWeb / Flow / Structures / Labels / Display).SettingsPanel: ~880-line, ~40-prop monolith → 109-line presentational shell (zero store reach) composing the section containers.RenderTogglesSectionis now fully presentational — the codebase's last leaf-level store reach is gone.useStructureMemberCountneeds).Convention (new
src/components/containers/README.md)<Name>Containerrenders<Name>(presentational, minus "Container").store//state/(grep-verified).import { memo } from 'react'→export default memo(ComponentName). Memo is load-bearing here, not polish — it's what stops an unrelated App re-render cascading through the containers.Provenance
Spec + plan ride this PR (lead commits):
docs/superpowers/specs/2026-06-19-react-store-containers-design.md,docs/superpowers/plans/2026-06-19-react-store-containers.md.Testing
npm run typecheckclean,npm run buildsucceeds.🤖 Generated with Claude Code