Fix keyboard dismissal when opening message sheets#1417
Conversation
WalkthroughChangesKeyboard-preserving conversation sheets
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
Ready to review this PR? Stage has broken it down into 4 individual chapters for you: Chapters generated by Stage for commit e4557a6 on Jul 18, 2026 8:33pm UTC. |
Preview APK for PR #1417Home-screen label: 1417 White Noise with the blueprint launcher icon — installs side-by-side with the production and staging apps. Install directly — one tap, no GitHub sign-in (public, content-addressed Every push to this PR rebuilds and updates this comment. |
agent-p1p
left a comment
There was a problem hiding this comment.
BLOCKING:
none
SUGGESTION:
- Runtime IME/focus behavior is not exercised by the new coverage:
app/src/test/java/dev/ipf/whitenoise/android/ui/KeyboardPreservingBottomSheetCoverageTest.kt:10-66only parses source text. Keep the preview-APK manual check explicit, or add a Compose/instrumentation regression test when the harness can drive IME focus, sheet placement, Back, and scrim dismissal.
NITPICK:
app/src/main/java/dev/ipf/whitenoise/android/ui/design/AppSheets.kt:98passes the rawonDismissRequesttoPopup, while Back and scrim paths usecurrentOnDismissRequest. Use the updated reference there too for consistency and to avoid stale captures if Popup dismissal becomes active later.
SUMMARY: The shared non-focusable popup is a small, appropriate extraction and all three in-scope sheets use it; ForwardMessageSheet remains unchanged. I verified the resolved Compose dependency is ui-android:1.12.0-alpha03; its PopupLayout measures clipped popups from the host view getWindowVisibleDisplayFrame, so the zero-origin, bottom-aligned full-frame popup is bounded above the already-open IME rather than requiring an extra imePadding(). Overlay-priority Back, scrim consumption, navigation insets, and sensitive-path scope look correct. Targeted unit coverage, ktlint, and Android lint pass locally; all GitHub checks are green.
VERDICT: APPROVE
SENSITIVE_PATHS: none
|
Coordination with #1418: #1418 should land first as the shared keyboard-safe popup abstraction. Afterward, rebase this PR and migrate the remaining message sheets onto |
|
Addressed the dismissal-callback consistency nit in 4a4e28e: Popup now uses the rememberUpdatedState-backed callback, matching Back and scrim dismissal. Focused unit coverage and ktlint pass locally. Runtime IME verification remains called out explicitly in the PR body for the preview APK. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@app/src/main/java/dev/ipf/whitenoise/android/ui/design/AppSheets.kt`:
- Around line 61-155: The KeyboardPreservingBottomSheet implementation
duplicates popup and back-handling behavior that should come from the shared
abstraction. After rebasing onto PR `#1418`, replace the custom Popup, dispatcher
registration, and fallback BackHandler logic with KeyboardSafePopup, preserving
the existing sheet content, scrim dismissal, positioning, and modifier behavior
through that abstraction.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f807769c-ee53-4b86-bcf8-64f26195385e
📒 Files selected for processing (5)
app/src/main/java/dev/ipf/whitenoise/android/ui/conversation/messages/EditHistory.ktapp/src/main/java/dev/ipf/whitenoise/android/ui/conversation/messages/MessageFullScreen.ktapp/src/main/java/dev/ipf/whitenoise/android/ui/conversation/reactions/Reactions.ktapp/src/main/java/dev/ipf/whitenoise/android/ui/design/AppSheets.ktapp/src/test/java/dev/ipf/whitenoise/android/ui/KeyboardPreservingBottomSheetCoverageTest.kt
|
@agent-p1p what's blocking this PR? |
Move edit history and message info onto the shared non-focusable popup so opening them preserves composer focus and the IME. Keep visual scrim and modal accessibility semantics, and make shared Back dismissal run before the IME callback. Fixes #1396
4a4e28e to
e4557a6
Compare
|
@mubarakcoded #1418 was the blocker. It merged, but this branch had since drifted into conflicts. I rebased it onto current master, replaced the duplicate popup plumbing with |
|
Update: all GitHub checks are green at e4557a6, CodeRabbit marked its thread resolved, and the refreshed preview APK is available: https://nostr.download/1e7c2c76c249f6545b3ce7e859cfabc9379483e44678d4e6ffb4f8a7acbdecd4.apk. The only remaining blocker is manual IME behavior confirmation on that APK; the PR stays draft until that check is done. |
Summary
masterafter refactor: share keyboard-safe popup behavior #1418 and reuse its sharedKeyboardSafePopupabstractionValidation
./gradlew :app:compileDevZapstoreDebugKotlin :app:compileDevPlayDebugKotlin :app:testDevZapstoreDebugUnitTest :app:testDevPlayDebugUnitTest :app:verifyRoborazziDevZapstoreDebug :app:verifyRoborazziDevPlayDebug :app:ktlintCheck :app:lintDevZapstoreDebug :app:lintDevPlayDebug --no-daemon --stacktraceManual IME behavior remains to be confirmed on the regenerated preview APK.
Fixes #1396