Skip to content

Improve deeplink#506

Merged
rteyssandier merged 13 commits intomainfrom
feat/improve_deeplink
Apr 4, 2026
Merged

Improve deeplink#506
rteyssandier merged 13 commits intomainfrom
feat/improve_deeplink

Conversation

@rteyssandier
Copy link
Copy Markdown
Contributor

@rteyssandier rteyssandier commented Mar 6, 2026

Improve deeplink with adding global variables

  • Added variables
  • Rework deeplink initialization
  • Added snackbar when there is an error
Enregistrement.de.l.ecran.2026-03-06.a.15.02.40.mov

@rteyssandier rteyssandier requested a review from florent37 March 6, 2026 14:08
@rteyssandier rteyssandier self-assigned this Mar 6, 2026
@rteyssandier rteyssandier added the enhancement New feature or request label Mar 6, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly upgrades the deeplink system by introducing support for global variables, making deeplinks more flexible and powerful. It involves a comprehensive overhaul of the deeplink plugin, data models, and the desktop UI to manage these new variables. Additionally, the project's build configurations were updated to leverage newer Java and Kotlin versions, and a critical bug related to network response body extraction was addressed for improved application stability.

Highlights

  • Java/Kotlin Version Upgrade: Updated Java and Kotlin compatibility to version 17 across multiple modules, including datastores, flocon-base, flocon-no-op, flocon, grpc-interceptors, ktor-interceptors, okhttp-interceptors, and sample applications.
  • Enhanced Deeplink Functionality with Global Variables: Introduced support for global variables within deeplinks, allowing for dynamic parameterization and improved reusability. This includes new data models, UI components for variable management, and updated serialization logic.
  • Reworked Deeplink Initialization and Registration: The deeplink initialization process has been refactored to use dedicated builders (DeeplinkLinkBuilder, DeeplinkVariableBuilder) and the FloconDeeplinksPlugin interface now registers both deeplinks and their associated variables.
  • Database Schema Migration for Deeplink Variables: The Room database schema was updated to version 80, adding a new DeeplinkVariableEntity to persist deeplink variables and their modes (input or auto-complete).
  • Robust Response Body Extraction: Implemented a try-catch block in the OkHttp interceptor's extractResponseBodyInfo function to prevent crashes during response body processing, enhancing stability.
