Skip to content

feat(setup): force explicit folder selection and warn about storage risk#33

Merged
mikebarkmin merged 2 commits intomainfrom
copilot/standard-library-path-query
Apr 28, 2026
Merged

feat(setup): force explicit folder selection and warn about storage risk#33
mikebarkmin merged 2 commits intomainfrom
copilot/standard-library-path-query

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 28, 2026

The default library path silently used getApplicationDocumentsDirectory(), which on Android and sandboxed macOS resolves to an app-private directory deleted on uninstall.

Changes

Setup wizard — forced folder selection

  • _selectedFolder starts as null; the wizard no longer pre-populates a default path
  • Advancing past step 1 without picking a folder is now blocked — shows a library_folder_required error inline under the folder row
  • _databasePath returns '' while no folder is chosen; the path preview is hidden until a folder is selected
  • Folder picker clears the error on success

Android storage warning

  • _AndroidStorageNote widget rendered only on Platform.isAndroid advises users to pick a folder in shared storage (e.g. Documents) so data survives reinstall

Translations (en + de)

Key Purpose
no_folder_selected Italic placeholder when folder not yet chosen
library_folder_required Inline validation error
library_storage_warning_android Android shared-storage advisory

README

Added Data storage section with a per-platform table of safe library locations and a note recommending auto-export backups.

Copilot AI and others added 2 commits April 28, 2026 07:21
…droid

- Remove pre-populated default folder from setup wizard; user must
  explicitly pick a folder before they can proceed to the next step
- Add _folderError state and folder-required validation in _onNext
- Show italic "No folder chosen" placeholder when no folder selected
- Clear _folderError when a folder is picked
- Show error text (library_folder_required) under folder row on failed advance
- Add _AndroidStorageNote widget shown only on Android, advising to pick
  shared storage (e.g. Documents) so data survives app reinstall
- Return empty string from _databasePath when folder is null; only
  render the path preview when a folder has been chosen
- Add translation keys: library_folder_required, library_storage_warning_android,
  no_folder_selected (en + de)
- Update README with Data storage section explaining per-platform safe locations

Agent-Logs-Url: https://github.com/openpatch/classi/sessions/cca00b9d-d7c1-4e10-83aa-1bf9d510408d

Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
@mikebarkmin
Copy link
Copy Markdown
Member

/build android

@github-actions
Copy link
Copy Markdown

📦 Android build ready

Download APK

@mikebarkmin mikebarkmin merged commit 359ed30 into main Apr 28, 2026
1 check passed
@mikebarkmin mikebarkmin deleted the copilot/standard-library-path-query branch April 28, 2026 07:39
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.

2 participants