Skip to content

Native InnerTube video search, search redesign, and a shared adaptive grid - #1063

Merged
A-EDev merged 19 commits into
mainfrom
refactor/search-innertube
Sep 15, 2026
Merged

A-EDev merged 19 commits into
mainfrom
refactor/search-innertube

Conversation

@A-EDev

@A-EDev A-EDev commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Summary

Moves video search off NewPipeExtractor onto the native InnerTube client — 13 requests per page down to 1 — and rebuilds the search surface on Material 3 with a grid layout shared with Home and Channels.

Data and parsing

  • innertube/pages/channel/ promoted to innertube/pages/renderer/, since search and channel parse the same renderers. ChannelItemFeedItem, ChannelSectionFeedShelf, and so on.
  • New innertube/pages/search/: SearchResultsPage, SearchPageParser, SearchSuggestionsPage. Structural JSON parsing against a renderer registry, not typed DTOs.
  • YouTubeSearchParams generalised into a protobuf params builder, so every filter and sort is applied server-side rather than by fetching more and filtering locally.
  • SearchPagingSource folds the creator's "Latest from" strip into the channel card it belongs to, dedupes across pages, and drops blocked creators.

Filters that are dead server-side are not offered: sort-by-date and sort-by-rating return the same result set as relevance (verified by diffing live responses), so only Relevance and View count ship.

UI

  • SearchScreen 1790 → 242 lines; components split into ui/components/search/.
  • M3 search bar with a back arrow, filters in a dialog, a grid/list toggle, Shorts and community post shelves in the results.
  • Creator card is tinted from the channel avatar via the existing rememberMediaArtworkTint, with the latest-uploads shelf attached to it and a responsive action row.
  • FeedGridLayout gains cardWidth; rows the grid cannot fill now take a full-width thumbnail-left card each, sized to one grid column so they line up with the cards above. List mode is one full-width column at every size.

Shared components gained parameters whose defaults preserve existing behaviour, so no other call site changes visually: CompactVideoCard(thumbnailWidth), FlowSubscribeButton(size, tint), MediaArtworkTint.raised.

Also

  • Blocked channels are now hidden from search results, reusing FlowNeuroEngine's blocked set.
  • Fixes ViewHistory.touchHistoryEntry overwriting a recorded duration with 0, which silently dropped a video from the watch-progress map.

Testing

129 tests across 15 classes, including 17 real captured InnerTube responses as fixtures.

./gradlew spotlessCheck
./gradlew :app:compileGithubDebugKotlin :app:compileFossDebugKotlin
./gradlew :app:testGithubDebugUnitTest :app:assembleGithubDebug

All green. Verified on a phone in portrait and landscape; not verified on tablet hardware.

Layout is covered as pure logic rather than by rendering: VideoCardFullWidth and CompactVideoCard call hiltViewModel() unconditionally and there is no Hilt test infrastructure in src/test, so rendering a video card there throws.

Copilot AI lite review requested due to automatic review settings September 15, 2026 12:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added ui Compose UI, theming, or Material 3 surfaces extraction InnerTube / NewPipe extraction and networking labels Sep 15, 2026
@A-EDev
A-EDev merged commit 52e9f1f into main Sep 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extraction InnerTube / NewPipe extraction and networking ui Compose UI, theming, or Material 3 surfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants