Skip to content

v0.3.17 — уведомления в фоне, иконки по категориям, ответы на вопросы в ленте

Choose a tag to compare

@cfyz1297 cfyz1297 released this 14 Nov 08:39
· 62 commits to main since this release
32c152f

⚠️ Outdated — use v0.3.20. 0.3.17 shipped a wrong fix for the clipped last line: an android:textViewStyle override that Fabric text never used. The real cause was lineHeight.

English

Notifications finally work on a phone in a pocket, and the answered-question card stays where the question was. Two regressions from this cycle were reverted, not patched.

  • Background notifications. React Native pauses its own JS timers when the app leaves the foreground (JavaTimerManager drops the frame callback while isPaused and no headless task is active), so nothing generated notifications and only the SSE replay on resume made them appear. KeepAliveService is now a HeadlessJsTaskService that keeps a headless task alive for the whole run, and the watch polls the server (/api/session/active) instead of local state. Completion, questions and permission requests reach a locked phone.
  • Notification icons. Android draws a small icon as a monochrome mask; expo-notifications falls back to the full-colour app icon (a white square) and can only use one icon per app. Notifications are now posted by a small native module with a vector mask per category: question, error, completed, permission.
  • "Session running" card is gone. The foreground service cancels its own notification right after promotion; the service keeps its foreground state, so the background watch keeps running. The channel is untouched — deleting it crashed the app in 0.3.16, which is fully reverted.
  • Answered questions stay under the message that asked them. The card used to render above the composer, i.e. under the newest answer. V2 form metadata names the message, so the card renders there.
  • Model picker above the keyboard. Opening the picker now dismisses the IME first, like the reasoning-effort picker; the sheet no longer mounts under a keyboard that is already up.
  • Notifications only while the app is in the background, one per finished run, deduplicated between the stream and the poll, dropped if they arrive while the chat is on screen.
  • Settings cleanup. The Notifications section is the OS permission state plus the five switches.

Installs over 0.3.15 — no uninstall needed. CI: 720 tests, typecheck, coverage gate, release-APK checks (permissions, service, signature) and the CUA smoke.

APK SHA256 (opencode-mobile-v2.apk):

11f171061c27f0f3332c5e2ede99b75582a68f5327b93ec76fb413805f8999b7

Русский

Уведомления наконец работают на телефоне в кармане, а карточка отвеченного вопроса остаётся там, где вопрос был задан. Два регресса этого цикла откачены, а не залатаны.

  • Уведомления в фоне. React Native сам останавливает JS-таймеры, когда приложение уходит в фон (JavaTimerManager снимает колбэк кадров, пока isPaused и нет активной headless-задачи), поэтому уведомления не рождались вовсе — их приносил только реплей SSE при открытии. KeepAliveService теперь HeadlessJsTaskService и держит headless-задачу весь прогон, а сторож опрашивает сервер (/api/session/active) вместо локального состояния. Завершение, вопросы и запросы разрешений доходят до заблокированного телефона.
  • Иконки уведомлений. Android рисует small icon как монохромную маску; expo-notifications подставляет полноцветную иконку приложения (белый квадрат) и умеет одну иконку на всё приложение. Теперь уведомления публикует небольшой нативный модуль с векторной маской на категорию: вопрос, ошибка, завершение, разрешение.
  • Карточка «Сессия выполняется» убрана. Foreground-сервис отменяет своё уведомление сразу после промоушена; сервис сохраняет foreground-состояние, поэтому фоновый сторож продолжает работать. Канал не трогается — его удаление роняло приложение в 0.3.16, и та версия откачена целиком.
  • Отвеченный вопрос остаётся под сообщением, которое его задало. Карточка рисовалась над композером, то есть под самым новым ответом. V2-форма называет сообщение, поэтому карточка рендерится там.
  • Выбор модели над клавиатурой. Перед открытием шита клавиатура закрывается — как у выбора усилия; шит больше не монтируется под уже поднятым IME.
  • Уведомления только когда приложение свёрнуто, одно на завершённый прогон, с дедупликацией между потоком и опросом, и выбрасываются, если пришли при открытом чате.
  • Чистка настроек. Раздел «Уведомления» — это статус системного разрешения и пять переключателей.

Ставится поверх 0.3.15 без удаления приложения. CI: 720 тестов, typecheck, порог покрытия, проверки релизного APK (разрешения, сервис, подпись) и CUA smoke.

SHA256 APK (opencode-mobile-v2.apk):

11f171061c27f0f3332c5e2ede99b75582a68f5327b93ec76fb413805f8999b7

⚠️ Устарел — используйте v0.3.20. В 0.3.17 было неверное лечение обрезки последней строки: override android:textViewStyle, который Fabric-текст всё равно не использовал. Настоящая причина — lineHeight.