mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 23:16:21 +00:00
c16ac1d276
Move 14 pure UI flags off useState in WiredCreatorToolsView and into a new feature-local Zustand store (useWiredCreatorToolsUiStore): tab navigation (isVisible, activeTab, inspectionType, variablesType), modal open flags (monitor history/info, inspection give, variable manage, managed give), and the variable-manage / monitor-history filter + sort + page selectors. The setters accept either a value or a (prev => next) updater to preserve the toggle/pagination call sites. WiredInspectionTabView and WiredVariablesTabView now consume the store directly for inspectionType / variablesType / isInspectionGiveOpen, dropping six props from their interfaces. Behaviour is unchanged: every listener and memo in the parent still reads the same values through selectors, and the new tests pin the defaults and setter semantics across the 14 flags. Derived selection state (selectedFurni, monitorSnapshot, variable highlight overlays, etc.) intentionally stays in the parent for this pass — moving those requires moving their listener effects too.