Skip to content

Feature/bugfixes on dev#788

Open
ianshulyadav wants to merge 6 commits into
ArchiveTuneApp:devfrom
ianshulyadav:feature/bugfixes-on-dev
Open

Feature/bugfixes on dev#788
ianshulyadav wants to merge 6 commits into
ArchiveTuneApp:devfrom
ianshulyadav:feature/bugfixes-on-dev

Conversation

@ianshulyadav

Copy link
Copy Markdown

Pull Request

Summary

This Pull Request addresses several critical stability and user interface bugs in the application. It fixes playback freezes and ANR crashes by lowering the stream-resolving timeout, ensures long song names do not overflow song durations, adds support for tags/filtering, implements playlist pinning, preserves user card/list layout mode settings upon restart, and fixes dynamic shortcut counts and filtered song click mismatches. Finally, the branch has been successfully merged with the latest changes from the upstream dev branch.

Linked Work

  • Closes:
  • Related:

Change Type

  • Feature
  • Bug fix
  • UI / UX
  • Performance / memory
  • Playback / Media3
  • Lyrics / provider integration
  • Search / YouTube / network data
  • Local library / Room database
  • Widgets / notification / shortcuts
  • Settings / preferences / DataStore
  • Discord / Last.fm / ListenBrainz / external integration
  • Localization / strings / fastlane metadata
  • Build / Gradle / CI / release packaging
  • Dependency update
  • Documentation only

Affected Surfaces

  • :app
  • :innertube
  • :betterlyrics
  • :kugou
  • :lrclib
  • :lastfm
  • :simpmusic
  • :paxsenix
  • :unison
  • :canvas
  • :shazamkit
  • :spotifycore
  • server
  • fastlane
  • .github
  • Other:

Screenshots / Recordings

Before After
(Optional: add screenshots if available) (Optional: add screenshots if available)

Behavior Notes

  • ANR Resolution: The timeout for stream URL resolution in MusicService has been reduced from 12000L to 3000L to prevent ExoPlayer's internal thread from freezing the application when pausing/resuming uncached streams.
  • Database Schema Migration: Pinned playlist support is added via a pinnedAt column in PlaylistEntity, bumping the schema version to 30.
  • Layout Persistence: UI layout states (e.g. Card vs List modes) are saved synchronously on selection and read immediately upon recomposition from cached preferences, resolving resetting on relaunch.
  • Tags & Filtering: Staging filters and management are fully integrated under the new HorizontalPager tabs.

Architecture Checklist

  • The change preserves UDF flow: UI -> ViewModel -> UseCase/domain -> Repository/data.
  • Screen state is represented structurally with Loading, Success, Empty, and Error where this PR introduces or changes screen state.
  • Composables receive immutable, UI-specific domain models instead of raw Room, network, or service entities.
  • Business work is not triggered directly from composition.
  • Exceptions are surfaced through explicit state or result types instead of being swallowed.
  • No runBlocking is introduced in app execution paths.

Compose / Material Checklist

  • UI state is hoisted out of composable layout code.
  • Reactive state is collected with collectAsStateWithLifecycle().
  • New UI models are annotated with @Immutable or @Stable.
  • Lazy layouts use stable key values and explicit contentType.
  • Non-primitive constants, structural lambdas, and allocation-heavy objects in hot paths are remembered.
  • Rapidly changing inputs such as scroll, gesture, animation, or playback progress use derivedStateOf where appropriate.
  • UI strings come from stringResource() and duplicated visible strings on the same screen are avoided.
  • Interactive elements keep a minimum 48dp touch target.
  • Material 3 / Material 3 Expressive tokens are used for color, typography, shape, and motion instead of hardcoded UI values.
  • Edge-to-edge layouts handle and consume WindowInsets correctly when this PR changes screen layout.

Concurrency / Performance Checklist

  • Business coroutines are scoped to viewModelScope or an existing lifecycle-owned application/service scope.
  • Disk, database, network, parsing, and heavy mapping work is dispatched to Dispatchers.IO or Dispatchers.Default.
  • Cancellation is handled explicitly where long-running work, playback, downloads, sync, lyrics fetching, or recognition is involved.
  • The change avoids blocking the main thread.
  • The change avoids unnecessary allocations in recomposition loops, playback loops, polling loops, and provider parsing paths.
  • Large lists, images, lyrics payloads, and network responses are bounded, streamed, cached, paged, or mapped off the main thread as appropriate.

Data / Persistence Checklist

  • Room entity, DAO, or database changes include a schema update under app/schemas.
  • Database migrations preserve existing user data and fail clearly when migration is impossible.
  • DataStore or preference-key changes are backward compatible.
  • Network DTOs remain isolated from UI models.
  • Provider responses handle missing, malformed, regional, or rate-limited data without crashing the app.

Playback / Integration Checklist

  • Media3 playback, queue, cache, and service behavior remains stable across foreground, background, notification, and process recreation paths.
  • Audio focus, notification controls, widgets, shortcuts, and media session actions are considered when playback behavior changes.
  • External integrations handle absent credentials, revoked auth, network failure, and API changes.
  • Native, AAR, or ABI-sensitive changes account for mobile/tv and universal, arm64, armeabi, x86, and x86_64 variants.

Localization / Assets Checklist

  • User-facing strings are added to the base resources and translated resources are updated or intentionally left for translation follow-up.
  • Unused string resources, drawables, and metadata are removed when replaced.
  • Image assets have explicit display dimensions and are decoded at the displayed size.
  • Fastlane metadata, screenshots, icons, or release text are updated when user-facing store behavior changes.

Privacy / Security Checklist

  • No secrets, keys, tokens, keystores, signing files, private certificates, or local machine paths are committed.
  • Logs do not expose access tokens, cookies, auth headers, user identifiers, listening history, or local file paths.
  • New network calls are justified by the feature and use existing client, proxy, timeout, and error-handling patterns.
  • User data remains local unless the PR explicitly documents the integration and consent path.

Verification

  • Android Studio sync: Verified syncing successfully.
  • Manual device/emulator verification: Tested layouts and stream timeouts on local device simulation.
  • UI screenshot/recording attached: None.
  • Accessibility or touch-target review: Targets maintain minimum 48dp limits.
  • Regression areas checked: Stream playback, playlists listing, and search flow.
  • CI expectation: Branch builds successfully.

Reviewer Focus

  • MusicService.kt lines resolving stream playback data specs (check reduced timeout safety).
  • LibraryScreen.kt integration of tags filtering under expressive page tabs.
  • Room schema changes for DB version 30 (push_pin playlist field).

Release Notes

Fixed a critical application hang (ANR) during pause/resume, corrected song item layout overlaps, added playlist pinning and tags management, and resolved layout setting reset issues on application restart.

@sang765 sang765 added the BUG Something isn't working label Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BUG Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants