You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit af04590
Browse filesBrowse the repository at this point in the historyBrowse files
feat(mobile): queue/send from the keyboard Return key
Fixes#8. Closes#7.
Mobile queueing already worked end-to-end (every send enqueues to the thread
outbox, which sends-when-idle and holds-when-busy; the primary button already
relabels to "Queue" while busy and a queueCount indicator exists). The only gap
was the keyboard: the soft-keyboard Return inserted a newline, and submit was
only wired to hardware Command-Return on iOS (and not at all on Android).
- iOS: intercept a bare "\n" in the shouldChangeText delegate and fire
onComposerSubmit (soft keyboard or hardware Return). Exact single "\n" only,
so a multi-line paste ("a\nb") is unaffected; Command-Return keyCommand intact.
- Android: wire onComposerSubmit for the first time — an onComposerSubmit event,
plus a plain-Enter interception on both the key-event path (onKeyDown) and the
IME commitText path, with Shift+Enter still inserting a newline. Multi-line
input type preserved.
- RN: forward onSubmit -> onComposerSubmit through the Android wrapper (was
dropped); iOS wrapper already forwarded it.
- Composer: Return routes to the existing handleSend (queue-when-busy /
send-when-idle), so queueCount updates the same way as the button. Add a
dedicated "Insert line break" toolbar button (inserts "\n" at the caret via
the same replaceTextRange helper used for @file / skill tokens) as the
cross-platform newline affordance now that Return submits.
- Extract resolveComposerSendLabel as a pure, unit-tested helper.
Trade-off: hardware plain-Return now submits instead of inserting a newline
(matching desktop Enter=submit); the newline button and Shift+Return cover
multiline.
Tests: composerSendLabel (Send/Queue matrix) and replaceTextRange newline cases.
Native keyboard behavior verified on the iOS Simulator; Android soft-keyboard
paths need on-device QA (noted on the PR).
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Copy file name to clipboardExpand all lines: apps/mobile/modules/t3-composer-editor/android/src/main/java/expo/modules/t3composereditor/T3ComposerEditorModule.kt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,7 @@ class T3ComposerEditorModule : Module() {
Copy file name to clipboardExpand all lines: apps/mobile/modules/t3-composer-editor/android/src/main/java/expo/modules/t3composereditor/T3ComposerEditorView.kt
0 commit comments