Repository navigation
fix: smooth Android bottom tabs during IME dismissal - #299
tiensonqin wants to merge 7 commits into
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
There was a problem hiding this comment.
Note
Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.
Devin Review found 6 findings. Devin fixed 4 findings; 2 findings are left for you to triage below.
Fixed by Devin (4)
- Release-device editing validation not documented — The PR now explicitly documents that release-device large-graph RTC latency measurements were not run and what remains unverified.
- Release editing measurements not documented — The PR now explicitly documents the missing release-device large-graph RTC comparison and the debug-emulator/small-graph verification scope.
- Keyboard dismissal drops buffered split text — Fixed by using the existing guarded NativeEditorInput flush, which never publishes the visible suffix over a pre-split block during a handoff.
- Canceled Back gesture ends editing — Fixed by ignoring transient inset reductions while the root animation signal is available unless the IME reaches zero.
There was a problem hiding this comment.
🔍 Required inline video attachment missing
The PR provides external WebP embeds, not the required GitHub video attachment with verified inline playback.
Devin left this for you to triage: The PR includes inline animated evidence, but not the repo-required GitHub mp4 attachment: both available GitHub tokens were rejected with 403 when gh --attach tried to upload the videos. A human with repository upload access should attach the mp4s or grant the automation permission.
Was this helpful? React with 👍 or 👎 to provide feedback.
| Box(Modifier.fillMaxSize()) { | ||
| Column(Modifier.fillMaxSize()) { NavigationContent(context, childIds[0], dismissesComposer) } | ||
| Box( | ||
| Modifier | ||
| .align(Alignment.BottomCenter) | ||
| .wrapContentHeight(unbounded = true), | ||
| ) { | ||
| context.child(childIds[1]) |
There was a problem hiding this comment.
🟡 Autocomplete covers the final block
When a user types / in the final short block of a long page, NavigationBoundary overlays that block with suggestions. The 120 dp end spacer cannot scroll the block clear of the 220 dp suggestions panel.
Devin left this for you to triage: Autocomplete can still overlay the final block because Android now overlays chrome without giving the scroll content a matching bottom inset. I recommend a human decide whether this blocks the PR; the correct fix is a measured scroll-content inset/dynamic spacer rather than restoring viewport resize during IME dismissal.
Learn more
The Android navigation stack puts editor chrome in its second child. That chrome stacks autocomplete above the editor toolbar. The outliner ends with a spacer that measures 120 dp on Android, while the suggestions panel measures 220 dp before counting the toolbar. When the chrome overlays the list, a short final row on a long page cannot scroll high enough to clear the suggestions. The previous reserved-height layout placed the list above the panel.
Example: Scroll to the end of a long page, edit its final one-line block, and type / after a space. The suggestions overlay the block even at the end of the scroll range, where the user needs to see and place the caret.
Recommended fix: Keep the viewport size stable, but give the scrollable content enough bottom clearance for the actual overlay height. Ensure caret reveal accounts for that occluded region when suggestions open. Add a test that edits the last row of a long page with suggestions visible.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Devin Review found 2 findings. All 2 findings are left for you to triage in Devin Review.
Summary
Android now keeps the outliner viewport full-size while editor chrome appears or disappears, matching the iOS overlay model instead of relayouting the journal when
bottom-occupies-layout-spacechanges. This prevents the edited block and caret from moving while the IME is still animating.The root Compose host also detects the start of an IME hide animation with
WindowInsetsAnimationCompatand notifies the focused outliner editor immediately. The editor keeps an animated-inset watcher as a fallback for hosts/tests without that signal, replacing the previous visibility-plus-300ms path that reached the core only near the end of the keyboard transition. Before closing editing it flushes pending input after structural handoff reconciliation, and it abandons a stale dismissal if the IME rises again during quick reopening or a canceled Back preview.Added an Android regression test covering the stable outliner viewport invariant.
Evidence
Final end-to-end validation at
39b23a37:Android Back before:
Android Back after:
Toolbar Hide keyboard after:
Validation
python3 scripts/test-android-jni-boundary.py: passpython3 scripts/test-android-native-packaging.py: pass./gradlew -PlogseqAndroidAbi=x86_64 :app:testDebugUnitTest: passAndroidEditorKeyboardTest: 32/32 passAndroidOutlinerToolbarTest#editorChromeDoesNotResizeTheOutlinerViewport: pass39b23a37: rapid input before Android Back persisted, the edited block position stayed stable, bottom tabs returned during both IME dismissal animations, quick reopening worked after both paths, and Enter immediately followed by Back completed without visible text loss.Shared core files were unchanged in the final diff, so
dune build @shared/native/runtestwas not required.Not verified: the PERFORMANCE.md release-device comparison on a representative large graph with RTC active. Validation here used the API 36 emulator with a debug build and a small disposable graph; input-loss and transition timing were checked, but release latency/stall measurements remain unverified. Predictive-Back cancellation was covered in implementation logic but not separately gesture-tested.
Known pre-existing test failures
The full
AndroidOutlinerToolbarTestclass still has 2 failures (editorUsesTheNativeFloatingToolbarContainerandanExternalCaretRequestStillUpdatesTheNativeEditor). I ran the same class against the unmodified base revision and it failed with the same 2 assertions, so they are not introduced by this change.Link to Devin session: https://app.devin.ai/sessions/c99e7ff785234cef9c1a3e8ca38fc944
Open in Devin Desktop: https://app.devin.ai/desktop/session/c99e7ff785234cef9c1a3e8ca38fc944?variant=devin
Requested by: @tiensonqin
👀 2 findings for you to triage · Follow Devin's work