WIP: Storacha chnages to check if all changes in next is intact#752
Draft
prathieshna wants to merge 114 commits intonextfrom
Draft
WIP: Storacha chnages to check if all changes in next is intact#752prathieshna wants to merge 114 commits intonextfrom
prathieshna wants to merge 114 commits intonextfrom
Conversation
# Conflicts: # app/build.gradle.kts # app/src/main/java/net/opendasharchive/openarchive/SaveApp.kt # app/src/main/res/values/strings.xml # gradle/libs.versions.toml
This commit applies edge-to-edge insets to the "Add" button in `StorachaMediaFragment` and the "Continue" button in `StorachaClientQRFragment` to ensure they are displayed correctly with navigation bars. Additionally, the following dependencies were updated: - AGP to 8.12.1 - Core KTX to 1.17.0 - Kotlin to 2.2.10 - KSP to 2.2.10-2.0.2 - Material3 to 1.4.0-beta02
This commit updates `StorachaAccountDetailsFragment` to apply window insets for edge-to-edge display. Specifically, it applies bottom insets to the `buttonBar` to accommodate navigation bars.
Feature/storacha next
# 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
added 16 commits
November 25, 2025 15:32
Bringing in latest changes from next branch including: - Media list viewholder improvements for upload and preview screens - Camera screen enhancements with video recording timer - PDF thumbnail generation and display - WebDAV screen refactoring with Jetpack Compose - UI improvements for media grids in selection mode
Resolved conflicts in: - app/build.gradle.kts - app/src/main/java/net/opendasharchive/openarchive/features/media/camera/CameraConfig.kt - app/src/main/res/values/strings.xml
Cleaned up CameraConfig.kt by removing trailing commas. Added Picasso and Jsoup to the project dependencies.
Updated app version from 4.0.4 to 4.0.9 and adjusted the version code.
Escaped apostrophes in several Ukrainian translation strings to fix rendering issues. Removed a duplicated `web_dav_host_error` string and corrected a malformed CDATA tag in the Turkish translation file.
# Conflicts: # app/build.gradle.kts # app/src/main/java/net/opendasharchive/openarchive/SaveApp.kt # app/src/main/java/net/opendasharchive/openarchive/features/core/BaseFragment.kt # app/src/main/res/values-uk/strings.xml
Resolved conflicts: - Space.kt: Kept STORACHA enum entry and updated RAVEN naming - BaseFragment.kt: Kept storacha-related imports for session management - MainActivity.kt: Merged DWeb groups and Storacha checks in menu logic - SpaceSetupFragment.kt: Kept navigation approach with Storacha callback - app_nav_graph.xml: Added Storacha navigation actions only (Snowbird migrated) - strings.xml: Kept all Storacha strings and Sync Preferences - libs.versions.toml: Updated zxing library versions and naming
Refactored the Snowbird feature to launch in a separate `SnowbirdActivity` instead of a fragment within the main navigation graph. - Modified `SpaceSetupFragment` to start `SnowbirdActivity` via an intent, decoupling it from the main `NavGraph`. - Removed unused ZXing dependencies from `gradle/libs.versions.toml`.
There was a problem hiding this comment.
detekt found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
…reads - Migrated file I/O operations and CAR file generation in `StorachaMediaFragment` to coroutines using `lifecycleScope.launch` and `Dispatchers.IO`. - Improved error handling in `handleMedia` by catching specific exceptions and providing user-friendly error messages. - Updated retry logic in `retryFailedUpload` to perform file cleanup and regeneration off the main thread. - Bumped `versionCode` to 30028 and `versionName` to 4.0.5.
… Storacha uploads
Updated the Storacha upload and metadata fetching logic to better handle direct file access and preserve original filenames via UnixFS directory wrapping.
- **Enhanced Metadata Fetching:**
- Implemented a `HEAD` request check in `FileMetadataFetcher` to handle direct file URLs (non-HTML directory listings).
- Added logic to extract filenames from `Content-Disposition` headers and fallback to truncated CIDs.
- Added MIME type detection and human-readable file size formatting.
- **Upload Improvements:**
- Updated `StorachaApiService` and `BridgeUploader` to accept and send the original `fileName` to the backend.
- Modified `StorachaMediaViewModel` and `StorachaMediaFragment` to capture and pass the original filename during the upload process.
- The backend now uses the provided filename to wrap uploads in a UnixFS directory structure, improving file identification on IPFS gateways.
- **Robustness:**
- Improved CID extraction from various gateway URL formats (path-based and subdomain-based).
- Updated retry logic to persist original filenames for failed uploads.
This commit introduces significant improvements to the file upload process for better performance and user experience. It implements optimistic updates, robust retry logic, and prevents memory issues with large files.
- **Optimistic UI for Uploads:**
- New uploads now appear in the media list immediately, providing instant user feedback without waiting for server confirmation.
- A silent background sync follows to ensure data consistency without blocking the UI.
- **Robust Uploads with Retries:**
- Implemented a retry mechanism for file uploads (`uploadWithRetry`).
- The system now automatically retries uploads up to 3 times on transient network errors (`IOException`) or 5xx server errors, with exponential backoff.
- **Memory Optimization:**
- Created a dedicated `OkHttpClient` (`uploadClient`) for file transfers that omits the logging interceptor, preventing `OutOfMemoryError` when uploading large files.
- The default API client's logging level was changed from `BODY` to `HEADERS` to avoid logging large request/response bodies.
- **UI State Handling:**
- Improved loading and error state management to prevent showing an "empty" screen if a background refresh fails while cached media is available.
…r to handle a single capture
…re-fix Bugfix/storacha upload failure fix
Storacha Alert Fixes
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.
No description provided.