DISC-436: VideoFeed deeplink - #2558
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for a new /video-feed deep link by recognizing the URI, routing it through the splash/deeplink flow, and launching the in-app Video Feed screen instead of falling back to an external browser.
Changes:
- Introduces
Uri.isVideoFeedUri(...)and corresponding unit tests. - Adds a
startVideoFeedActivitynavigation output toSplashScreenViewModel.DeepLinkViewModeland wires it intoSplashScreenActivity. - Adds deeplink test coverage for both
https://.../video-feedandksr://.../video-feedentry points.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/java/com/kickstarter/libs/utils/extensions/UriExt.kt | Adds /video-feed URI detection via a new regex-backed helper. |
| app/src/test/java/com/kickstarter/services/UriExtTest.kt | Adds unit tests validating isVideoFeedUri for web + ksr:// schemes. |
| app/src/main/java/com/kickstarter/viewmodels/SplashScreenViewModel.kt | Adds a new navigation output and deeplink routing for Video Feed; excludes it from unsupported deeplink browser fallback. |
| app/src/main/java/com/kickstarter/ui/activities/SplashScreenActivity.kt | Subscribes to the new output and launches Video Feed after resetting the task stack to Discovery. |
| app/src/test/java/com/kickstarter/viewmodels/DeepLinkViewModelTest.kt | Adds deeplink tests ensuring Video Feed navigation is triggered. |
Suppressed comments (1)
app/src/test/java/com/kickstarter/viewmodels/DeepLinkViewModelTest.kt:1144
- Same as the non-KSR test: this case should also assert that the other navigation outputs (update/comment-to-update) and
finishDeeplinkActivityare not emitted, to match the expectations enforced by the rest of the deeplink test suite.
startProjectActivityForCheckout.assertNoValues()
startProjectActivityForComment.assertNoValues()
startProjectActivityToSave.assertNoValues()
startPreLaunchProjectActivity.assertNoValues()
startProjectSurveyActivity.assertNoValues()
startPMOrderEditWebview.assertNoValues()
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2558 +/- ##
============================================
- Coverage 65.33% 65.30% -0.04%
- Complexity 2564 2566 +2
============================================
Files 405 405
Lines 32686 32698 +12
Branches 4630 4631 +1
============================================
- Hits 21356 21352 -4
- Misses 8898 8916 +18
+ Partials 2432 2430 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (1)
app/src/test/java/com/kickstarter/viewmodels/DeepLinkViewModelTest.kt:1131
- Test name uses "schema" but the deep link uses a URI scheme (ksr://). Renaming improves clarity and avoids a minor spelling/terminology mistake.
fun testVideoFeedDeeplink_startsVideoFeedActivity_KSR_schema() {
📲 What
Adds a deeplink that opens the Video Feed (VideoFeedActivity). Tapping
https://www.kickstarter.com/video-feed(or theksr://www.kickstarter.com/video-feedscheme) now launches the video feed screen inside the app.🤔 Why
We need an addressable entry point into the video feed so it can be reached from outside the app (marketing, notifications, internal links) rather than only through the in-app Discovery/Search banners. The path is app-internal and intentionally not matched as a feature on the website. Ignored any gating logic on this PR as currently the VideoFeed gate is rolled out to 100% of users.
🛠 How
Routed through the existing single deeplink entry point, SplashScreenActivity → SplashScreenViewModel.DeepLinkViewModel. Both URLs already resolve to the splash screen via its catch-all intent filters, and
/video-feeddoesn't collide with any existing matcher.UriExt.kt: new
Uri.isVideoFeedUri(webEndpoint)matcher (VIDEO_FEED_PATTERN = /video-feed) , following the same shape as the other matchers so it also works against staging endpoints.SplashScreenViewModel.kt: new
startVideoFeedActivity(): Observable<Unit>output that emits when the URI matchesisVideoFeedUri, plus the corresponding!it.isVideoFeedUri(...)exclusion in the unsupportedDeepLink chain so the link doesn't also fall through to the browser.SplashScreenActivity.kt: subscribes and launches via startNewDiscoveryActivity() → startVideoFeed(ScreenName.DEEPLINK.value) → finish(), so Discovery sits beneath the feed for a sane back stack and the entry surface is logged as "deeplink".
The android_video_feed Statsig gate is currently at 100%, so the route intentionally does not re-check the gate at the splash router.
👀 See
Deeplink.mp4
| --- | --- |
| | |
📋 QA
https://www.kickstarter.com/video-feedadb shell am start -W -a android.intent.action.VIEW -d "ksr://www.kickstarter.com/video-feed"Story 📖
DISC-436