Skip to content

fix(search): keyboard search button on Android 12 CJK IMEs#602

Merged
rainxchzed merged 3 commits into
mainfrom
fix/search-no-response-android12
May 14, 2026
Merged

fix(search): keyboard search button on Android 12 CJK IMEs#602
rainxchzed merged 3 commits into
mainfrom
fix/search-no-response-android12

Conversation

@rainxchzed
Copy link
Copy Markdown
Member

@rainxchzed rainxchzed commented May 14, 2026

Sprint 3 Task 9. Some Chinese-language IMEs on Android 12 emit ImeAction.Done/Go/Next for the search/enter key instead of Search, leaving KeyboardActions.onSearch unfired. Mirror all five plausible actions onto the same trigger.

Test plan

  • Android compile clean
  • 13 18.json valid
  • Real-device: Android 12 + Sogou/Baidu IME with zh-Hans → tap keyboard search/enter → search fires

Source: 李泽洋 email, v1.8.1 Android 12 zh-Hans-CN.

Summary by CodeRabbit

  • Bug Fixes
    • Platform tags in repository details now properly function, opening search results filtered by the selected platform instead of having no effect.
    • The Android 12 keyboard search button now correctly activates search when using Chinese input methods, ensuring consistent search initiation across different IME configurations.

Review Change Stack

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

rainxchzed has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Walkthrough

The PR fixes keyboard search button behavior on Android 12 with Chinese IMEs and documents the fix. SearchRoot.kt now routes additional IME actions (Done, Go, Next, Send) to the search trigger handler. Release notes across 13 language variants document this fix alongside platform chip search filtering.

Changes

Android 12 Chinese IME Search Button Fix

Layer / File(s) Summary
IME keyboard action routing workaround
feature/search/presentation/src/commonMain/kotlin/zed/rainxch/search/presentation/SearchRoot.kt
SearchTopbar's TextField keyboardActions expands to handle onDone, onGo, onNext, and onSend IME events in addition to onSearch, each routing to SearchAction.OnSearchImeClick to work around Chinese IME behavior on Android 12.
Localized release notes for version 1.8.3
core/presentation/src/commonMain/composeResources/files/whatsnew/{18,ar,bn,es,fr,hi,it,ja,ko,pl,ru,tr,zh-CN}/18.json
FIXED section bullets across 13 localized release-note files document the Android 12 keyboard search button fix with Chinese IMEs and the platform chip search filtering behavior in repository details.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • OpenHub-Store/GitHub-Store#133: Modifies SearchRoot.kt SearchTopbar TextField keyboard/IME handling by setting keyboardType and singleLine properties.
  • OpenHub-Store/GitHub-Store#105: Modifies SearchRoot.kt search top bar IME action handling by consolidating IME action routes to ImeAction.Search and onSearchImeClick.

Poem

A rabbit hops through bytes and scrolls,
Finds Chinese IME search that rolls,
Through Android's twist and keyboard dance,
Now Done and Go and Next advance,
With notes in thirteen tongues so bright,
The search button works just right! 🐰

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately reflects the main change: adding support for keyboard search on Android 12 with CJK IMEs, which is the primary purpose of the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/search-no-response-android12

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

rainxchzed has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
feature/search/presentation/src/commonMain/kotlin/zed/rainxch/search/presentation/SearchRoot.kt (1)

955-962: ⚡ Quick win

Consider adding a brief inline comment explaining the IME action workaround.

Lines 958-961 route multiple IME actions (Done, Go, Next, Send) to the search trigger. While the code is correct, this workaround is non-obvious without context. Per coding guidelines, inline comments should be added for workarounds. A one-line note like // Android 12 Chinese IMEs may emit Done/Go/Next/Send instead of Search would help future maintainers.

Also note: this fix applies universally to all IMEs and Android versions, not just Android 12 with Chinese locales. Given the single-line search context (line 963) where these actions reasonably map to "trigger search," this broader scope is likely intentional, but worth confirming.

📝 Suggested inline comment
             keyboardActions =
                 KeyboardActions(
+                    // Some Android 12 Chinese IMEs emit Done/Go/Next/Send instead of Search
                     onSearch = { onAction(SearchAction.OnSearchImeClick) },
                     onDone = { onAction(SearchAction.OnSearchImeClick) },
                     onGo = { onAction(SearchAction.OnSearchImeClick) },
                     onNext = { onAction(SearchAction.OnSearchImeClick) },
                     onSend = { onAction(SearchAction.OnSearchImeClick) },
                 ),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@feature/search/presentation/src/commonMain/kotlin/zed/rainxch/search/presentation/SearchRoot.kt`
around lines 955 - 962, Add a one-line inline comment above the KeyboardActions
block (where KeyboardActions and the handlers onSearch, onDone, onGo, onNext,
onSend all call onAction(SearchAction.OnSearchImeClick)) explaining why multiple
IME actions are routed to the search trigger (e.g., "Android IMEs can emit
Done/Go/Next/Send instead of Search; map these to trigger search for single-line
search field"), so future maintainers understand this intentional workaround and
its broader scope.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@feature/search/presentation/src/commonMain/kotlin/zed/rainxch/search/presentation/SearchRoot.kt`:
- Around line 955-962: Add a one-line inline comment above the KeyboardActions
block (where KeyboardActions and the handlers onSearch, onDone, onGo, onNext,
onSend all call onAction(SearchAction.OnSearchImeClick)) explaining why multiple
IME actions are routed to the search trigger (e.g., "Android IMEs can emit
Done/Go/Next/Send instead of Search; map these to trigger search for single-line
search field"), so future maintainers understand this intentional workaround and
its broader scope.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f0558f4d-81b9-4a22-9ab6-f20756002737

📥 Commits

Reviewing files that changed from the base of the PR and between 1080ce4 and 0c8c35d.

📒 Files selected for processing (14)
  • core/presentation/src/commonMain/composeResources/files/whatsnew/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/ar/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/bn/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/es/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/fr/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/hi/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/it/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/ja/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/ko/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/pl/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/ru/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/tr/18.json
  • core/presentation/src/commonMain/composeResources/files/whatsnew/zh-CN/18.json
  • feature/search/presentation/src/commonMain/kotlin/zed/rainxch/search/presentation/SearchRoot.kt

@rainxchzed rainxchzed merged commit 69a086a into main May 14, 2026
1 check passed
@rainxchzed rainxchzed deleted the fix/search-no-response-android12 branch May 14, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant