Skip to content

[Bug]: Export page board style changes leak into the home page board #167

Description

@BilgeGates

What happened?

Changing the piece set or board colours on the Export page unintentionally updates the home page board. The two pages share the same localStorage keys, so any change on the Export page persists globally.

Steps to reproduce

  1. Open the home page — note the current piece set and board colours
  2. Navigate to the Export page via the Download button
  3. Change the piece set or square colours in the Board Style tab
  4. Return to the home page

Expected

Changes on the Export page are local to that session only. The home page board is unchanged on return.

Actual

The home page reflects the Export page choices — piece set and colours are overwritten globally.

Root cause

BoardStyleStep calls setBoardPieceSet() from useBoardPieceSet, which writes to the shared chess-piece-style localStorage key. The home page reads the same key, so it picks up the change immediately. Square colour changes have the same issue via shared localStorage keys.

Browser & OS

Any browser / OS.

Before submitting

  • I searched existing issues and this is not a duplicate.

Metadata

Metadata

Assignees

Labels

BugSomething is not working correctlyarea: exportCanvas and SVG export pipelinearea: uiShared UI components, layout, and theminghelp wantedOpen for contributions — no permission needed

Type

Fields

No fields configured for Bug.

Projects

Status
Backlog

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions