feat: add app linking, export/import, and pre-release support#331
feat: add app linking, export/import, and pre-release support#331rainxchzed merged 1 commit intomainfrom
Conversation
- Implement "Link app to repo" feature to manually associate installed apps with GitHub repositories - Add export and import functionality for tracked apps via JSON files - Add a setting to include or exclude pre-releases when checking for updates - Improve version comparison logic to support semantic versioning and prevent false downgrade notifications - Add uninstall confirmation dialogs to prevent accidental app removals - Update `PackageMonitor` and `AppsRepository` to support fetching all installed device apps - Enhance `ShareManager` with file picking and sharing capabilities across Android and Desktop platforms - Update UI with new action buttons, bottom sheets, and toggle cards for the new features
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (37)
WalkthroughThis pull request introduces support for linking device apps to GitHub repositories, exporting and importing tracked apps as JSON, filtering pre-releases based on user preference, and uninstall confirmation dialogs. It adds new domain models, extends repository APIs, implements file-sharing utilities on Android and desktop, introduces a bottom-sheet UI for app linking with device app discovery, and integrates pre-release filtering throughout the apps and profile features. Changes
Sequence DiagramssequenceDiagram
actor User
participant UI as Apps UI
participant ViewModel as AppsViewModel
participant Repo as AppsRepository
participant Monitor as PackageMonitor
participant Device as Device<br/>(OS)
User->>UI: Click "Add by Link"
UI->>ViewModel: OnAddByLinkClick
ViewModel->>Monitor: getAllInstalledApps()
Monitor->>Device: Query installed packages
Device-->>Monitor: Package list
Monitor-->>ViewModel: List<DeviceApp>
ViewModel-->>UI: Update deviceApps state
UI->>User: Show device app picker
User->>UI: Select device app & enter repo URL
UI->>ViewModel: OnValidateAndLinkRepo
ViewModel->>Repo: fetchRepoInfo(owner, repo)
Repo->>Device: HTTP request to GitHub API
Device-->>Repo: Repo data + latest release
Repo-->>ViewModel: GithubRepoInfo
ViewModel->>ViewModel: Validate repo success
ViewModel->>Repo: linkAppToRepo(deviceApp, repoInfo)
Repo->>Repo: Persist InstalledApp entry
ViewModel-->>UI: AppLinkedSuccessfully event
UI->>User: Show success snackbar
sequenceDiagram
actor User
participant UI as Apps UI
participant ViewModel as AppsViewModel
participant Repo as AppsRepository
participant Share as ShareManager
participant Device as Device<br/>(Storage)
User->>UI: Click "Export Apps"
UI->>ViewModel: OnExportApps
ViewModel->>Repo: exportApps()
Repo->>Repo: Serialize tracked apps to JSON
Repo-->>ViewModel: JSON string
ViewModel->>Share: shareFile(filename, json, "application/json")
Share->>Device: Write to cache + create FileProvider URI
Device-->>Share: File ready
Share->>Device: Launch share chooser
Device->>User: Share intent dialog
User->>Device: Select destination
Device-->>Share: File shared
sequenceDiagram
actor User
participant UI as Apps UI
participant ViewModel as AppsViewModel
participant Share as ShareManager
participant Repo as AppsRepository
participant Device as Device<br/>(Storage)
User->>UI: Click "Import Apps"
UI->>ViewModel: OnImportApps
ViewModel->>Share: pickFile("application/json", callback)
Share->>Device: Open file picker
Device->>User: File browser
User->>Device: Select JSON file
Device-->>Share: File URI + content
Share-->>ViewModel: JSON string via callback
ViewModel->>Repo: importApps(jsonString)
Repo->>Repo: Parse JSON, filter tracked, fetch repo info
Repo-->>ViewModel: ImportResult (imported, skipped, failed)
ViewModel-->>UI: ImportComplete event
UI->>User: Show import summary
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
PackageMonitorandAppsRepositoryto support fetching all installed device appsShareManagerwith file picking and sharing capabilities across Android and Desktop platformsSummary by CodeRabbit
Release Notes
New Features
Improvements