feat: debug panel with force unlocks and hard reset #65

Merged
naomi merged 2 commits from feat/resets into main 2026-03-18 12:37:07 -07:00
Owner

Summary

  • Adds a new Debug tab to the game UI with two self-service tools for players with broken save state
  • Force Unlocks: scans the player's save and grants any zones, quests, bosses, and exploration areas they've earned but that are still locked — shows a breakdown of what was unlocked (or reports nothing needed fixing)
  • Hard Reset: wipes progress back to a fresh save (preserving lifetime stats), guarded behind a confirmation modal to prevent accidental clicks

Files added

  • apps/api/src/routes/debug.ts — two POST endpoints (/force-unlocks, /hard-reset)
  • apps/web/src/components/game/debugPanel.tsx — the Debug tab UI
  • apps/web/src/components/ui/confirmationModal.tsx — reusable confirmation modal

Files modified

  • apps/api/src/index.ts — registers the debug router
  • packages/types/src/interfaces/api.ts — adds ForceUnlocksResponse type
  • packages/types/src/index.ts — exports the new type
  • apps/web/src/api/client.ts — adds forceUnlocks() and debugHardReset() API calls
  • apps/web/src/context/gameContext.tsx — wires both functions into game context
  • apps/web/src/components/game/gameLayout.tsx — adds the Debug tab
  • apps/web/src/styles.css — styles for action buttons, cards, result messages, and confirmation modal

This PR was created with help from Hikari~ 🌸

## Summary - Adds a new **Debug** tab to the game UI with two self-service tools for players with broken save state - **Force Unlocks**: scans the player's save and grants any zones, quests, bosses, and exploration areas they've earned but that are still locked — shows a breakdown of what was unlocked (or reports nothing needed fixing) - **Hard Reset**: wipes progress back to a fresh save (preserving lifetime stats), guarded behind a confirmation modal to prevent accidental clicks ## Files added - `apps/api/src/routes/debug.ts` — two POST endpoints (`/force-unlocks`, `/hard-reset`) - `apps/web/src/components/game/debugPanel.tsx` — the Debug tab UI - `apps/web/src/components/ui/confirmationModal.tsx` — reusable confirmation modal ## Files modified - `apps/api/src/index.ts` — registers the debug router - `packages/types/src/interfaces/api.ts` — adds `ForceUnlocksResponse` type - `packages/types/src/index.ts` — exports the new type - `apps/web/src/api/client.ts` — adds `forceUnlocks()` and `debugHardReset()` API calls - `apps/web/src/context/gameContext.tsx` — wires both functions into game context - `apps/web/src/components/game/gameLayout.tsx` — adds the Debug tab - `apps/web/src/styles.css` — styles for action buttons, cards, result messages, and confirmation modal ✨ This PR was created with help from Hikari~ 🌸
hikari added 1 commit 2026-03-18 11:20:02 -07:00
feat: add debug panel with force-unlocks and hard-reset tools
CI / Lint, Build & Test (pull_request) Failing after 1m34s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m36s
00c38144e3
Adds a new Debug tab to the game UI exposing two admin self-service
tools: Force Unlocks (non-destructive scan and correction of any
earned-but-locked zones, quests, bosses, and exploration areas) and
Hard Reset (full progress wipe back to a fresh save, preserving
lifetime stats). Both are guarded by a confirmation modal.

Also styles the action buttons and confirmation modal danger variant,
and adds the ForceUnlocksResponse type to the shared types package.
hikari added 1 commit 2026-03-18 11:41:22 -07:00
test: add full coverage for debug route
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m4s
CI / Lint, Build & Test (pull_request) Successful in 1m10s
cf22b29247
naomi merged commit 03b6c847b3 into main 2026-03-18 12:37:07 -07:00
naomi deleted branch feat/resets 2026-03-18 12:37:07 -07:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/elysium#65