Changelog
  • FloconAndroid/datastores-no-op/build.gradle.kts
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconAndroid/datastores/build.gradle.kts
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconAndroid/flocon-base/build.gradle.kts
    • Simplified Kotlin Android target configuration.
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconAndroid/flocon-base/src/commonMain/kotlin/io/github/openflocon/flocon/FloconApp.kt
    • Simplified type declaration for the client property.
  • FloconAndroid/flocon-base/src/commonMain/kotlin/io/github/openflocon/flocon/plugins/deeplinks/FloconDeeplinksPlugin.kt
    • Reworked deeplink building logic with DeeplinkLinkBuilder and DeeplinkVariableBuilder.
    • Introduced DeeplinkVariable data class for defining global variables.
    • Updated FloconDeeplinksPlugin interface to register both deeplinks and variables.
  • FloconAndroid/flocon-base/src/commonMain/kotlin/io/github/openflocon/flocon/plugins/deeplinks/model/DeeplinkModel.kt
    • Modified DeeplinkModel.Parameter to be a sealed interface with AutoComplete and Variable subclasses.
  • FloconAndroid/flocon-no-op/build.gradle.kts
    • Simplified Kotlin Android target configuration.
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconAndroid/flocon/build.gradle.kts
    • Simplified Kotlin Android target configuration.
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconAndroid/flocon/src/commonMain/kotlin/io/github/openflocon/flocon/core/FloconEncoder.kt
    • Added SerializersModule for polymorphic serialization of DeeplinkParameterRemote.
  • FloconAndroid/flocon/src/commonMain/kotlin/io/github/openflocon/flocon/plugins/deeplinks/FloconDeeplinksPlugin.kt
    • Added a MutableStateFlow for deeplink variables.
    • Updated registerDeeplinks to accept and process both deeplinks and variables.
  • FloconAndroid/flocon/src/commonMain/kotlin/io/github/openflocon/flocon/plugins/deeplinks/Mapping.kt
    • Updated toDeeplinksJson to include deeplink variables in the JSON payload.
    • Added mapping functions for DeeplinkVariable to DeeplinkVariableRemote.
    • Implemented polymorphic mapping for DeeplinkModel.Parameter to DeeplinkParameterRemote.
  • FloconAndroid/flocon/src/commonMain/kotlin/io/github/openflocon/flocon/plugins/deeplinks/model/DeeplinksRemote.kt
    • Introduced DeeplinkParameterRemote as a sealed interface with AutoComplete and Variable types.
    • Added DeeplinkVariableRemote data class for remote representation of deeplink variables.
    • Updated DeeplinksRemote to include a list of DeeplinkVariableRemote.
  • FloconAndroid/gradle/libs.versions.toml
    • Updated Kotlin version to 2.2.0.
    • Updated Kotlinx Serialization version to 1.9.0.
    • Updated Ktor version to 3.4.1.
    • Updated KSP version to 2.3.6.
  • FloconAndroid/grpc/grpc-interceptor-base/build.gradle.kts
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconAndroid/grpc/grpc-interceptor-lite/build.gradle.kts
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconAndroid/grpc/grpc-interceptor/build.gradle.kts
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconAndroid/iosApp/iosApp.xcodeproj/project.xcworkspace/xcuserdata/rteyssandier.xcuserdatad/xcschemes/xcschememanagement.plist
    • Added new Xcode workspace user data file.
  • FloconAndroid/iosApp/iosApp.xcodeproj/xcuserdata/rteyssandier.xcuserdatad/xcschemes/iosApp.xcscheme
    • Added new Xcode scheme file.
  • FloconAndroid/iosApp/iosApp.xcodeproj/xcuserdata/rteyssandier.xcuserdatad/xcschemes/xcschememanagement.plist
    • Added new Xcode user scheme management file.
  • FloconAndroid/ktor-interceptor-no-op/build.gradle.kts
    • Simplified Kotlin Android target configuration.
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconAndroid/ktor-interceptor/build.gradle.kts
    • Simplified Kotlin Android target configuration.
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconAndroid/okhttp-interceptor-no-op/build.gradle.kts
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconAndroid/okhttp-interceptor/build.gradle.kts
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconAndroid/okhttp-interceptor/src/main/kotlin/io/github/openflocon/flocon/okhttp/Utils.kt
    • Added a try-catch block to extractResponseBodyInfo to prevent crashes during response body extraction.
  • FloconAndroid/sample-android-only/build.gradle.kts
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconAndroid/sample-android-only/src/main/java/io/github/openflocon/flocon/myapplication/deeplinks/InitializeDeeplinks.kt
    • Reworked deeplink initialization to demonstrate the use of new variable and deeplink builders, including global variables.
  • FloconAndroid/sample-multiplatform/build.gradle.kts
    • Simplified Kotlin Android and JVM target configurations.
    • Updated Java and Kotlin target compatibility to version 17.
  • FloconDesktop/composeApp/schemas/io.github.openflocon.flocondesktop.common.db.AppDatabase/78.json
    • Updated the database identity hash.
    • Added the schema for DeeplinkVariableEntity.
  • FloconDesktop/composeApp/schemas/io.github.openflocon.flocondesktop.common.db.AppDatabase/79.json
    • Added new database schema version 79, including DeeplinkVariableEntity.
  • FloconDesktop/composeApp/schemas/io.github.openflocon.flocondesktop.common.db.AppDatabase/80.json
    • Added new database schema version 80, including DeeplinkVariableEntity with a mode column.
  • FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/common/db/AppDatabase.kt
    • Updated database version to 80.
    • Added DeeplinkVariableEntity to the list of entities.
    • Added ModeConverter to the type converters.
    • Added deeplinkVariableDao abstract property.
  • FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/common/db/RoomModule.kt
    • Added deeplinkVariableDao to the Koin dependency injection module.
  • FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/deeplinks/DeepLinkViewModel.kt
    • Reworked ViewModel to manage DeeplinkScreenState which includes both deeplinks and variables.
    • Introduced variableValues StateFlow to track current variable states.
    • Updated submit function to incorporate variable values when executing deeplinks.
    • Added setVariable function to update variable values.
  • FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/deeplinks/mapper/Mapper.kt
    • Updated mapToUi functions to handle DeeplinkScreenState and DeeplinkVariableViewState.
    • Modified parseDeeplinkString to support DeeplinkPart.Variable.
  • FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/deeplinks/model/DeeplinkPart.kt
    • Added DeeplinkPart.Variable sealed interface for representing deeplink variables in the UI.
  • FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/deeplinks/model/DeeplinkScreenState.kt
    • Added new data class DeeplinkScreenState to hold deeplinks and variables for the UI.
  • FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/deeplinks/model/DeeplinkVariableViewState.kt
    • Added new data class DeeplinkVariableViewState for representing deeplink variables in the UI.
  • FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/deeplinks/view/DeeplinkItemView.kt
    • Updated DeeplinkItemView and TextFieldPart to correctly display and interact with DeeplinkPart.Variable.
  • FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/deeplinks/view/DeeplinkScreen.kt
    • Reworked DeeplinkScreen layout to include a dedicated variables panel.
    • Separated the display of regular deeplinks from history items.
    • Updated data flow to consume DeeplinkScreenState from the ViewModel.
  • FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/deeplinks/view/DeeplinkVariablesPanelView.kt
    • Added new Composable DeeplinkVariablesPanelView for displaying and editing deeplink variables.
  • FloconDesktop/data/core/src/commonMain/kotlin/io/github/openflocon/data/core/deeplink/datasource/DeeplinkLocalDataSource.kt
    • Updated update and observe methods to handle the new Deeplinks object, which encapsulates both deeplinks and variables.
  • FloconDesktop/data/core/src/commonMain/kotlin/io/github/openflocon/data/core/deeplink/datasource/DeeplinkRemoteDataSource.kt
    • Updated getItems to return a Deeplinks? object.
  • FloconDesktop/data/core/src/commonMain/kotlin/io/github/openflocon/data/core/deeplink/repository/DeeplinkRepositoryImpl.kt
    • Updated the repository to correctly handle the Deeplinks object from both local and remote data sources.
  • FloconDesktop/data/local/src/commonMain/kotlin/io/github/openflocon/data/local/DI.kt
    • Added JSON serializer configuration for polymorphic DeeplinkEntity.Parameter and DeeplinkVariableEntity.Mode.
  • FloconDesktop/data/local/src/commonMain/kotlin/io/github/openflocon/data/local/deeplink/DI.kt
    • Updated Koin module for LocalDeeplinkDataSourceRoom to inject deeplinkVariableDao and json.
  • FloconDesktop/data/local/src/commonMain/kotlin/io/github/openflocon/data/local/deeplink/ModeConverter.kt
    • Added new ModeConverter for Room database to handle serialization and deserialization of DeeplinkVariableEntity.Mode.
  • FloconDesktop/data/local/src/commonMain/kotlin/io/github/openflocon/data/local/deeplink/dao/FloconDeeplinkVariableDao.kt
    • Added new DAO interface FloconDeeplinkVariableDao for managing DeeplinkVariableEntity in the database.
  • FloconDesktop/data/local/src/commonMain/kotlin/io/github/openflocon/data/local/deeplink/datasource/LocalDeeplinkDataSourceRoom.kt
    • Updated to manage DeeplinkVariableEntity through deeplinkVariableDao.
    • Combined flows for deeplinks and variables to emit a Deeplinks object.
  • FloconDesktop/data/local/src/commonMain/kotlin/io/github/openflocon/data/local/deeplink/mapper/Mapper.kt
    • Added mapping functions for DeeplinkVariableEntity to DeeplinkVariableDomainModel.
    • Updated DeeplinkDomainModel.Parameter to be a sealed interface with corresponding entity mappings.
  • FloconDesktop/data/local/src/commonMain/kotlin/io/github/openflocon/data/local/deeplink/models/DeeplinkEntity.kt
    • Modified DeeplinkEntity.Parameter to be a sealed interface with AutoComplete and Variable subclasses.
  • FloconDesktop/data/local/src/commonMain/kotlin/io/github/openflocon/data/local/deeplink/models/DeeplinkVariableEntity.kt
    • Added new data class DeeplinkVariableEntity for storing deeplink variables in the local database.
  • FloconDesktop/data/remote/src/commonMain/kotlin/com/flocon/data/remote/deeplink/datasource/DeeplinkRemoteDataSourceImpl.kt
    • Updated getItems to return a Deeplinks object, encapsulating both deeplinks and variables.
  • FloconDesktop/data/remote/src/commonMain/kotlin/com/flocon/data/remote/deeplink/models/DeeplinkReceivedDataModel.kt
    • Modified DeeplinkReceivedDataModel.Parameter to be a sealed interface with AutoComplete and Variable subclasses.
  • FloconDesktop/data/remote/src/commonMain/kotlin/com/flocon/data/remote/deeplink/models/DeeplinkVariableReceivedDataModel.kt
    • Added new data class DeeplinkVariableReceivedDataModel for remote representation of deeplink variables.
  • FloconDesktop/data/remote/src/commonMain/kotlin/com/flocon/data/remote/deeplink/models/DeeplinksReceivedDataModel.kt
    • Updated DeeplinksReceivedDataModel to include a list of DeeplinkVariableReceivedDataModel.
    • Updated toDomain to map to the new Deeplinks object.
  • FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/deeplink/models/DeeplinkDomainModel.kt
    • Modified DeeplinkDomainModel.Parameter to be a sealed interface with AutoComplete and Variable subclasses.
  • FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/deeplink/models/DeeplinkVariableDomainModel.kt
    • Added new data class DeeplinkVariableDomainModel to represent deeplink variables in the domain layer.
  • FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/deeplink/models/Deeplinks.kt
    • Added new data class Deeplinks to encapsulate both deeplinks and variables in the domain layer.
  • FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/deeplink/repository/DeeplinkRepository.kt
    • Updated observe method to return Flow<Deeplinks>.
  • FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/deeplink/usecase/ExecuteDeeplinkUseCase.kt
    • Updated return type to Either<Throwable, String> for better error handling.
    • Added error handling for cases where no device is currently selected.
  • FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/deeplink/usecase/ObserveCurrentDeviceDeeplinkUseCase.kt
    • Updated return type to Flow<Deeplinks>.
