Repository navigation
feat: [PREFERENCES] Send the preference type and show it in the selector - #728
Merged
Merged
Conversation
added 5 commits
October 30, 2026 09:22
florent37
commented
Oct 30, 2026
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.
Description
Each preference store now tells the desktop which storage it comes from, and the desktop shows it in the preference selector.
SDK
FloconPreferencegets atype: Stringproperty (free value), defaulting to"Custom", so existing Kotlin implementations keep compiling.FloconPreferenceTypeholds suggested values per OS:SharedPreferences(Android),DataStore(Android / iOS / JVM),UserDefaultsandKeychain(iOS),Java Preferences(JVM),LocalStorage(Wasm),Custom.FloconSharedPreference→ SharedPreferences,FloconDatastorePreference→ DataStore, iOSUserDefaults→ UserDefaults. The multiplatform sample uses a free value ("In memory").get_shared_preferencessendstypenext toname. The field is optional, so old SDK / new desktop and the reverse both keep working.Protocol.ktis unchanged (no new method).Desktop
typegoes through the wire / domain / UI models. It is null for older SDKs.[icon type name]and each dropdown item shows the icon, the name and the type. The filter also matches the type.FloconTintedIcon, plus an optionalleadingContentslot onFloconPageSelectorand the dropdown items). The type string is mapped toPreferenceTypeUiModelinMapper.kt(case insensitive):catTable)catDatabase)catNetwork)accent)catAccessibility)catAnalytics)catAdb)MCP:
list_shared_preferencesreturnstype, and the test checks it.Docs:
protocol/shared-preferences.md,docs2/sharedpref.md(new "Preference type" section;docs/is left as on main),docs2/mcp.md,docs2/migration.md, flocon-debug skill.The same change for the Swift SDK is in a separate PR on openflocon/FloconSwift.
Checks run locally:
:sharedprefs:jvmTest, the no-op / datastore / iOS compiles,:sample:android:assembleDebug/assembleRelease,:mcp:allTests,:data:core:allTests,:composeApp:compileKotlinDesktop,ktlintCheck. Checked in the running desktop with the Android sample (SharedPreferences, DataStore and a custom "In memory" store). Not run:mkdocs build --strict(mkdocs-material is not installed here), iOS./gemini review