Commit 1adc212
Aligning / upstream update for dev (#442)
* chore: add AGENTS.md with Cursor Cloud specific instructions
* chore: update AGENTS.md with Linux backend build and voice assistant instructions
* minor fixes
* fix: Android app UI improvements, SDK concurrency bug fixes, and LoRA download support
Android App:
- Redesign intro screen with minimal layout and linear progress bar
- Improve VLM screen: use shared ModelRequiredOverlay, theme-consistent colors,
fix button clipping (replace IconButton with clickable Column)
- Fix keyboard handling: hide bottom bar when keyboard open, apply imePadding correctly
- Add scrollable auto-scroll prompt suggestions in ChatScreen
- Add shimmer typing indicator with "Thinking..." label
- Fix 9 app-level bugs: think tag leak, CancellationException handling,
VoiceAssistant lifecycle, ConversationStore ANR, TTS sample rate parsing,
LoRA download mutex deadlock
KMP SDK (10 bug fixes):
- Fix cancel() deadlock: move JNI calls outside synchronized(lock) in CppBridgeLLM
- Fix orphaned CoroutineScope leak in generateStream using callbackFlow
- Fix initializeServices() holding lock across network I/O
- Fix loraDownloadDir lazy val caching wrong path before pathProvider set
- Fix setBaseDirCallback TOCTOU race condition
- Add @volatile to DownloadTask mutable fields for thread visibility
- Fix unescapeJson() replacement order (process \\\\ before \\n)
- Add downloadLock for atomic cancel/pause/resume operations
- Fix checkNativeLibrary() to actually call native method
- Add ensureServicesReady() to generateStream
- Add LoRA adapter download/delete/path SDK functions
Known issue: Tool-calling may show unexpected behavior when a LoRA adapter is
applied — the model detects the tool call but responds with "I can assist with
this" instead of executing it. Tested with Qwen 2.5 0.5B. This only occurs
when the model has a LoRA adapter loaded.
* fix(tts): scan WAV data chunk instead of hardcoding 44-byte header offset
WAV files with extra chunks (LIST, fact, bext) had metadata bytes fed
into AudioTrack as PCM, causing distorted playback. Now walks the chunk
structure to find the actual "data" chunk start.
* fix: Android app UI bug fixes, responsive dimensions, LoRA example prompts, and darker dark mode
- Fix nested verticalScroll inside LazyColumn (ThinkingToggle) causing broken scroll
- Fix weight(1f) + verticalScroll overflow in VLMScreen DescriptionPanel
- Add verticalScroll to MoreHubScreen to prevent clipping on small screens
- Add imePadding to ConversationListSheet so keyboard doesn't cover search
- Fix auto-scroll wrap logic in EmptyStateView using canScrollForward
- Replace collectAsState with collectAsStateWithLifecycle in 3 screens
- Replace deprecated STTMode.values() with .entries
- Replace hardcoded Color.Gray with AppColors.statusGray for dark mode contrast
- Remove redundant Color.White inside buttons with contentColor set
- Replace hardcoded 300.dp bubble width with responsive Dimensions.messageBubbleMaxWidth
- Add accessibility semantics role to VLMScreen clickable Column
- Disable Image Generation card (placeholder feature)
- Add responsive rDp/rSp utilities and convert Dimensions/AppSpacing to use them
- Add LoRA example prompts with copy button to adapter picker and manager screens
- Darken dark mode background colors
* fix: Android app bug fixes - race conditions, ANR, pixel corruption, scroll, and memory safety
- VoiceAssistantViewModel: replace runBlocking with GlobalScope.launch in onCleared to prevent ANR
- VoiceAssistantViewModel: add synchronized audioBufferLock for thread-safe ByteArrayOutputStream access
- VoiceAssistantViewModel: scan WAV data chunk instead of hardcoding 44-byte header offset
- ConversationStore: use MutableStateFlow.update {} for atomic compare-and-set on all mutations
- ToolSettingsViewModel: clear static singleton in onCleared to prevent stale references
- VLMViewModel: advance rgbIdx by 3 in else branch to prevent pixel corruption on out-of-bounds skip
- ChatViewModel: use CopyOnWriteArrayList for tokensPerSecondHistory thread safety
- VoiceAssistantParticleView: remove wasted transparent drawPoints call
- RunAnywhereApplication: capture volatile initializationError to local val before null check
- VLMScreen: add verticalScroll to description panel for long text overflow
- ResponsiveUtils: add designWidth <= 0 guard to prevent division by zero in rDp/rSp
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Sanchit Monga <sanchitmonga22@gmail.com>
Co-authored-by: Sanchit Monga <sm3468@g.rit.edu>
Co-authored-by: Siddhesh2377 <siddheshsonar2377@gmail.com>
Co-authored-by: RunAnywhere <>1 parent 9e4f2df commit 1adc212
36 files changed
Lines changed: 1664 additions & 1235 deletions
File tree
- examples/android/RunAnywhereAI/app/src/main
- java/com/runanywhere/runanywhereai
- data
- presentation
- chat
- common
- lora
- rag
- settings
- stt
- tts
- vision
- voice
- ui/theme
- sdk/runanywhere-kotlin/src
- commonMain/kotlin/com/runanywhere/sdk/public/extensions
- jvmAndroidMain/kotlin/com/runanywhere/sdk
- foundation/bridge
- extensions
- public/extensions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
214 | | - | |
215 | | - | |
| 215 | + | |
| 216 | + | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| |||
Lines changed: 43 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| 15 | + | |
| 16 | + | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
| |||
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| 50 | + | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| |||
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
56 | | - | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 83 | + | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| |||
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
97 | 103 | | |
| 104 | + | |
98 | 105 | | |
99 | 106 | | |
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
112 | 122 | | |
113 | 123 | | |
114 | 124 | | |
115 | | - | |
116 | 125 | | |
117 | 126 | | |
118 | 127 | | |
| |||
121 | 130 | | |
122 | 131 | | |
123 | 132 | | |
124 | | - | |
| 133 | + | |
125 | 134 | | |
126 | 135 | | |
127 | 136 | | |
128 | 137 | | |
129 | 138 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
134 | 145 | | |
135 | 146 | | |
136 | 147 | | |
| |||
176 | 187 | | |
177 | 188 | | |
178 | 189 | | |
179 | | - | |
180 | | - | |
181 | | - | |
| 190 | + | |
182 | 191 | | |
183 | 192 | | |
184 | 193 | | |
| |||
246 | 255 | | |
247 | 256 | | |
248 | 257 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
255 | 266 | | |
256 | 267 | | |
257 | 268 | | |
| |||
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
Lines changed: 32 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
0 commit comments