[TASK-008] Enchanting system stabilization — store as single source of truth (Phase 2) #11
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Objective
Make the 3-step enchantment flow (Design → Prepare → Apply) fully driven by the crafting store as the single source of truth. Remove all local component state that duplicates store state.
Blockers (must be resolved first)
Current Problems
EnchantmentDesigner.tsxuses localuseStateforselectedEffects,selectedEquipmentType,designName— these should all come from the crafting store (enchantmentSelectionslice already exists there).useCraftingStoreand its own local state, creating a dual-source-of-truth problem.enchantmentSelectionstate withsetSelectedEquipmentType,setSelectedEffects,setDesignName, etc. — but the component doesn't use them.Work Items
EnchantmentDesigner.tsxto eliminate all localuseStatefor selection/design fieldsEnchantmentPreparer.tsxuses store for equipment selection (blocked by #8)EnchantmentApplier.tsxuses store for design + equipment selectionuseCraftingStoreenchantment selection actions work correctly end-to-endnpx tsc --noEmit— zero errors related to EnchantmentDesigner/EnchantmentPreparerAcceptance Criteria
Reference
enchantmentSelectionshape:{ selectedEquipmentType, selectedEffects, designName, selectedDesign, selectedEquipmentInstance }