[priority: medium] Add DebugName wrappers to remaining 56 components missing Show Component Names support #183

Closed
opened 2026-05-28 12:47:19 +02:00 by Anexim · 2 comments
Owner

Description

Following the fix for DisciplinesTab (issue #178), a full audit reveals the DebugName "Show Component Names" debug flag is inconsistently implemented across the codebase. Many top-level tab files, sub-tabs, section components, and standalone UI components are missing the DebugName wrapper.

The pattern is simple and well-defined — see debug-context.tsx for the component, and CraftingTab.tsx as a reference implementation:

import { DebugName } from '@/components/game/debug/debug-context';

// In the return:
return (
  <DebugName name="ComponentName">
    <div>...</div>
  </DebugName>
);

Scope

Already fixed (10 tabs + 2 app files)

  • AchievementsTab.tsx, AttunementsTab.tsx, CraftingTab.tsx, DebugTab.tsx, DisciplinesTab.tsx, EquipmentTab.tsx, GolemancyTab.tsx, GuardianPactsTab.tsx, PrestigeTab.tsx, SpireSummaryTab.tsx
  • app/components/LeftPanel.tsx, app/components/GrimoireTab.tsx

Top-level tab files missing (4 files)

  1. src/components/game/tabs/ActivityLog.tsx
  2. src/components/game/tabs/SpellsTab.tsx
  3. src/components/game/tabs/StatsTab.tsx
  4. src/components/game/tabs/guardian-pacts-components.tsx

Tab sub-components missing

CraftingTab/ (3 files)
5. src/components/game/tabs/CraftingTab/EnchanterSubTab.tsx
6. src/components/game/tabs/CraftingTab/FabricatorSubTab.tsx
7. src/components/game/tabs/CraftingTab/MaterialRecipeCard.tsx

DebugTab/ sections (7 files)
8. src/components/game/tabs/DebugTab/AchievementDebugSection.tsx
9. src/components/game/tabs/DebugTab/AttunementDebugSection.tsx
10. src/components/game/tabs/DebugTab/DisciplineDebugSection.tsx
11. src/components/game/tabs/DebugTab/ElementDebugSection.tsx
12. src/components/game/tabs/DebugTab/GameStateDebugSection.tsx
13. src/components/game/tabs/DebugTab/GolemDebugSection.tsx
14. src/components/game/tabs/DebugTab/PactDebugSection.tsx
15. src/components/game/tabs/DebugTab/SpireDebugSection.tsx

EquipmentTab/ (3 files)
16. src/components/game/tabs/EquipmentTab/EquipmentEffectsSummary.tsx
17. src/components/game/tabs/EquipmentTab/EquipmentSlotGrid.tsx
18. src/components/game/tabs/EquipmentTab/InventoryList.tsx

SpireCombatPage/ (6 files)
19. src/components/game/tabs/SpireCombatPage/RoomDisplay.tsx
20. src/components/game/tabs/SpireCombatPage/SpireActivityLog.tsx
21. src/components/game/tabs/SpireCombatPage/SpireCombatControls.tsx
22. src/components/game/tabs/SpireCombatPage/SpireCombatPage.tsx
23. src/components/game/tabs/SpireCombatPage/SpireHeader.tsx
24. src/components/game/tabs/SpireCombatPage/SpireManaDisplay.tsx

StatsTab/ (7 files)
25. src/components/game/tabs/StatsTab/CombatStatsSection.tsx
26. src/components/game/tabs/StatsTab/DisciplineStatsSection.tsx
27. src/components/game/tabs/StatsTab/ElementStatsSection.tsx
28. src/components/game/tabs/StatsTab/LoopStatsSection.tsx
29. src/components/game/tabs/StatsTab/ManaStatsSection.tsx
30. src/components/game/tabs/StatsTab/PactStatusSection.tsx
31. src/components/game/tabs/StatsTab/StudyStatsSection.tsx

Standalone game components missing (17 files)

  1. src/components/game/ActionButtons.tsx
  2. src/components/game/ActivityLogPanel.tsx
  3. src/components/game/AttunementStatus.tsx
  4. src/components/game/GameToast.tsx
  5. src/components/game/ManaDisplay.tsx
  6. src/components/game/TimeDisplay.tsx
  7. src/components/game/UpgradeDialog.tsx
  8. src/components/game/crafting/EnchantmentApplier.tsx
  9. src/components/game/crafting/EnchantmentDesigner.tsx
  10. src/components/game/crafting/EnchantmentPreparer.tsx
  11. src/components/game/crafting/EquipmentCrafter.tsx
  12. src/components/game/crafting/EnchantmentDesigner/DesignForm.tsx
  13. src/components/game/crafting/EnchantmentDesigner/EffectSelector.tsx
  14. src/components/game/crafting/EnchantmentDesigner/EquipmentTypeSelector.tsx
  15. src/components/game/crafting/EnchantmentDesigner/SavedDesigns.tsx
  16. src/components/game/LootInventory/BlueprintsSection.tsx
  17. src/components/game/LootInventory/EquipmentItem.tsx
  18. src/components/game/LootInventory/EssenceItem.tsx
  19. src/components/game/LootInventory/MaterialItem.tsx
  20. src/components/game/debug/AttunementDebug.tsx
  21. src/components/game/debug/ElementDebug.tsx
  22. src/components/game/debug/GameStateDebug.tsx
  23. src/components/game/debug/GolemDebug.tsx
  24. src/components/game/debug/PactDebug.tsx
  25. src/app/page.tsx

Dialog/overlay content (excluded from fix)

These are already wrapped at the page/tab level and don't need individual DebugName wrappers:

  • src/app/components/GameOverScreen.tsx (full-screen overlay)

Task

Add DebugName import and wrapper to all listed files. The wrapper name should match the component/function name (e.g., <DebugName name="EnchanterSubTab">).

Verification

  1. Enable "Show Component Names" in Debug tab
  2. Navigate to every tab and sub-tab
  3. Confirm yellow [ComponentName] labels appear on all components
  4. Run npx tsc --noEmit to confirm no regressions
## Description Following the fix for DisciplinesTab (issue #178), a full audit reveals the DebugName "Show Component Names" debug flag is inconsistently implemented across the codebase. Many top-level tab files, sub-tabs, section components, and standalone UI components are missing the `DebugName` wrapper. The pattern is simple and well-defined — see `debug-context.tsx` for the component, and `CraftingTab.tsx` as a reference implementation: ```tsx import { DebugName } from '@/components/game/debug/debug-context'; // In the return: return ( <DebugName name="ComponentName"> <div>...</div> </DebugName> ); ``` ## Scope ### ✅ Already fixed (10 tabs + 2 app files) - `AchievementsTab.tsx`, `AttunementsTab.tsx`, `CraftingTab.tsx`, `DebugTab.tsx`, `DisciplinesTab.tsx`, `EquipmentTab.tsx`, `GolemancyTab.tsx`, `GuardianPactsTab.tsx`, `PrestigeTab.tsx`, `SpireSummaryTab.tsx` - `app/components/LeftPanel.tsx`, `app/components/GrimoireTab.tsx` ### ❌ Top-level tab files missing (4 files) 1. `src/components/game/tabs/ActivityLog.tsx` 2. `src/components/game/tabs/SpellsTab.tsx` 3. `src/components/game/tabs/StatsTab.tsx` 4. `src/components/game/tabs/guardian-pacts-components.tsx` ### ❌ Tab sub-components missing **CraftingTab/** (3 files) 5. `src/components/game/tabs/CraftingTab/EnchanterSubTab.tsx` 6. `src/components/game/tabs/CraftingTab/FabricatorSubTab.tsx` 7. `src/components/game/tabs/CraftingTab/MaterialRecipeCard.tsx` **DebugTab/ sections** (7 files) 8. `src/components/game/tabs/DebugTab/AchievementDebugSection.tsx` 9. `src/components/game/tabs/DebugTab/AttunementDebugSection.tsx` 10. `src/components/game/tabs/DebugTab/DisciplineDebugSection.tsx` 11. `src/components/game/tabs/DebugTab/ElementDebugSection.tsx` 12. `src/components/game/tabs/DebugTab/GameStateDebugSection.tsx` 13. `src/components/game/tabs/DebugTab/GolemDebugSection.tsx` 14. `src/components/game/tabs/DebugTab/PactDebugSection.tsx` 15. `src/components/game/tabs/DebugTab/SpireDebugSection.tsx` **EquipmentTab/** (3 files) 16. `src/components/game/tabs/EquipmentTab/EquipmentEffectsSummary.tsx` 17. `src/components/game/tabs/EquipmentTab/EquipmentSlotGrid.tsx` 18. `src/components/game/tabs/EquipmentTab/InventoryList.tsx` **SpireCombatPage/** (6 files) 19. `src/components/game/tabs/SpireCombatPage/RoomDisplay.tsx` 20. `src/components/game/tabs/SpireCombatPage/SpireActivityLog.tsx` 21. `src/components/game/tabs/SpireCombatPage/SpireCombatControls.tsx` 22. `src/components/game/tabs/SpireCombatPage/SpireCombatPage.tsx` 23. `src/components/game/tabs/SpireCombatPage/SpireHeader.tsx` 24. `src/components/game/tabs/SpireCombatPage/SpireManaDisplay.tsx` **StatsTab/** (7 files) 25. `src/components/game/tabs/StatsTab/CombatStatsSection.tsx` 26. `src/components/game/tabs/StatsTab/DisciplineStatsSection.tsx` 27. `src/components/game/tabs/StatsTab/ElementStatsSection.tsx` 28. `src/components/game/tabs/StatsTab/LoopStatsSection.tsx` 29. `src/components/game/tabs/StatsTab/ManaStatsSection.tsx` 30. `src/components/game/tabs/StatsTab/PactStatusSection.tsx` 31. `src/components/game/tabs/StatsTab/StudyStatsSection.tsx` ### ❌ Standalone game components missing (17 files) 32. `src/components/game/ActionButtons.tsx` 33. `src/components/game/ActivityLogPanel.tsx` 34. `src/components/game/AttunementStatus.tsx` 35. `src/components/game/GameToast.tsx` 36. `src/components/game/ManaDisplay.tsx` 37. `src/components/game/TimeDisplay.tsx` 38. `src/components/game/UpgradeDialog.tsx` 39. `src/components/game/crafting/EnchantmentApplier.tsx` 40. `src/components/game/crafting/EnchantmentDesigner.tsx` 41. `src/components/game/crafting/EnchantmentPreparer.tsx` 42. `src/components/game/crafting/EquipmentCrafter.tsx` 43. `src/components/game/crafting/EnchantmentDesigner/DesignForm.tsx` 44. `src/components/game/crafting/EnchantmentDesigner/EffectSelector.tsx` 45. `src/components/game/crafting/EnchantmentDesigner/EquipmentTypeSelector.tsx` 46. `src/components/game/crafting/EnchantmentDesigner/SavedDesigns.tsx` 47. `src/components/game/LootInventory/BlueprintsSection.tsx` 48. `src/components/game/LootInventory/EquipmentItem.tsx` 49. `src/components/game/LootInventory/EssenceItem.tsx` 50. `src/components/game/LootInventory/MaterialItem.tsx` 51. `src/components/game/debug/AttunementDebug.tsx` 52. `src/components/game/debug/ElementDebug.tsx` 53. `src/components/game/debug/GameStateDebug.tsx` 54. `src/components/game/debug/GolemDebug.tsx` 55. `src/components/game/debug/PactDebug.tsx` 56. `src/app/page.tsx` ### ❌ Dialog/overlay content (excluded from fix) These are already wrapped at the page/tab level and don't need individual DebugName wrappers: - `src/app/components/GameOverScreen.tsx` (full-screen overlay) ## Task Add `DebugName` import and wrapper to all listed files. The wrapper name should match the component/function name (e.g., `<DebugName name="EnchanterSubTab">`). ## Verification 1. Enable "Show Component Names" in Debug tab 2. Navigate to every tab and sub-tab 3. Confirm yellow `[ComponentName]` labels appear on all components 4. Run `npx tsc --noEmit` to confirm no regressions
Anexim added the ai:todo label 2026-05-28 12:47:19 +02:00
n8n-gitea was assigned by Anexim 2026-05-28 12:47:19 +02:00
Author
Owner

Starting bulk DebugName wrapper additions across 56 files. Will process in parallel batches for efficiency.

Starting bulk DebugName wrapper additions across 56 files. Will process in parallel batches for efficiency.
Author
Owner

Added DebugName wrappers to all 56 remaining components. All files pass pre-commit hooks (file size, typecheck, lint). Commit pushed: 59 files changed, 779 insertions(+), 537 deletions(-).

Added DebugName wrappers to all 56 remaining components. All files pass pre-commit hooks (file size, typecheck, lint). Commit pushed: 59 files changed, 779 insertions(+), 537 deletions(-).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Anexim/Mana-Loop#183