🐛 GRIMOIRE TAB: Permanently stuck on "Loading grimoire..." — loaded state never set to true #172
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
The Grimoire tab doesn't load. It permanently shows "Loading grimoire..." and never displays the spell content.
Root Cause
In
src/app/components/GrimoireTab.tsx:12-13:The
loadedstate variable is initialized tofalse, and_setLoadedis never called (the underscore prefix signals "intentionally unused").At line 22:
Since
loadedis alwaysfalse, the component permanently renders the loading message. The spell data pipeline works correctly (spells withgrimoire: trueexist, the filter logic is correct, theuseEffectpopulatesgrimoireSpells), but it's unreachable behind the dead guard.Fix (One Line)
In
src/app/components/GrimoireTab.tsx:loadedstate variable and theif (!loaded)guard entirely (cleanest — the existinggrimoireSpells.length === 0check already handles the empty state)_setLoaded(true)at the end of theuseEffectthat populatesgrimoireSpellsFile
src/app/components/GrimoireTab.tsx:12-24(the bug)Fixed in commit
8cebea9. Removed the deadloadedstate guard in GrimoireTab.tsx that permanently showed "Loading grimoire...".