feat(feed): add search and discovery experience - #90
Merged
Conversation
…eed_search_discovery
AliIbrahim174
pushed a commit
that referenced
this pull request
May 3, 2026
feat(feed): add search and discovery experience
AliIbrahim174
pushed a commit
that referenced
this pull request
May 3, 2026
feat(feed): add search and discovery experience
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.
Overview
This pull request introduces the full Feed, Search, Discovery, and Home experience for the
feature/feed_search_discoverybranch and prepares it to be merged intodev.The branch is currently:
devfeature/feed_search_discoveryahead99 commits0 commitsThis means the branch is up to date with
devand can be opened directly as a pull request targetingdev.Summary
This PR adds a complete discovery-focused user experience across the app. It replaces the old mock-driven home/search flow with real feature modules, richer routing, API-backed data sources, BLoC/Cubit state management, and UI updates for feed, search, discovery, home, playback, profile, and premium-aware surfaces.
The main work includes:
Major Features Added
1. Discovery Feature
This PR adds a new
features/discoverymodule with clean architecture layers.Added discovery data layer
New files include:
lib/features/discovery/data/datasources/discovery_remote_data_source.dartlib/features/discovery/data/dto/resolved_resource_model.dartlib/features/discovery/data/dto/trending_track_model.dartlib/features/discovery/data/repositories/discovery_repository_impl.dartlib/features/discovery/data/repositories/trending_repository_impl.dartThis adds support for:
Added discovery domain layer
New files include:
lib/features/discovery/domain/entities/resolved_resource.dartlib/features/discovery/domain/entities/trending_track.dartlib/features/discovery/domain/repositories/discovery_repository.dartlib/features/discovery/domain/repositories/trending_repository.dartlib/features/discovery/domain/usecases/get_trending_usecase.dartlib/features/discovery/domain/usecases/resolve_resource_usecase.dartThis introduces:
ResolvedResourceentity for resolving shared links.TrendingTrackentity for discovery content.Added discovery presentation layer
New files include:
lib/features/discovery/presentation/bloc/discovery_cubit.dartlib/features/discovery/presentation/bloc/discovery_state.dartlib/features/discovery/presentation/bloc/trending_cubit.dartlib/features/discovery/presentation/bloc/trending_state.dartlib/features/discovery/presentation/page/discover_page.dartThis adds:
Search Feature
This PR introduces a full search module and replaces the previous mock search flow.
Added search data layer
New files include:
lib/features/search/data/datasources/search_remote_data_source.dartlib/features/search/data/datasources/genre_remote_datasource.dartlib/features/search/data/dto/search_models.dartlib/features/search/data/repositories/search_repository_impl.dartlib/features/search/data/repositories/genre_repository_impl.dartThis adds support for:
Added search domain layer
New files include:
lib/features/search/domain/entities/search_entities.dartlib/features/search/domain/entities/genre_entities.dartlib/features/search/domain/repositories/search_repository.dartlib/features/search/domain/repositories/genre_repository.dartlib/features/search/domain/usecases/search_usecase.dartlib/features/search/domain/usecases/genre_usecase.dartThis introduces:
Added search presentation layer
New and modified files include:
lib/features/search/presentation/bloc/search_cubit.dartlib/features/search/presentation/bloc/search_state.dartlib/features/search/presentation/bloc/genre_cubit.dartlib/features/search/presentation/bloc/genre_state.dartlib/features/search/presentation/pages/search_page.dartlib/features/search/presentation/pages/genre_page.dartlib/features/search/presentation/widgets/search_bar_widget.dartlib/features/search/presentation/widgets/search_empty_widget.dartlib/features/search/presentation/widgets/search_error_widget.dartlib/features/search/presentation/widgets/search_idle_widget.dartlib/features/search/presentation/widgets/search_results_widget.dartlib/features/search/presentation/widgets/search_tabs_widget.dartlib/features/search/presentation/widgets/search_widgets.dartThis adds:
SharedPreferences.Feed Feature Updates
This PR heavily updates the feed module to support the new feed/search/discovery experience.
Feed data updates
Modified files include:
lib/features/feed/data/datasources/feed_mock_data_source.dartlib/features/feed/data/datasources/feed_remote_data_sources.dartlib/features/feed/data/dto/feed_item_model.dartlib/features/feed/data/repositories/feed_repository_impl.dartThese updates include:
Feed domain updates
Modified files include:
lib/features/feed/domain/entities/feed_item.dartlib/features/feed/domain/repositories/feed_repository.dartlib/features/feed/domain/usecases/get_feed.dartThese updates include:
Feed presentation updates
Modified files include:
lib/features/feed/presentation/bloc/feed_cubit.dartlib/features/feed/presentation/bloc/feed_state.dartlib/features/feed/presentation/pages/feed_page.dartlib/features/feed/presentation/widgets/feed_card.dartlib/features/feed/presentation/widgets/feed_toggle.dartThese changes add or improve:
Home Feature
This PR adds a new real Home feature and removes the old mock home page implementation.
Added home data layer
New files include:
lib/features/home/data/datasources/home_remote_data_source.dartlib/features/home/data/repositories/home_repository_impl.dartThis adds backend-backed home content fetching.
Added home domain layer
New files include:
lib/features/home/domain/entities/home_content.dartlib/features/home/domain/repositories/home_repository.dartlib/features/home/domain/usecases/get_home_content_usecase.dartlib/features/home/domain/usecases/get_home_trending_tracks_usecase.dartThis introduces:
Added home presentation layer
New files include:
lib/features/home/presentation/bloc/home_cubit.dartlib/features/home/presentation/bloc/home_state.dartlib/features/home/presentation/pages/home_page.dartRemoved file:
lib/features/home/presentation/pages/mock_home_page.dartThe new home page includes:
Routing Updates
The app router has been significantly updated.
Modified file:
lib/app/router.dartKey routing updates include:
/discover./search./search/active./genre/:genreSlug.Deep Link Updates
Modified files include:
lib/core/deep_links/deep_link_destination.dartlib/core/deep_links/deep_link_parser.dartThese changes add or improve:
Dependency Injection Updates
Modified file:
lib/core/di/injector.dartThis PR updates DI registrations for:
These changes make the new feature modules available through
getIt.Playback Updates
Modified and added files include:
lib/core/audio/app_audio_handler.dartlib/core/models/track.dartlib/core/services/implementations/just_audio_player_service.dartlib/features/playback/data/dto/track_detail_dto.dartlib/features/playback/data/repositories/queue_repository.dartlib/features/playback/presentation/bloc/playback_cubit.dartlib/features/playback/presentation/bloc/player_cubit.dartlib/features/playback/presentation/bloc/player_ui_state.dartlib/features/playback/presentation/bloc/track_loader_cubit.dartlib/features/playback/presentation/pages/full_player_page.dartlib/features/playback/presentation/pages/track_deep_link_bridge_page.dartlib/features/playback/presentation/widgets/add_to_playlist_sheet.dartThese changes improve:
Profile Updates
Modified and added files include:
lib/features/profile/data/datasources/profile_remote_data_source.dartlib/features/profile/data/dto/profile_page_dto.dartlib/features/profile/data/repositories/profile_repository_impl.dartlib/features/profile/domain/entities/profile_page_data.dartlib/features/profile/domain/repositories/profile_repository.dartlib/features/profile/presentation/bloc/profile_cubit.dartlib/features/profile/presentation/bloc/profile_state.dartlib/features/profile/presentation/pages/profile_page.dartThese updates add or improve:
Premium and Ads Integration
Modified files include:
lib/features/feed/presentation/pages/feed_page.dartlib/features/home/presentation/pages/home_page.dartlib/features/settings/presentation/page/settings_page.dartlib/core/widgets/update_dialog.dartThis PR includes premium-aware UI updates such as:
Networking and API Updates
Modified files include:
lib/core/network/api_constants.dartlib/core/network/interceptors/auth_interceptor.dartlib/core/errors/failure.dartThese updates include:
Android and Platform Updates
Modified files include:
android/app/build.gradle.ktsandroid/app/src/main/AndroidManifest.xmlThese updates support:
CI and Release Updates
Modified files include:
.github/workflows/ci.yml.github/workflows/release.ymlThese changes update:
Tests Added or Updated
This PR adds and updates tests across multiple modules.
App tests
Modified files:
test/app/app_test.darttest/app/router_test.dartUpdates include:
Deep link tests
Modified file:
test/core/deep_links/deep_link_parser_test.dartUpdates include:
Network tests
Modified file:
test/core/network/interceptors/auth_interceptor_test.dartUpdates include:
Discovery tests
Added files:
test/features/discovery/data/dto/resolved_resource_model_test.darttest/features/discovery/data/dto/trending_track_model_test.darttest/features/discovery/presentation/bloc/discovery_cubit_test.darttest/features/discovery/presentation/bloc/trending_cubit_test.dartThese cover:
Search tests
Added files include:
test/features/search/data/datasources/search_remote_data_source_test.darttest/features/search/data/dto/search_models_test.darttest/features/search/data/repositories/search_repository_impl_test.darttest/features/search/domain/entities/genre_entities_test.darttest/features/search/domain/entities/search_entities_test.darttest/features/search/domain/usecases/genre_usecase_test.darttest/features/search/domain/usecases/search_usecase_test.darttest/features/search/presentation/bloc/genre_cubit_test.darttest/features/search/presentation/bloc/search_cubit_test.darttest/features/search/presentation/bloc/search_state_enums_test.darttest/features/search/presentation/bloc/search_state_test.dartThese cover:
Home tests
Added or modified files include:
test/features/home/presentation/bloc/home_cubit_test.darttest/features/home/presentation/mock_home_page_premium_ad_test.darttest/features/home/presentation/pages/mock_home_page_test.dartThese reflect the migration from mock home behavior toward the real Home experience.
Feed tests
Modified files include:
test/features/feed/bloc/feed_cubit_test.darttest/features/feed/data/repositories/feed_repository_impl_test.darttest/features/feed/presentation/pages/feed_page_premium_ad_test.darttest/features/feed/test_helpers.dartThese align feed tests with:
Profile tests
Added or modified files include:
test/features/profile/data/dto/profile_page_dto_test.darttest/features/profile/presentation/bloc/profile_cubit_test.darttest/features/profile/presentation/pages/profile_page_test.dartThese cover:
Other test updates
Modified files include:
test/features/library/presentation/bloc/library_cubit_test.darttest/features/playback/bloc/player_cubit_test.darttest/features/playback/presentation/bloc/playback_cubit_test.darttest/features/playback/presentation/pages/mini_player_test.darttest/features/playback/presentation/pages/playback_ui_pages_test.darttest/features/playlists/data/datasources/playlists_remote_data_source_test.darttest/platform/android_manifest_premium_test.dartThese tests were updated to stay compatible with the new feature integration.
User-Facing Behavior
After this PR, users should be able to:
Technical Notes
State management
The PR uses Cubit/BLoC patterns across the new and updated modules:
SearchCubitGenreCubitDiscoveryCubitTrendingCubitHomeCubitFeedCubitState classes were added or updated to support:
Architecture
The new feature areas follow the existing project architecture: