Skip to content

refactor: decompose AppState into sub-structs, remove glob barrel, and encapsulate workbench chains (desloppify wave 5E-2) - #116

Merged
leonidarider merged 1 commit into
mainfrom
agent/desloppify-w5e2
Dec 3, 2026
Merged

leonidarider merged 1 commit into
mainfrom
agent/desloppify-w5e2

Conversation

@leonidarider

Copy link
Copy Markdown
Contributor

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: Grouped AppState (99 -> 42 fields) into 10 focused sub-structs in src/state/app_clusters.rs (ErrorDialog, PendingPrompts, TextureResolutionState, Gta6Finders, DocumentIoQueue, FrameTelemetry, AnimationState, InstallReferenceData, BackgroundControllers, SearchState) plus folded collision_bvh & ptfx_sinks onto SimSession; replaced all 14 wildcard glob re-exports/imports (::*) in src/state/mod.rs with explicit lists; moved the remaining 3 impl AppState blocks out of src/audio/ and src/video/ into src/state/media_playback.rs (0 impl AppState outside src/state/).
  • abstraction_fitness::app_state_god_bag_and_deep_field_chains: Grouped Dressed private fields (45 -> 34), added domain methods on Workbench, Dressed, WardrobeWork, and WeaponsWork, narrowed UI helpers in src/ui/panels/{wardrobe,weapons}/ and src/ui/os_drop.rs, and eliminated all 81 deep 4-5 level workbench.*.*.* field chains in those panels.

Verification

  • just ready: 0 new clippy warnings (only pre-existing gta6_hair.rs:411), 0 regressions (all 865 non-preexisting openrage tests and all workspace source-scan gates passed; only pre-existing gta6_meshlets.rs shell_budget and i18n::gates failed).
  • the_gate_in_front_of_every_write: passed.
  • just self-check: 140/140 passed.
  • Pre-commit hook (fmt, encoding, provenance): clean.

…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.
@leonidarider
leonidarider merged commit c2e920a into main Dec 3, 2026
@leonidarider
leonidarider deleted the agent/desloppify-w5e2 branch December 3, 2026 01:57
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.

1 participant