Skip to content

Latest commit

 

History

History
111 lines (84 loc) · 8.11 KB

Repository-Management-Overhaul.md

File metadata and controls

111 lines (84 loc) · 8.11 KB

Project tracking: Manage Repos overhaul

Things to do first

  • rename many classes (#318)
  • optimize all imports according to Android Studio defaults

architecture and ux considerations

UI

Add repo flow

  • use download lib, so proxy settings are respected (#1651)
  • Add QR code scanner via intent (#1863) new IntentIntegrator(this).initiateScan()
  • Don't show URL again when clicking on or scanning repo link (part of #966)
  • Show list of apps included in repo when adding, and later as well (part of #966)
  • Properly detect mirrors by fetching signer when validating URL (#1718)
  • don't add invalid repos (#598)
  • split fingerprint off into its own field right after pasting URL (#2078) (doesn't make sense in new UI)
  • don't duplicate https:// when prepending (#2523) (no more https:// in input field)
  • Strip semicolons from supplied repository fingerprint (#900) (doesn't make sense as we don't support separate fingerprint entry anymore, just create a proper link or qr code)
  • search chip to show apps in a specific repo reachable from repo details and show after adding a repo (which progress spinner while still updating) (#570)
  • add https:// in front of input, if no scheme was given
  • support adding repos behind basic auth
  • use pinned signer fingerprint in client when available (#2557)
  • Should HTTP 30x Redirects be handled in the Add Repo flow? For example, user adds https://service.tagesschau.de/app/repo, then Add Repo could fetch the new URL and present it to the user: do you want to use the new URL?

Implementation notes

Handle incoming URL:

  • deny adding repos if unknown sources is disallowed by device manager
  • check if repo URL is valid, show error if not
  • check if swap URL and if so redirect to swap workflow
  • maybe do some auto-probe on certain URLs such as bare domain name e.g. "guardianproject.info"
  • request orbot to start tor, if enabled (and needed for URL?)
  • if fingerprint is given and known, maybe check situation first before fetching repo
  • fetch extracted URL first to get info from repo such as fingerprint, icon, number of apps, anti-features etc.
  • check how using a repo from a flash drive works (just swap flow?)
  • @uniqx looking into adding Storage Access Framework flow to Manage Repos (e.g. choosing a repo hosted on Nextcloud, Google Drive, Samba, etc)

possible results:

  • could not connect to repo for whatever reason -> show error
  • given fingerprint isn't matching the one from the repo -> show error
  • new repo -> show repo info and ask user if they want to add this
  • URL is mirror of new repo (the URL that was provided is not the canonical URL of the repo, but is one of the official mirrors. It could also be that the provided URL is not an official mirror)
  • existing repo -> tell user that this repo already exists, maybe show repo details?
  • mirror of existing repo -> ask user if they want to add this repo as a mirror

Representing apps from multiple repos

  • Change database structure to be faster, better support multiple repos. (#511)
  • Properly support multiple repositories with the same app (!375)
  • Add support for multiple repos with conflicting apps/apks (#33)
  • allow user to change order of repos in the list, adjusting priorities in the DB (open/old MR !435 #1887)
  • handle conflicting mirrors/repos (#2707)

Overhaul Proposal

  • new repos are added with lower priority, so users can easily get new apps by adding repos without dealing with the hard questions
  • per-app, users are shown when the app is available in more than one repo and can decide to prioritize any repo as the selected source for that app
  • global repo priorities can be changed by dragging repos in the repository list in case a user prefers many apps from one repo over another
  • per-app selection takes precedence over global repo priorities
  • selected repo determines all metadata including compatibility, version availability and Anti-Features for app listings
  • app details only shows version from selected repo
  • new install takes suggested version only from selected repo
  • app updates are only considered from selected repo
  • bonus feature: show that updates are available in a different repo and allow one-time update from a non-selected repo (currently visible in Versions listing on App Details?)

Test Links

Some repo links in the the newly introduced fdroid.link format.

image

Other app stores

Unrelated work

  • use localized categories from index (2544)
  • remove Guardian Project repo from default list (#2556)
  • remove "Conflicts With Active VPN!" warning, allow override (#2577)
  • Use repo_web_base_url for app sharing (#1946)
  • Bad intent: Intent { act=BonjourStatus } #2518