Repository navigation
refactor: decompose AppState into sub-structs, remove glob barrel, and encapsulate workbench chains (desloppify wave 5E-2) - #116
Merged
Conversation
…d encapsulate workbench chains (desloppify wave 5E-2) - Group AppState (99 -> 42 fields) into 10 cohesive sub-structs in src/state/app_clusters.rs (ErrorDialog, PendingPrompts, TextureResolutionState, Gta6Finders, DocumentIoQueue, FrameTelemetry, AnimationState, InstallReferenceData, BackgroundControllers, SearchState) and fold collision_bvh and ptfx_sinks onto SimSession. - Replace all 14 wildcard glob re-exports/imports (::*) in src/state/mod.rs with explicit symbol lists. - Move the remaining 3 impl AppState blocks out of src/audio/ and src/video/ into src/state/media_playback.rs (0 impl AppState blocks outside src/state/). - Group Dressed private fields (45 -> 34), add domain methods on Workbench, Dressed, WardrobeWork, and WeaponsWork, narrow UI panel helpers, and eliminate 81 deep 4-5 level workbench field chains across wardrobe/, weapons/, and os_drop.rs.
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.
Summary
Resolves 3 desloppify review items (wave 5E-2; clears Design coherence to 0 open):
design_coherence::appstate_god_struct_and_glob_barrel&high_level_elegance::app_state_flat_god_struct_and_319_module_hub: GroupedAppState(99 -> 42 fields) into 10 focused sub-structs insrc/state/app_clusters.rs(ErrorDialog,PendingPrompts,TextureResolutionState,Gta6Finders,DocumentIoQueue,FrameTelemetry,AnimationState,InstallReferenceData,BackgroundControllers,SearchState) plus foldedcollision_bvh&ptfx_sinksontoSimSession; replaced all 14 wildcard glob re-exports/imports (::*) insrc/state/mod.rswith explicit lists; moved the remaining 3impl AppStateblocks out ofsrc/audio/andsrc/video/intosrc/state/media_playback.rs(0impl AppStateoutsidesrc/state/).abstraction_fitness::app_state_god_bag_and_deep_field_chains: GroupedDressedprivate fields (45 -> 34), added domain methods onWorkbench,Dressed,WardrobeWork, andWeaponsWork, narrowed UI helpers insrc/ui/panels/{wardrobe,weapons}/andsrc/ui/os_drop.rs, and eliminated all 81 deep 4-5 levelworkbench.*.*.*field chains in those panels.Verification
just ready: 0 new clippy warnings (only pre-existinggta6_hair.rs:411), 0 regressions (all 865 non-preexistingopenragetests and all workspace source-scan gates passed; only pre-existinggta6_meshlets.rsshell_budget andi18n::gatesfailed).the_gate_in_front_of_every_write: passed.just self-check: 140/140 passed.