feat: add Export/Import character as JSON (Closes #29) #72

Merged
shahondin1624 merged 1 commits from feature/issue-29-export-import-json into main 2026-03-13 14:15:11 +01:00

Summary

  • Add ExportCharacterDialog showing serialized JSON in a scrollable monospace text area for copy
  • Add ImportCharacterDialog with a paste text field, JSON validation via DataLoader.deserialize(), and error display for invalid input
  • Extend SettingsPage with "Character Data" section containing Export and Import buttons
  • Wire App.kt to pass current character and import callback to SettingsPage

Test plan

  • Project compiles on all targets
  • 77 tests, 18 pre-existing Compose UI failures unchanged
  • Export button shows dialog with serialized character JSON
  • Import button shows dialog for pasting JSON; invalid JSON shows error message
  • Successful import updates the character via CharacterViewModel.setCharacter()

Closes #29

## Summary - Add ExportCharacterDialog showing serialized JSON in a scrollable monospace text area for copy - Add ImportCharacterDialog with a paste text field, JSON validation via DataLoader.deserialize(), and error display for invalid input - Extend SettingsPage with "Character Data" section containing Export and Import buttons - Wire App.kt to pass current character and import callback to SettingsPage ## Test plan - [x] Project compiles on all targets - [x] 77 tests, 18 pre-existing Compose UI failures unchanged - [x] Export button shows dialog with serialized character JSON - [x] Import button shows dialog for pasting JSON; invalid JSON shows error message - [x] Successful import updates the character via CharacterViewModel.setCharacter() Closes #29
shahondin1624 added 1 commit 2026-03-13 14:15:06 +01:00
Export serializes the current character via DataLoader.serialize() and
shows it in a scrollable monospace text dialog. Import accepts pasted
JSON, validates via DataLoader.deserialize(), and shows an error message
for invalid input. Both dialogs are accessible from the Settings page
and work on all platforms without platform-specific file I/O.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
shahondin1624 merged commit 8f6d30dd69 into main 2026-03-13 14:15:11 +01:00
shahondin1624 deleted branch feature/issue-29-export-import-json 2026-03-13 14:15:11 +01:00
Sign in to join this conversation.