Skip to content

WIP: Next Prof Release Candidate#779

Draft
prathieshna wants to merge 273 commits intonextfrom
NEXT-WITHOUT-STORACHA
Draft

WIP: Next Prof Release Candidate#779
prathieshna wants to merge 273 commits intonextfrom
NEXT-WITHOUT-STORACHA

Conversation

@prathieshna
Copy link
Copy Markdown

•⁠ ⁠Bug Fixes Reported by QA
•⁠ ⁠⁠Security Fixes based on the document
•⁠ ⁠⁠Storacha Removed
•⁠ ⁠⁠C2PA chnages with additional data similar to Proofmode Legacy
•⁠ ⁠⁠TOR - cTOR based

Prathieshna Vekneswaran and others added 30 commits August 28, 2025 15:13
# Conflicts:
#	app/src/main/java/net/opendasharchive/openarchive/features/settings/SpaceSetupFragment.kt
#	app/src/main/res/navigation/space_setup_navigation.xml
#	gradle/libs.versions.toml
# Conflicts:
#	gradle/libs.versions.toml
corrected version name for core-ktx in libs.versions.toml
- Refactored `StorachaAccountDetailsFragment` to display detailed plan information (name, storage limit, cost) and a sortable list of spaces with their usage.
- Added loading indicators with appropriate messages to `StorachaAccountDetailsFragment` and `StorachaViewAccountsFragment`.
- Implemented retry logic with token regeneration in `BridgeUploader` for `store/add`, `upload/add`, and S3 uploads to handle token expirations and temporary network issues.
- Improved error handling in `StorachaMediaFragment` to show user-friendly dialogs for upload failures, with an option to retry the last failed upload.
- Added `PlanInfo.kt` model to manage and format storage plan details.
- Introduced `SpacesUsageAdapter.kt` to display and sort space usage in `StorachaAccountDetailsFragment`.
- Updated layouts and string resources to support these changes.
storacha: adjust grid item layout
Added `SwipeRefreshLayout` to `StorachaMediaFragment` and `StorachaBrowseSpacesFragment`.
Updated `StorachaMediaViewModel` to support refreshing media list from the start.
Modified loading indicators to avoid dual display during pull-to-refresh.
Prathieshna Vekneswaran and others added 18 commits March 23, 2026 13:36
…tead of name

- Update `SpaceSetupViewModel` to check for existing Internet Archive spaces using `VaultType` instead of a hardcoded string.
- Set the vault name in `InternetArchiveAuthenticator` using the `friendlyName` property from `VaultType.INTERNET_ARCHIVE`.
…rchiveDetailsScreen

Call `onAction(InternetArchiveDetailsAction.ShowRemoveSpaceDialog)` when the remove space button is clicked.
…t is zero

Disable the Select Media dropdown menu item when the total media count is zero.
…aults

- Replace `TextFieldDefaults` with `OutlinedTextFieldDefaults` for the folder name input.
- Set `focusedBorderColor` and `unfocusedBorderColor` to `Color.Transparent` to hide the text field borders.
…nd update branding to use Filecoin logos and terminology.

- Implement `StorachaWarningDialog` with a 10-second countdown and a confirmation checkbox to inform users about public data risks on decentralized networks.
- Update `SpaceSetupScreen` and `SpaceSetupViewModel` to track and persist the warning acceptance state using `Prefs`.
- Replace Storacha branding and icons with Filecoin-specific logos (`filecoin_fil_logo.xml`, `filecoin.png`) and updated blue tinting.
- Update strings to reflect Filecoin branding and provide detailed privacy disclaimers.
- Hide `didKey` field in `StorachaBrowseSpacesAdapter` to simplify the UI.
- Update `SpaceSetupScreen` to use Filecoin branding, including a new icon and updated titles/subtitles.
- Adjust header height in `fragment_storacha_client_qr.xml` to `wrap_content`.
- Update strings to reflect Filecoin branding and clarify storage options in onboarding hints.
- Refine disclaimer and warning messages regarding decentralized storage/CID accessibility.
In app/build.gradle.kts:
- Increment versionCode to 30029
- Update versionName to 4.0.6
…, and improve file cleanup

