BUG: Duplicate "Climb the Spire" buttons cause strict mode violation and confusing UX #211
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
There are two identical "Climb the Spire" buttons rendered simultaneously in the UI:
LeftPanel.tsx(always visible when not in spire mode)SpireSummaryTab.tsx(visible when the Spire tab is active)This causes a Playwright strict mode violation ("resolved to 2 elements") and creates confusing UX where the same action can be triggered from two different places.
Root Cause
src/app/components/LeftPanel.tsxlines 83-92: Renders a "Climb the Spire" button withonClick={enterSpireMode}when!spireModesrc/components/game/tabs/SpireSummaryTab.tsxlines 371-374: Also renders a "Climb the Spire" button withonClick={enterSpireMode}Since the LeftPanel is always visible and the Spire tab can be active simultaneously, both buttons appear at the same time.
Reproduction
strict mode violation: getByRole('button', { name: /climb/i }) resolved to 2 elementsExpected Behavior
Only one "Climb the Spire" button should be visible at a time.
Suggested Fix
Either:
LeftPanel.tsx(keep only in SpireSummaryTab), ORSpireSummaryTab.tsx(keep only in LeftPanel), ORSeverity
Medium - Not game-breaking, but causes test failures and confusing UI.
Playwright Evidence
Playwright Test Ref
The failing test
e2e/playtest.spec.ts→3 - Spire / Climbing → KNOWN BUG #209caught this. The test was looking for a single "Climb the Spire" button but found 2 due to strict mode violation.After the duplicate button is fixed, the test should be updated to use
.first()or target the specific button by its parent context (LeftPanel vs SpireSummaryTab).✅ Fix Applied
Removed the duplicate "Climb the Spire" button from
SpireSummaryTab.tsx. The button inLeftPanel.tsxremains as the single entry point to the Spire.Also cleaned up the now-unused
ButtonandMountainimports fromSpireSummaryTab.tsx.This resolves the Playwright strict mode violation where
getByRole('button', { name: /climb/i })was resolving to 2 elements.Build: ✅ passing
Fixed — removed duplicate Climb the Spire button from SpireSummaryTab. Only the LeftPanel button remains.