Skip to content

Fix Android editor flicker and layout alignment - #163

Merged
tiensonqin merged 5 commits into
mainfrom
codex/android-editor-menu-polish
Nov 11, 2026
Merged

tiensonqin merged 5 commits into
mainfrom
codex/android-editor-menu-polish

Conversation

@tiensonqin

@tiensonqin tiensonqin commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Switching directly from editing block A to block B briefly rendered A's text in the reused editor. Apply the incoming block identity, title, and caret before drawing its first frame. Keep the source text and caret stable during Enter handoff, including rapid input.

The Android layout changes also center the sign-in label and flashcard completion state, give the encrypted-graph unlock form equal horizontal insets with reachable keyboard actions, and set Favorites and Recent page rows to 48 dp. The layout changes are conditional on the Kotlin host.

Use matching typography for block reading and editing, Logseq's selected menu colors, and a 24 dp page-reference toolbar icon. The delete menu targets the displayed block after its route opens and confirms with Delete block?.

The direct editor-switch, completion-centering, unlock-inset, and sidebar-spacing failures were reproduced before fixing them. Local validation passed 33 Android test cases and all 1,302 OCaml core tests. Android tests cover the first frame of direct editor switching, repeated taps between two blocks while retaining native editor identity, Enter input buffering, text layout, empty-state centering, unlock form insets with the keyboard open, and sidebar row spacing.

Four broader Android checks also fail on main, covering search dismissal, toolbar height, an external caret request, and the long sync-error scroll target. These baseline failures were verified separately.


Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@tiensonqin tiensonqin changed the title Fix Android outliner Enter flicker and toolbar styling Fix Android outliner transitions and control styling Nov 11, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

Devin Review

Comment on lines +423 to +433
val inputTransformation = remember {
InputTransformation {
val boundary = nativeValue.prefix.length
if (boundary > 0) {
if ((0 until changes.changeCount).any { changes.getOriginalRange(it).min < boundary }) {
revertAllChanges()
}
selection = TextRange(selection.start.coerceAtLeast(boundary), selection.end.coerceAtLeast(boundary))
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Prefix guard reverts whole IME batch on boundary edits

The guard in inputTransformation calls revertAllChanges() when any change's original range starts inside the retained prefix. An IME batch that both touches the prefix and inserts new editable text loses the new text too. Normal typing appends past the boundary, so this needs confirmation only for autocorrect or composition that spans the split.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@tiensonqin tiensonqin changed the title Fix Android outliner transitions and control styling Fix Android editor flicker and layout alignment Nov 11, 2026
@tiensonqin
tiensonqin merged commit ccdf3e6 into main Nov 11, 2026
2 checks passed
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