- Upgrade Room dependencies to androidx.room3 across the project.
- Add thumbnail support to Evidence and improve media representation in UI.
- Enhance file cleanup logic by separating uploaded media artifact deletion.
- Update database schema version and related migration scripts.
refactor(database): migrate to androidx.room3, add thumbnail handling…
…tercept camera results in PreviewMedia

- **SetupLicenseScreen.kt**: Add `BackHandler` to disable the back button when `spaceType` is `INTERNET_ARCHIVE`.
- **PreviewMediaViewModel.kt**: Expose the internal `navigator` to support content picker launchers.
- **PreviewMediaScreen.kt**:
    - Implement `ResultEffect` to intercept `CAMERA_CAPTURE_RESULT`, preventing parent screens from re-navigating.
    - Handle camera capture imports (archive lookup and evidence creation) within a coroutine scope using `ProjectRepository` and `MediaRepository`.
- **build.gradle.kts**: Remove the Koin compiler plugin and annotations dependency, as the project uses DSL-based modules and the plugin caused incremental build errors.
- Replace the separate add icon and spacer with a text-based "+" prefix.
- Update button colors to use MaterialTheme tertiary scheme.
- Apply titleMedium typography with SemiBold weight and 18sp font size.
- Refine padding and remove hardcoded text color in favor of theme content color.
- Add `BackHandler` to close the navigation drawer if it is open.
- Add `BackHandler` to navigate from the settings tab back to the media tab.
*   **UI/UX**: Refactor `MainMediaViewModel` to handle evidence status transitions more robustly, ensuring `UPLOADED` status takes precedence over transient progress updates.
*   **Architecture**: Hoist `UploadManagerViewModel` in `HomeScreen` to prevent its lifecycle from being tied to the visibility of the upload manager bottom sheet, preventing unnecessary re-initialization and flow cancellations.
*   **Reactivity**: Implement `InvalidationBus` in `EvidenceRepositoryImpl` to trigger reactive UI updates across the app whenever media or collections are modified.
*   **Upload Manager**: Update `UploadManagerViewModel` to reactively observe the upload queue via `InvalidationBus` instead of relying solely on manual refreshes or event-based removals.
*   **Upload Service**: Add logic to `UploadService` to skip items in an `ERROR` state during processing to prevent infinite retry loops.
*   **Stability**: Add null safety checks and explicit error handling for input streams in `RequestBodyUtil`.
- Enhanced `MetadataCollector` to capture comprehensive device, location, and network metadata, mirroring the ProofMode v1.0.25 schema.
- Added collection of altitude, accuracy, bearing, speed, provider, and timestamp to location data.
- Implemented network status and IP address detection (IPv4/IPv6).
- Added cellular tower information collection (supporting GSM, LTE, WCDMA, and NR/5G) via `READ_PHONE_STATE` permission.
- Updated `MediaPicker` to write extended EXIF tags (GPS metadata, device info, software version) to image files before hashing.
- Improved C2PA manifest generation to include the full proof metadata map for interoperability.
- Updated settings to request both `ACCESS_FINE_LOCATION` and `READ_PHONE_STATE` permissions when enabling provenance features.
- Refined MIME type detection fallback logic for imported media.
- Completely remove all Storacha (Filecoin) service code, including fragments, view models, network services, and data models.
- Delete associated UI resources, such as layouts, drawables, and navigation graphs.
- Remove Storacha-related strings and configuration entries.
- Update repository interfaces, database mappers, and domain models to remove Storacha support.
- Clean up the space setup flow and main navigation drawer to exclude Storacha options.
- Remove Storacha dependency injection module and network security configurations.
Cherry-picked from NEXT-FDROID-C2PA-TOR-STORACHA-DWEB-COMPOSE-SECURITY-FIXES:

- Security Hardening: C2paKeyStore + VaultCredentialStore for AES-GCM
  encrypted credential storage via Android Keystore; lazy migration of
  legacy plaintext passwords in SugarSpaceRepository; disabled
  android:allowBackup; restricted ACTION_SEND MIME types.
- Passcode & Navigation: PasscodeGate integrated into HomeActivity to
  hold shared URIs until authenticated; PasscodeEntryRoute added as
  global lock screen; verification-only mode in PasscodeEntryActivity.
