[priority: 4] Recreate Crafting Tab with Fabricator and Enchanter Sub-Tabs #87
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?
Summary
Recreate the Crafting tab with a modular sub-tab system. The tab should have sub-tabs for each crafting attunement (Fabricator, Enchanter), designed to be easily extensible for future crafting attunements.
Context
src/lib/game/stores/craftingStore.tswith full design/prepare/apply lifecyclesrc/components/game/crafting/:EnchantmentDesigner.tsx(with sub-components inEnchantmentDesigner/)EnchantmentPreparer.tsxEnchantmentApplier.tsxEquipmentCrafter.tsxsrc/lib/game/data/enchantments/(7 categories, 30+ effects)src/lib/game/data/equipment/(9 categories)Requirements
src/components/game/tabs/CraftingTab.tsxwith an internal sub-tab systemDisciplinesTab.tsx(not Radix nested tabs)Fabricator Sub-Tab
EquipmentCrafter.tsxcomponent as a starting point but adapt it for the fabricator attunementsrc/lib/game/data/fabricator-recipes.tsEnchanter Sub-Tab
EnchantmentDesigner,EnchantmentPreparer,EnchantmentAppliercomponentsenchantmentEfficiencyin the enchanter discipline data)Extensibility
Architecture
src/components/game/tabs/index.tsbarrel exportsrc/app/page.tsxwith lazy loading patternDebugNamewrapperCraftingTab/subdirectory with separate files for each sub-tabStarting work on Crafting Tab recreation. Plan: create fabricator recipes data, FabricatorSubTab, EnchanterSubTab (integrating existing 3-phase flow), main CraftingTab with sub-tab system, wire into page.tsx, write tests.
✅ Crafting Tab recreated with Fabricator and Enchanter sub-tabs.
New files:
src/lib/game/data/fabricator-recipes.ts— 12 recipes across earth/metal/crystal/sand mana typessrc/components/game/tabs/CraftingTab.tsx— Main tab with clsx-based sub-tab systemsrc/components/game/tabs/CraftingTab/FabricatorSubTab.tsx— Recipe filtering, crafting, materials inventorysrc/components/game/tabs/CraftingTab/EnchanterSubTab.tsx— 3-phase flow (Design → Prepare → Apply)src/components/game/tabs/CraftingTab.test.ts— 17 testsModified files:
src/components/game/tabs/index.ts— Added CraftingTab barrel exportsrc/app/page.tsx— Added lazy-loaded Crafting tab trigger + contentAll files under 400 lines. All 17 tests pass. No new TypeScript errors.