Commit aa9ccaf
committed
fix: chat send race condition — pass text directly instead of setInput + setTimeout
The ChatHome onSend handler was setting input state then calling sendMessage()
after 50ms timeout. But sendMessage captured the OLD closure with empty input.
On iOS (slower WKWebView re-renders), the state update hadn't committed yet.
Fix: sendMessage now accepts optional overrideText parameter, and ChatHome
passes text directly. Same fix applied to regenerate handler.1 parent 6104fca commit aa9ccaf
1 file changed
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1189 | 1189 | | |
1190 | 1190 | | |
1191 | 1191 | | |
1192 | | - | |
1193 | | - | |
| 1192 | + | |
| 1193 | + | |
1194 | 1194 | | |
1195 | 1195 | | |
1196 | 1196 | | |
| |||
1938 | 1938 | | |
1939 | 1939 | | |
1940 | 1940 | | |
1941 | | - | |
1942 | | - | |
| 1941 | + | |
1943 | 1942 | | |
1944 | 1943 | | |
1945 | 1944 | | |
| |||
2126 | 2125 | | |
2127 | 2126 | | |
2128 | 2127 | | |
2129 | | - | |
2130 | | - | |
2131 | | - | |
2132 | | - | |
| 2128 | + | |
2133 | 2129 | | |
2134 | 2130 | | |
2135 | 2131 | | |
| |||
0 commit comments