Skip to content

DROID-3696 Invite link | Onboarding flow with a no approval invite link #2469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

konstantiniiv
Copy link
Collaborator

@konstantiniiv konstantiniiv commented May 27, 2025


  • I understand that contributing to this repository will require me to agree with the CLA

Description

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 📓 tech-docs
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

# Conflicts:
#	app/src/main/java/com/anytypeio/anytype/di/feature/MainEntryDI.kt
#	app/src/main/java/com/anytypeio/anytype/di/main/SubscriptionsModule.kt
#	presentation/src/main/java/com/anytypeio/anytype/presentation/main/MainViewModel.kt
#	presentation/src/main/java/com/anytypeio/anytype/presentation/main/MainViewModelFactory.kt
@konstantiniiv konstantiniiv self-assigned this May 27, 2025
@konstantiniiv konstantiniiv requested a review from uburoiubu as a code owner May 27, 2025 04:47
@konstantiniiv konstantiniiv requested a review from Copilot May 27, 2025 04:47
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements the invite link onboarding flow with support for no approval invite links by introducing a new PendingIntentStore to manage pending deep links.

  • Injects PendingIntentStore into various view models and factories.
  • Refactors deep link handling methods (e.g., renaming onNewDeepLink to handleNewDeepLink, onGoToTheAppClicked to handleAppEntryClick).
  • Cleans up deprecated and redundant imports across DI modules and view models.

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
presentation/src/main/java/com/anytypeio/anytype/presentation/vault/VaultViewModel.kt Adds pending deep link processing and updates injection parameters.
presentation/src/main/java/com/anytypeio/anytype/presentation/onboarding/signup/OnboardingSetProfileNameViewModel.kt Injects PendingIntentStore and updates navigation logic for deep links.
presentation/src/main/java/com/anytypeio/anytype/presentation/onboarding/signup/OnboardingMnemonicViewModel.kt Refactors deep link and analytics handling.
presentation/src/main/java/com/anytypeio/anytype/presentation/main/MainViewModelFactory.kt Adds PendingIntentStore injection to the factory.
presentation/src/main/java/com/anytypeio/anytype/presentation/main/MainViewModel.kt Updates methods for deep link processing and renames functions for clarity.
domain/src/main/java/com/anytypeio/anytype/domain/deeplink/PendingIntentStore.kt Introduces a new store for managing pending invite deep links.
app/src/main/java/com/anytypeio/anytype/ui/vault/VaultFragment.kt Triggers pending deep link processing on resume.
App and DI files Update imports & dependency injections to support the new deep link flow.
Comments suppressed due to low confidence (1)

presentation/src/main/java/com/anytypeio/anytype/presentation/main/MainViewModel.kt:327

  • The new deep link handling logic is well-structured; ensure that the error logging in the failure branch of checkAuthorizationStatus is adequately covered in tests.
if (authStatus == AuthStatus.UNAUTHORIZED && deeplink is DeepLinkResolver.Action.Invite) {

@@ -261,6 +260,17 @@ class VaultViewModel(
}
}

fun processPendingDeeplink() {
viewModelScope.launch {
delay(1000) // Simulate some delay
Copy link
Preview

Copilot AI May 27, 2025

Choose a reason for hiding this comment

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

Consider extracting the magic number '1000' used in the delay into a named constant to improve maintainability and clarify its purpose.

Suggested change
delay(1000) // Simulate some delay
delay(DELAY_MILLISECONDS) // Simulate some delay

Copilot uses AI. Check for mistakes.

@konstantiniiv konstantiniiv changed the title DROID-3696 invite link onboarding flow with a no approval invite link 2 DROID-3696 Invite link | Onboarding flow with a no approval invite link May 27, 2025
@konstantiniiv konstantiniiv merged commit 6e49023 into release/0-38-0 May 27, 2025
3 checks passed
@konstantiniiv konstantiniiv deleted the droid-3696-invite-link-onboarding-flow-with-a-no-approval-invite-link-2 branch May 27, 2025 08:13
@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants