[priority: critical] Disciplines cannot be practiced - multiple blocking issues #194

Closed
opened 2026-05-29 13:05:06 +02:00 by Anexim · 2 comments
Owner

CRITICAL BUG: Disciplines system is effectively non-functional

Bug Summary

Multiple issues prevent players from practicing disciplines, blocking a core progression system.

Issues Found

Issue A: signed_pact prerequisite always fails (permanently locked)

  • File: src/lib/game/utils/discipline-math.ts, lines 136-139
  • Problem: The signed_pact prerequisite check ALWAYS reports as missing, unconditionally pushing to missingPrereqs without checking whether the player has actually signed pacts
  • Impact: Any discipline requiring signed_pact is permanently shown as locked in the UI
  • Fix: Check gameState?.signedPacts length > 0 before marking as missing

Issue B: Concurrent limit silently blocks activation

  • File: src/lib/game/stores/discipline-slice.ts, lines 85-86
  • Problem: When the player reaches their concurrent discipline limit (default: 1), calling activate() silently returns without any feedback
  • Impact: Player clicks "Start Practicing", nothing happens, no explanation why
  • Fix: Add UI feedback (e.g., change button text to "At Limit (1/1)" or show a toast notification)

Issue C: Button disabled but no explanation

  • File: src/components/game/tabs/DisciplinesTab.tsx and DisciplineCard.tsx
  • Problem: The button is disabled when isLocked || missingSourceMana.length > 0, but the player isn't told WHY it's disabled
  • Impact: Players can't understand what they need to do to unlock the discipline

Steps to Reproduce

  1. Open Disciplines tab
  2. Try to click "Start Practicing" on any discipline
  3. Button is either grayed out with no explanation, or clicks with no effect
  4. For disciplines requiring signed_pacts: permanently locked even after signing pacts

Technical Details

  • canProceedDiscipline() in discipline-math.ts (lines 70-88) - checks mana drain but has flawed prerequisite logic
  • checkDisciplinePrerequisites() in discipline-math.ts (lines 124-161) - signed_pact check is hardcoded to fail
  • activate() in discipline-slice.ts (lines 73-90) - silent failure at concurrent limit
  • Default concurrentLimit starts at 1 and expands by 1 per 500 total XP (max 4) per AGENTS.md

Priority

CRITICAL - Blocks discipline progression system entirely

**CRITICAL BUG: Disciplines system is effectively non-functional** ### Bug Summary Multiple issues prevent players from practicing disciplines, blocking a core progression system. ### Issues Found **Issue A: `signed_pact` prerequisite always fails (permanently locked)** - **File:** `src/lib/game/utils/discipline-math.ts`, lines 136-139 - **Problem:** The `signed_pact` prerequisite check ALWAYS reports as missing, unconditionally pushing to `missingPrereqs` without checking whether the player has actually signed pacts - **Impact:** Any discipline requiring `signed_pact` is permanently shown as locked in the UI - **Fix:** Check `gameState?.signedPacts` length > 0 before marking as missing **Issue B: Concurrent limit silently blocks activation** - **File:** `src/lib/game/stores/discipline-slice.ts`, lines 85-86 - **Problem:** When the player reaches their concurrent discipline limit (default: 1), calling `activate()` silently returns without any feedback - **Impact:** Player clicks "Start Practicing", nothing happens, no explanation why - **Fix:** Add UI feedback (e.g., change button text to "At Limit (1/1)" or show a toast notification) **Issue C: Button disabled but no explanation** - **File:** `src/components/game/tabs/DisciplinesTab.tsx` and `DisciplineCard.tsx` - **Problem:** The button is disabled when `isLocked || missingSourceMana.length > 0`, but the player isn't told WHY it's disabled - **Impact:** Players can't understand what they need to do to unlock the discipline ### Steps to Reproduce 1. Open Disciplines tab 2. Try to click "Start Practicing" on any discipline 3. Button is either grayed out with no explanation, or clicks with no effect 4. For disciplines requiring signed_pacts: permanently locked even after signing pacts ### Technical Details - `canProceedDiscipline()` in `discipline-math.ts` (lines 70-88) - checks mana drain but has flawed prerequisite logic - `checkDisciplinePrerequisites()` in `discipline-math.ts` (lines 124-161) - `signed_pact` check is hardcoded to fail - `activate()` in `discipline-slice.ts` (lines 73-90) - silent failure at concurrent limit - Default `concurrentLimit` starts at 1 and expands by 1 per 500 total XP (max 4) per AGENTS.md ### Priority CRITICAL - Blocks discipline progression system entirely
Anexim added the ai:todo label 2026-05-29 13:05:06 +02:00
n8n-gitea was assigned by Anexim 2026-05-29 13:05:06 +02:00
Author
Owner

Starting investigation of discipline practice bugs: signed_pact prerequisite always failing, concurrent limit silent failure, and missing UI feedback.

Starting investigation of discipline practice bugs: signed_pact prerequisite always failing, concurrent limit silent failure, and missing UI feedback.
Author
Owner

Fixed three discipline bugs:

A) signed_pact prerequisite: Updated checkDisciplinePrerequisites() to accept a signedPacts parameter and only report 'Signed guardian pact' as missing when the player hasn't actually signed any pacts. Updated all call sites (discipline-slice.ts activate() and DisciplinesTab CardWrapper) to pass signedPacts.

B) Concurrent limit feedback: The activate() function still silently returns at the limit (by design, to prevent invalid state), but the DisciplineCard now shows "At Limit (N/M)" button text when the concurrent discipline limit is reached, giving players clear feedback.

C) Button disabled explanation: DisciplineCard now shows separate messages for lock reasons (prerequisites, missing mana) and concurrent limit status, so players understand why the button is disabled.

Fixed three discipline bugs: A) signed_pact prerequisite: Updated checkDisciplinePrerequisites() to accept a signedPacts parameter and only report 'Signed guardian pact' as missing when the player hasn't actually signed any pacts. Updated all call sites (discipline-slice.ts activate() and DisciplinesTab CardWrapper) to pass signedPacts. B) Concurrent limit feedback: The activate() function still silently returns at the limit (by design, to prevent invalid state), but the DisciplineCard now shows "At Limit (N/M)" button text when the concurrent discipline limit is reached, giving players clear feedback. C) Button disabled explanation: DisciplineCard now shows separate messages for lock reasons (prerequisites, missing mana) and concurrent limit status, so players understand why the button is disabled.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#194