Activity
  • The pull request author, rteyssandier, initiated changes to improve deeplink functionality.
  • The core changes involve adding global variables to deeplinks and reworking their initialization.
  • Build configurations were updated to newer Java/Kotlin versions across various modules.
  • New data structures and database entities were introduced to support the new deeplink variable feature.
  • The desktop UI was significantly updated to allow users to define and interact with these new deeplink variables.
  • Serialization logic was adjusted to handle polymorphic types for deeplink parameters and variables.
  • A minor but important fix was applied to the OkHttp interceptor to prevent crashes during response body extraction.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly improves deeplink functionality by adding support for variables and a new DSL. However, a security audit identified a high-severity command injection vulnerability in the desktop application due to unsafe concatenation of user-supplied deeplink parameters into shell commands, and a medium-severity potential denial-of-service (OOM) in the OkHttp interceptor from unbounded response body buffering. Additionally, there are implementation issues related to variable resolution in the UI and submission logic, and a minor data model inconsistency. Addressing these security and implementation concerns is crucial for the robustness and safety of the new feature.

@rteyssandier rteyssandier force-pushed the feat/improve_deeplink branch from b84bb87 to 7cd2378 Compare March 7, 2026 23:08
Comment thread FloconAndroid/datastores/build.gradle.kts Outdated
@florent37
Copy link
Copy Markdown
Contributor

it's a bit dangerous to change the kotlin version IMO, some clients may be still on kotlin 2.1

@rteyssandier rteyssandier reopened this Mar 9, 2026
@rteyssandier rteyssandier force-pushed the feat/improve_deeplink branch from c5fee41 to 2f4223a Compare March 9, 2026 19:39
@rteyssandier rteyssandier requested a review from florent37 March 9, 2026 19:40
@rteyssandier rteyssandier force-pushed the feat/improve_deeplink branch from bb76840 to 7a70433 Compare March 25, 2026 21:38
@florent37
Copy link
Copy Markdown
Contributor

wow great improvement ! thanks a lot

@florent37
Copy link
Copy Markdown
Contributor

feel free to merge when ready @rteyssandier

@rteyssandier rteyssandier merged commit bf31835 into main Apr 4, 2026
2 checks passed
@rteyssandier rteyssandier deleted the feat/improve_deeplink branch April 4, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants