🔴 DisciplinesTab: activeAttunement property missing from store #53

Closed
opened 2026-05-18 17:06:37 +02:00 by Anexim · 2 comments
Owner

File: src/components/game/tabs/DisciplinesTab.tsx, line 194

.getState().activeAttunement === tab.label.toLowerCase();

The DisciplineStoreState interface in src/lib/game/stores/discipline-slice.ts has no activeAttunement property. It only has: disciplines, activeIds, concurrentLimit, totalXP.

Impact: activeAttunement is always undefined, so the tab highlight/switching logic never matches. The attunement tab bar is non-functional — clicking tabs only logs to console and never switches content.

Fix: Either add an activeAttunement property to the store with an action to switch it, or implement tab state locally in the component with useState.

**File:** `src/components/game/tabs/DisciplinesTab.tsx`, line 194 ```ts .getState().activeAttunement === tab.label.toLowerCase(); ``` The `DisciplineStoreState` interface in `src/lib/game/stores/discipline-slice.ts` has **no `activeAttunement` property**. It only has: `disciplines`, `activeIds`, `concurrentLimit`, `totalXP`. **Impact:** `activeAttunement` is always `undefined`, so the tab highlight/switching logic never matches. The attunement tab bar is non-functional — clicking tabs only logs to console and never switches content. **Fix:** Either add an `activeAttunement` property to the store with an action to switch it, or implement tab state locally in the component with `useState`.
Anexim added the ai:todo label 2026-05-18 17:06:37 +02:00
n8n-gitea was assigned by Anexim 2026-05-18 17:06:37 +02:00
Author
Owner

[priority: 5] CRASH/BLOCKER — activeAttunement property missing from store, breaks DisciplinesTab.

[priority: 5] CRASH/BLOCKER — activeAttunement property missing from store, breaks DisciplinesTab.
Author
Owner

Fixed: Replaced store activeAttunement access with local useState('base') in DisciplinesTab. Tab switching now works via setActiveAttunement(tab.key) and only the active tab's disciplines are rendered.

Fixed: Replaced store `activeAttunement` access with local `useState('base')` in DisciplinesTab. Tab switching now works via `setActiveAttunement(tab.key)` and only the active tab's disciplines are rendered.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#53