Skip to content

[MEDIA-023] Keep sync settings and Transfer Center responsive during media indexing #234

Description

@veryCrunchy

Roadmap

  • Task ID: MEDIA-023
  • Priority: P0
  • Related to: MEDIA-003, MEDIA-005, MEDIA-020

Problem

After adding an Android media-folder sync on the latest successfully published and installable nightly, media indexing can leave both Sync & offline and Transfers unresponsive. Sync & offline remains in a skeleton/loading state with Refresh disabled, while Transfers remains on "Loading media transfers...".

Newer Android nightlies failed during release lint and were not installable, so this regression is observed on the latest usable nightly artifact rather than those failed builds.

Indexing must never monopolize the UI path, hold a shared store lock across a full scan, or require either screen to await completion before showing durable state.

Acceptance criteria

  • Media indexing runs on bounded background work and does not perform filesystem, MediaStore, hashing, or full-history work on the main thread.
  • Sync & offline paints its last durable summary immediately and reports indexing progress separately without disabling navigation.
  • Transfer Center paints bounded persisted results immediately and receives incremental updates while indexing continues.
  • Readers are not blocked by a scan-wide write lock or full-ledger replacement.
  • Large folders and transfer histories use bounded paging/batching with stable identities and coalesced progress updates.
  • Cancellation, app backgrounding, activity recreation, process death, and restart leave a recoverable indexing state.
  • Focused stress tests reproduce concurrent indexing plus navigation between Sync & offline and Transfers without an ANR, unbounded recomposition, or an indefinite loading state.
  • The fix is validated on a visible Android emulator and a physical Android device using synthetic or privacy-safe test data.

Evidence

Observed behavior on the latest installable signed nightly:

  • Sync & offline remains on Folder sync skeleton rows and a loading Offline storage summary.
  • Transfers remains indefinitely on "Loading media transfers..." while the media folder is indexed.

Personal device screenshots are intentionally not attached to the public issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:files-syncFiles, offline storage, transfer, and synchronizationarea:mediaMedia backup, MediaStore, storage reclaim, and sharingarea:uxNavigation, accessibility, responsive design, and interactionplatform:androidAndroid-specific implementation or validationpriority:P0Required for a trustworthy mobile replacement or prevents data losstype:bugtype:performanceStartup, rendering, network, memory, or cache performance

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions