[priority: 4] Recreate Prestige Tab — Insight Upgrade Purchasing #91
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 Prestige tab that was deleted in commit
fe0f2a0. This tab should allow the player to purchase prestige/insight upgrades and manage loop resets.Context
src/lib/game/stores/prestigeStore.tsprestigeUpgrades: Record<string, number>— maps upgrade ID to levelinsight: number— current insight available to spendtotalInsight: number— total insight earned across all loopsloopInsight: number— insight earned in the current looploopCount: number— number of loops completedsrc/lib/game/constants/prestige.ts(14 upgrades: manaWell, manaFlow, deepMemory, insightAmp, spireKey, temporalEcho, steadyHand, ancientKnowledge, elementalAttune, spellMemory, guardianPact, quickStart, elemStart, unlockedManaTypeCapacity)PrestigeDefhas:name,desc,max,costmemories[],memorySlots— carry skills/levels between loopspactSlots,signedPacts,defeatedGuardiansRequirements
src/components/game/tabs/PrestigeTab.tsxsrc/components/ui/src/components/game/tabs/index.tsbarrel exportsrc/app/page.tsxwith lazy loading patternDebugNamewrapperArchitecture Notes
gameActions.ts→createResetGame()Starting work on PrestigeTab. I've reviewed the prestige store, prestige constants (14 upgrades), game loop actions, and existing tab patterns. Now creating the PrestigeTab component.
Summary of changes
Files created:
src/components/game/tabs/PrestigeTab.tsx— Full prestige tab with:startNewLoop()from gameStoreDebugNamewrapper, mounted state guard, Zustand selectors viauseShallowsrc/components/game/tabs/PrestigeTab.test.ts— 10 tests covering module exports, barrel export, upgrade definitions (14 IDs, required fields, positive costs/levels), store import, and file size limitFiles modified:
src/components/game/tabs/index.ts— AddedPrestigeTabbarrel exportsrc/app/page.tsx— Added lazy-loadedPrestigeTaband "✨ Prestige" tab triggerVerification:
PrestigeTab complete. All tests pass, no new TS errors, under 400 lines. Ready for review.