- Storage & Maintenance: CacheCleanupWorker (7-day / 100MB prune);
  temp media storage moved to filesDir/media_temp; ShareUtils updated
  to filesDir/share_images.
- Storacha-specific changes excluded (StorachaMediaFragment, named
  storacha_okhttp client).
@prathieshna prathieshna changed the title Next Prof Release Candidate WIP: Next Prof Release Candidate Apr 2, 2026
@prathieshna prathieshna marked this pull request as draft April 2, 2026 11:06
Copy link
Copy Markdown

@github-advanced-security github-advanced-security AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

detekt found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@prathieshna prathieshna requested a review from Elelan April 2, 2026 11:11
@prathieshna prathieshna self-assigned this Apr 2, 2026
@prathieshna prathieshna added the Needs QA Should be done now, please test! label Apr 2, 2026
Prathieshna Vekneswaran and others added 6 commits April 3, 2026 11:42
- Change `PasscodeGate` registration from Activity lifecycle to `ProcessLifecycleOwner` to prevent accidental locking during Activity transitions.
- Update `to_get_started_more_hint` string to remove Filecoin reference and simplify wording.
- Customize `Switch` colors in `C2paScreen` to use white thumbs and tertiary track colors when enabled.
…service handling

- Handle `ForegroundServiceStartNotAllowedException` on Android 12+ by deferring Tor service startup until the app enters the foreground.
- Implement a workaround for a bug in `tor-android` 0.4.9.5.1 where the library fails to subscribe to `NOTICE` events, preventing "Bootstrapped 100%" status broadcasts.
- Update `TorForegroundService` to manually subscribe to `NOTICE` events and verify bootstrap status via the control port.
- Modify `SnowbirdService` to wait for Tor to reach a ready state before initializing the Rust bridge to prevent resource contention and connection failures.
- Adjust `HomeActivity` startup sequence to ensure `SnowbirdService` starts after intent handling.
- Add `strings.xml` for Central Kurdish (ckb) localization.
- Fix logic in `SettingsScreen.kt` to prevent premature passcode state updates before setup completion.
- Implement a two-step project picker bottom sheet for media imported via the Android share-sheet, allowing users to select a specific server and folder for the upload.
- Introduce `SharedImportState` to manage pending URIs across the import lifecycle.
- Refactor `HomeActivity` to handle intent-based imports using an explicit list of supported MIME types instead of wildcards.
- Update `HomeViewModel` and `HomeState` to support the new shared import workflow and UI states.
- Set `HomeActivity` to `singleTask` launch mode for better intent handling.
- Ensure `ResultEventBus` creates channels eagerly to prevent missed events.
- Add debug logging for the share-sheet import process.
**Core & Repository**
- Added `updatePriorities` to `MediaRepository` and implementations to allow batch updating of media queue priorities.
- Fixed a bug in `HomeActivity` where shared media was re-imported on configuration changes by checking `savedInstanceState`.
- Improved file name resolution in `MediaPicker` to handle URIs without display names.

**Feature Improvements**
- **Home:** Added a snackbar warning if a user attempts to add media without an active folder. Enabled auto-scrolling to the top when refreshing media.
- **Media Review:** Added a "Done" action button to the top bar for saving and finishing. Improved layout handling by adding `imePadding` and using fixed height ratios for previews to prevent keyboard overlap.
- **UI/UX:** Added title overlays to media thumbnails in the main grid. Refined typography and spacing across `FoldersScreen`, `FolderDetailScreen`, and `MainMediaScreen`.
- **Upload Manager:** Optimized reordering performance using batch priority updates and improved drag-handle touch targets.

**Services & Integration**
- **Internet Archive:** Modified `IaConduit` to handle `file://` URIs directly, bypassing `ContentResolver` for local files. Made metadata and C2PA manifest uploads non-fatal.
- **WebDAV:** Wrapped the upload process in a try-catch block for better error reporting and updated `WebDavDetailScreen` to mask passwords.
- **C2PA:** Refactored `C2paScreen` to use `HtmlText` for "Learn More" links and updated the linked URL.

**Bug Fixes & Localization**
- Fixed `HtmlText` styling where the default text color was overriding link styles.
- Added "Folder renamed" string and confirmation message.
- Adjusted UI spacing in license setup and secure field components.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs QA Should be done now, please test!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants