feat(import): add Ampersand importer#41
Merged
Merged
Conversation
The backend already exposes the Ampersand import source (preview at /v1/import/ampersand/preview, submit via the unified /v1/imports/file runner with source "ampersand_file"), so this is the Android client for it, cloned from the PluralSpace importer. Ampersand's preview reports category counts only (no per-member list), so there is no selective-member UI: every real member is imported (member_ids stays null). The options mirror the server's AmpersandImportOptions (conflict_strategy=skip plus the ten content toggles), each defaulted on only when the export actually contains that kind of content. Groups imports Ampersand systems as Sheaf groups; the board-messages toggle also gates polls. Reuses the shared import machinery: streaming file upload, the latched idempotency key so a poll-failure retry resumes the same job, terminalResult() for the generic counts render, and the standard poll loop. Wired into Settings > Data (card + route) alongside the other importers.
SiteRelEnby
enabled auto-merge
July 15, 2026 04:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an "Import from Ampersand" flow, cloned from the PluralSpace importer. The backend already exposes the
source, so this is purely the Android client.
Backend contract (already live in
sheaf)POST /v1/import/ampersand/preview(multipart, partfile) ->AmpersandPreviewSummary(category counts +
limit_warnings; no per-member list).POST /v1/imports/filewithsource="ampersand_file",idempotency_key, and anoptionsJSON (AmpersandImportOptions). Same runner shape as PluralSpace / Prism / Tupperbox..jsonexport (images inline as base64 data URIs, hence the server`s 100MB cap).Android side
AmpersandPreviewSummarymodel +ImportJobSource.AMPERSAND_FILE, and apreviewAmpersandImportendpoint.
createFileImport/getImportJobare reused unchanged.AmpersandImportViewModel+AmpersandImportScreenunderui/ampersandimport/.(
member_idsstays null). The ten content toggles mirror the servers options (custom_fronts,custom_fields,tags,groups,front_history,journals,notes,board_messages,reminders,images), each shown only when the export has that content and defaulted on accordingly.groups` imports Ampersand systems as Sheaf groups; the board-messages toggle also gates polls (the servercouples them), which the label makes explicit.
terminalResult()for the generic counts render, standard poll loop.The options JSON is hand-built to match the server
sextra="forbid"model exactly (field names verified againstschemas/ampersand_import.py`).Verification
:app:assemblePlayRelease :app:testPlayReleaseUnitTestgreen..jsonexportIntended to land before v1.2.3.