Code review fixes:
- Remove duplicate KeyConnectorUrl branch in InitUserCryptoMethodExtensions
- Fix CollectionManagerTest createCollection calls to include organizationUserId
- Prevent vault sync from overwriting user's in-progress edits in
CollectionAddEditViewModel (early return if already in Content state)
- Add per-collection canManage permission check before allowing edit
navigation, based on collection manage flag and org role
- Gitignore .claude/outputs/ to exclude plan documents from commits
New tests:
- CollectionsViewModelTest: 11 tests covering navigation, state updates,
FAB visibility based on permissions, snackbar relay, and error states
- CollectionAddEditViewModelTest: 20 tests covering create/edit/delete
flows, name validation, dialog states, snackbar relay, and the sync
overwrite protection fix
Updated test fixtures:
- SyncResponseProfileUtil: add organizationUserId, limitCollectionCreation,
limitCollectionDeletion fields
- Add organizationUserId to SyncResponseJson and Organization domain
model to identify the current user's org membership ID
- Include creating user with manage access in collection create request,
matching web client behavior
- Add limitCollectionCreation/limitCollectionDeletion to org model
- Fix FAB visibility: use canManageCollections computed property that
checks role (Owner/Admin) in addition to permissions flags, matching
web client logic: !limitCollectionCreation || isAdmin || permissions
The PUT endpoint for updating a collection requires groups and users
access permissions in the request body. Previously only the encrypted
name was sent, causing the server to reject the request with "At least
one member or group must have can manage permission."
The update flow now fetches collection details via the new /details
endpoint before sending the PUT request, echoing back existing groups,
users, and externalId. Also fixes collection edit screen passing
organizationName instead of organizationId and resolves compile errors
from new parameters across tests.
Add vaultUrl parameter to SsoCookieVendorConfig and handle new
KeyConnectorUrl variant in InitUserCryptoMethod when expressions.
These changes are required for compatibility with the latest
sdk-internal build used for local collection encryption testing.
Remove the UnsupportedOperationException stub and delegate to the
actual SDK collections().encrypt() method. Requires SDK version with
collection encryption support (not yet in published 2.0.0-5451).
Add full CRUD support for managing collections on Android, accessible
via Settings > Vault > Collections. Collections are organization-scoped
vault items available on paid plans.
Changes include:
- Network layer: CollectionsApi, CollectionService, request/response models
- Data layer: CollectionManager with encrypt > API > disk > decrypt flow
- Permission model: expanded SyncResponseJson.Permissions and Organization
with collection-specific permission fields
- UI: CollectionsScreen (list with org subtitles, permission-gated FAB),
CollectionAddEditScreen (name field, save, delete with confirmation)
- Navigation: type-safe routes wired through VaultSettings entry point
- VaultDiskSource.deleteCollection and VaultSdkSource.encryptCollection stub
Note: encryptCollection is stubbed pending SDK release (SDK changes are
implemented but not yet published). Create/update will fail at runtime
until the SDK is updated.