Skip to content

feat: add Clear button to Settings alongside Randomize#96

Merged
samdaw13 merged 1 commit intomainfrom
feature/clear-settings-button
Mar 6, 2026
Merged

feat: add Clear button to Settings alongside Randomize#96
samdaw13 merged 1 commit intomainfrom
feature/clear-settings-button

Conversation

@samdaw13
Copy link
Copy Markdown
Owner

@samdaw13 samdaw13 commented Mar 6, 2026

Summary

  • Adds a Clear button to the Enigma machine Settings screen, placed on the same row as the existing Randomize button
  • Pressing Clear resets all rotor selections and plugboard cables to defaults
  • Both buttons share equal width via flex: 1 in a buttonRow layout
  • Adds CLEAR_SETTINGS label and CLEAR_BUTTON testID constants
  • Adds a test verifying the Clear button resets rotor state

Test plan

  • Press Clear — all three rotor slots are deselected and plugboard cables are removed
  • Press Randomize — rotors and plugboard are populated with random values (existing behaviour unchanged)
  • Encrypt a message button remains disabled after pressing Clear (no rotors selected)
  • Both buttons display side-by-side at equal width on the Settings screen
  • npm test passes
  • npm run lint passes

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@samdaw13 samdaw13 enabled auto-merge March 6, 2026 21:51
@samdaw13 samdaw13 merged commit 12924d9 into main Mar 6, 2026
2 checks passed
@samdaw13 samdaw13 deleted the feature/clear-settings-button branch March 6, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant