Skip to content

0.3.22 — the transcript follows the stream

Choose a tag to compare

@cfyz1297 cfyz1297 released this 20 Nov 11:59
· 14 commits to main since this release

⚠️ Устарел — используйте v0.3.23 / Outdated — use v0.3.23: https://github.com/cfyz1297/opencode-v1-v2-mobile/releases/tag/v0.3.23

English

The transcript stays with the answer while it streams. The list was inverted, and an inverted list in React Native grows its newest row upward: every token shifted all existing rows, so the text crawled out from under the reader. Four compensations were built and tried on a device — per-cell height deltas, the newest cell's height, the content's total height, and React Native's own maintainVisibleContentPosition — and none survived a real streaming answer. The transcript is now a plain list: growth happens at the bottom and cannot move text above it. History still loads when you reach the top, with the spinner as its header, and maintainVisibleContentPosition is kept for the one case a plain list still has — an older page inserted above the reader.

Following the answer no longer switches itself off. Auto-follow was recalculated from every scroll sample. Those samples are throttled to 100 ms while a streaming delta grows the content continuously, so each sample carried the offset from before the growth, its distance from the end looked like the reader had scrolled away, and following stayed off for the rest of the session. Following now belongs to gestures: a drag takes it away, and the end of a drag — or of a fling that lands at the bottom — gives it back. A scroll sample never changes it, and a finger lifted with velocity still has momentum ahead, so follow is re-armed at the end of the fling, not at the lift.

The last line of an answer is no longer left below the fold. scrollToEnd aims at the last row's measured frame, and that frame always trails the chunk that just arrived: following stopped a line short and the rest had to be dragged. On Android the scroll now aims past the end and the native ScrollView clips it to the real content bottom, so no JavaScript measurement takes part.

Sending a message, the keyboard or a banner no longer pushes the text out of view. The composer, the "Working…" row, banners and the keyboard all change the list height mid-run, and the offset stayed where it was — the newest line went under the fold, or empty space appeared below the text. While you are at the bottom, the list now lands on the end again after a real size change; a reader up in the history is not moved.

A reloaded transcript opens at the newest message. Coming back from a subagent session remounted the list at offset 0, which in a plain list is the oldest row, and the mounting offset read as "the reader scrolled away" — the conversation opened at its beginning. A reload now counts as a fresh open: hidden until it reaches the end.

Selecting text no longer scrolls the transcript. Android's ScrollView scrolls a focused child into view, and a selectable <Text> takes focus on long-press, so holding a word in an answer yanked the whole transcript up or down. The list no longer scrolls to a focused child; selection and its handles work as before.

The message navigator follows the plain list. The counter counts from the oldest message, a jump aligns its message to the top edge, and a transcript whose rows are not laid out yet starts at the newest message instead of index 0 — which after the flip is the oldest.

APK

  • opencode-mobile-v2.apk — 97.9 MiB, versionCode 87, signed with the permanent release key (installs over 0.3.21)
  • SHA256: ae055ea3a59c6f1804d43bfd5be6ffbc938d5448c1af38a3ee6dc1eb290f6187

849 unit and integration tests are green, and the Android CUA smoke on an emulator drives the transcript, the navigator and the tunnel wizard on Android 15.


Русский

Лента не уезжает от ответа, пока он печатается. Список был инвертированным, а в React Native инвертированная лента растит новую строку вверх: каждый токен сдвигал все строки, и текст выползал из-под читающего. Четыре компенсации были написаны и проверены на устройстве — дельты высот ячеек, высота самой новой ячейки, общая высота контента и нативный maintainVisibleContentPosition — и ни одна не выдержала реального стриминга. Теперь лента обычная: рост идёт вниз и не может сдвинуть текст выше. История по-прежнему подгружается у верхней кромки, спиннер стоит её заголовком, а maintainVisibleContentPosition оставлен ровно для одного случая, который остаётся и в обычной ленте, — вставки старой страницы над читателем.

Слежение за ответом больше не выключается само. Автослежение пересчитывалось по каждому событию прокрутки. Эти события приходят не чаще раза в 100 мс, а стриминговая дельта растит контент непрерывно: событие несло смещение до прироста, расстояние до конца выглядело как «читатель ушёл», и слежение выключалось до конца сессии. Теперь слежение принадлежит жестам: перетаскивание его забирает, конец перетаскивания — или инерции, доехавшей до низа, — возвращает. Событие прокрутки его не меняет, а палец, отпущенный со скоростью, оставляет впереди ещё инерцию, поэтому слежение возвращается в конце флайта, а не в момент отпускания.

Последняя строка ответа больше не остаётся за краем. scrollToEnd целится в измеренную рамку последней строки, а она всегда отстаёт от только что пришедшего куска: лента замирала на строку выше, и остаток приходилось дотягивать вручную. На Android прокрутка теперь целится за конец, а нативный ScrollView обрезает её до реального низа контента, так что измерение в JS не участвует вовсе.

Отправка сообщения, клавиатура и баннеры больше не выталкивают текст за экран. Композер, строка «Работаю…», баннеры и клавиатура меняют высоту списка прямо во время прогона, а смещение оставалось прежним — новая строка уходила ниже кромки или под текстом появлялась пустота. Пока вы внизу, список после реального изменения размера заново встаёт на конец; читателя, ушедшего в историю, это не трогает.

Перезагруженная лента открывается на самом новом сообщении. Возврат из дочерней сессии перемонтировал список на смещение 0, а в обычной ленте это самая старая строка, и смещение при монтировании читалось как «читатель ушёл» — переписка открывалась с начала. Теперь перезагрузка считается свежим открытием: лента скрыта, пока не доедет до конца.

Выделение текста больше не прокручивает ленту. Android прокручивает ScrollView к получившему фокус дочернему элементу, а выделяемый <Text> забирает фокус при долгом нажатии, поэтому удержание слова в ответе сдёргивало всю переписку вверх или вниз. Список больше не прокручивает к фокусу; выделение и его маркеры работают как раньше.

Навигатор по сообщениям следует за обычной лентой. Счётчик считается от самого старого сообщения, переход выравнивает сообщение по верхней кромке, а лента, строки которой ещё не разложены, стартует с самого нового сообщения, а не с индекса 0 — после переворота это самое старое.

APK

  • opencode-mobile-v2.apk — 97.9 MiB, versionCode 87, подписан постоянным релизным ключом (ставится поверх 0.3.21)
  • SHA256: ae055ea3a59c6f1804d43bfd5be6ffbc938d5448c1af38a3ee6dc1eb290f6187

849 автотестов зелёные, а Android CUA smoke на эмуляторе прогоняет ленту, навигатор и мастер туннелей на Android 15.