Skip to content

refactor: move CollectionHelper to :anki-common#21349

Draft
david-allison wants to merge 6 commits into
ankidroid:mainfrom
david-allison:collection-helper-common
Draft

refactor: move CollectionHelper to :anki-common#21349
david-allison wants to merge 6 commits into
ankidroid:mainfrom
david-allison:collection-helper-common

Conversation

@david-allison

Copy link
Copy Markdown
Member

Purpose / Description

Should be a simple migration commit once the dependency is in

Fixes

How Has This Been Tested?

Trusting lint & unit tests

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

Prep for moving CollectionHelper to :anki-common.

Collection creation will become a startup concern, but collection
 access will move to :anki-common.

* Part of 19552
* Part of 13574
* Part of 20737

Assisted-by: Claude Fable 5
Breaking change, this was previously done on first collection access.

Now this is set in AnkiDroidApp, and reading throws
StorageNotConfiguredException beforehand.

This contains a workaround for the OS-level bug: `SystemStorageException`
if the exception is caught, it is explicitly rethrown.

This is preparation for a full 'storage decision' screen during onboarding

* Part of 19552
* Part of 13574
* Part of 20737

Assisted-by: Claude Fable 5
The decision now mirrors whether `getCurrentAnkiDroidDirectory`
is usable or throws.

The path is set during startup (`ensureCollectionPathSet`),
so `Undecided` is only observable if startup storage initialization
failed.

This is now classified as an `InitializationError` and displayed in
the app startup flow (with a TODO for 19552 to improve this).

* Part of 19552
* Part of 13574

Assisted-by: Claude Fable 5
* Part of 20737

Assisted-by: Claude Opus 4.8
Assisted-by: Claude (Opus 4.8 & Fable 5)
@david-allison david-allison added the Blocked by dependency Currently blocked by some other dependent / related change label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocked by dependency Currently blocked by some other dependent / related change Has Conflicts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant