Repository navigation
Conversation
yukawa
force-pushed
the
no_personalized_learning_tsf_ibus
branch
3 times, most recently
from
September 1, 2026 17:53
6219374 to
d48ee3a
Compare
yukawa
force-pushed
the
no_personalized_learning_tsf_ibus
branch
from
October 7, 2026 03:09
d48ee3a to
cfe4a3c
Compare
Collaborator
Author
|
Rebased onto |
yukawa
force-pushed
the
no_personalized_learning_tsf_ibus
branch
from
October 7, 2026 03:14
cfe4a3c to
cde07c5
Compare
Collaborator
Author
|
Renamed |
yukawa
force-pushed
the
no_personalized_learning_tsf_ibus
branch
from
October 11, 2026 01:44
cde07c5 to
f67f999
Compare
Collaborator
Author
|
To make discussion easier, I've sent out the following smaller changes that are split out from this one.
Then converting this into a draft until the above ones get merged. |
yukawa
marked this pull request as draft
October 21, 2026 09:02
This commit aims to make use of IS_PRIVATE/IBUS_INPUT_HINT_PRIVATE signals in TSF/IBus by dynamically adjusting the learning level. To do so, a new Context.no_personalized_learning boolean field is introduced. The new field is interpreted as temporarily raising the effective Config::history_learning_level to READ_ONLY, so all the existing learning-suppression code paths are reused as-is. The reason why this commit ended up introducing a new field in Context rather than reusing Request.is_incognito_mode like Mozc for Android is a bit ironic. Here is the historical context: Mozc has supported its own "secret mode" concept long before it started supporting the Android Client. Its "secret mode" not only disables personalized learning but also disables personalized features such as user dictionary and history-based suggestions. On the other hand, IME_FLAG_NO_PERSONALIZED_LEARNING in Android IME API does not require the IME to disable all the personalized features. Its only request for the IME is to disable personalized learning, which is what I deliberately intended when designing the API [1]. The API was designed to keep Android API vendor-neutral and independent of app-specific concepts like "incognito" mode, which could have been changed at any time. When the Chrome for Android team started using it in its "Incognito" mode [2], Mozc for Android mapped IME_FLAG_NO_PERSONALIZED_LEARNING to its own "secret mode". The same behavior has also been inherited by Gboard. Now that similar signals are available in TSF/IBus, the assumption here is that disabling personalized learning alone may be more appropriate than automatically enabling "secret mode" for existing desktop Mozc users for the following reasons: - What MS-IME does for IS_PRIVATE is actually to disable personalized learning while keeping other personalized features intact. - There is no visual indicator when the "secret mode" is enabled in the desktop renderer. Users would have no idea why conversion results are different only on the incognito mode in Chromium-based browsers and private-browsing mode in Firefox-based browsers. - mozc.commands.Request has been implemented as a handler-global state, not per-session state. SessionHandler::SetRequest ignores the session id and pushes the new request onto every live session. Sent from one Windows app, is_incognito_mode would have leaked into all other apps' sessions on the shared mozc_server, which is not a desirable behavior. With the above considerations, it seems more appropriate to interpret IS_PRIVATE/IBUS_INPUT_HINT_PRIVATE as a "no personalized learning" signal like how IME_FLAG_NO_PERSONALIZED_LEARNING is defined, even if Mozc for Android interpreted it as the "secret mode" signal instead. [1]: aosp-mirror/platform_frameworks_base@5959af1 [2]: chromium/chromium@5c08787
yukawa
force-pushed
the
no_personalized_learning_tsf_ibus
branch
from
November 4, 2026 04:50
f67f999 to
02bc580
Compare
Collaborator
Author
|
Rebased onto master. |
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
This commit aims to make use of
IS_PRIVATE/IBUS_INPUT_HINT_PRIVATEsignals in TSF/IBus by dynamically adjusting the learning level. To do so, a newContext.no_personalized_learningboolean field is introduced. The new field is interpreted as temporarily raising the effectiveConfig::history_learning_leveltoREAD_ONLY, so all the existing learning-suppression code paths are reused as-is.The reason why this commit ended up introducing a new field in
Contextrather than reusingRequest.is_incognito_modelike Mozc for Android is a bit ironic. Here is the historical context:Mozc has supported its own "secret mode" concept long before it started supporting the Android Client. Its "secret mode" not only disables personalized learning but also disables personalized features such as user dictionary and history-based suggestions. On the other hand,
IME_FLAG_NO_PERSONALIZED_LEARNINGin Android IME API does not require the IME to disable all the personalized features. Its only request for the IME is to disable personalized learning, which is what I deliberately intended when designing the API (aosp-mirror/platform_frameworks_base@5959af1). The API was designed to keep Android API vendor-neutral and independent of app-specific concepts like "incognito" mode, which could have been changed at any time.When the Chrome for Android team started using it in its "Incognito" mode (chromium/chromium@5c08787), Mozc for Android mapped
IME_FLAG_NO_PERSONALIZED_LEARNINGto its own "secret mode". The same behavior has also been inherited by Gboard.Now that similar signals are available in TSF/IBus, the assumption here is that disabling personalized learning alone may be more appropriate than automatically enabling "secret mode" for existing desktop Mozc users for the following reasons:
IS_PRIVATEis actually to disable personalized learning while keeping other personalized features intact.mozc.commands.Requesthas been implemented as a handler-global state, not per-session state.SessionHandler::SetRequestignores the session id and pushes the new request onto every live session. Sent from one Windows app,is_incognito_modewould have leaked into all other apps' sessions on the sharedmozc_server, which is not a desirable behavior.With the above considerations, it seems more appropriate to interpret
IS_PRIVATE/IBUS_INPUT_HINT_PRIVATEas a "no personalized learning" signal like howIME_FLAG_NO_PERSONALIZED_LEARNINGis defined, even if Mozc for Android interpreted it as the "secret mode" signal instead.Issue IDs
N/A
Steps to test new behaviors (if any)