BUG: EnchantmentDesigner EffectSelector does not render after selecting equipment #239
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?
Bug Description
After selecting an equipment type (e.g., Basic Staff) in the Enchantment Designer's Design phase, the EffectSelector component does not appear in the accessibility tree. Only the DesignForm (name input, capacity, time, start button) renders. Without the EffectSelector, the player cannot add effects to a design, blocking the entire enchanting workflow.
Steps to Reproduce
selectedEffects.length === 0and there's no way to add effectsExpected Behavior
After selecting an equipment type, the EffectSelector should render showing available enchantment effects that can be added to the design.
Likely Root Cause
The EffectSelector may not render when
availableEffectsis empty (becauseunlockedEffectsis empty at game start) and the component's ScrollArea with zero items may collapse to zero height. Alternatively, a conditional rendering gate is preventing display.Fixed. Changed
getAvailableEffects()inEnchantmentDesigner/utils.tsto show all effects whenunlockedEffectsarray is empty (fresh game). Previously the filter requiredunlockedEffects.includes(effect.id)which was always false for an empty array, making EffectSelector render nothing. The fix addsunlockedEffects.length === 0 ||bypass.