Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
1b83a3f
Merge pull request #155 from KometTeam/feature/FullStack
jganenokk Oct 3, 2026
292a826
fix: ВИТАЕМО УЧЕНЬ❤️ МАЛАДiЗ
jganenokk Oct 3, 2026
2211f1a
fix: #161, #159, #160.
jganenokk Oct 3, 2026
a8b17b5
fix/feat/refactor: фиксы #172 #165 #158 и PR #166 (взято не все). Фла…
jganenokk Oct 10, 2026
a16ccdf
fix/refactor/feature: фиксы с @teamkometchat, настройки чата, визуаль…
jganenokk Oct 11, 2026
3b93c9f
PR #173, не взял некоторое.
jganenokk Oct 11, 2026
6587ca1
fix/refactor: я хочу фпс
jganenokk Oct 13, 2026
f587310
feat(ios): App Store-сборка без запрещённых функций и QuickJS, отдель…
klockky Oct 13, 2026
2aa9a3a
fix(ios): переход на UIScene для Xcode 27, flutter_contacts 2.6.0, пе…
klockky Oct 13, 2026
95c5a52
feat/fix/refactor: анимации сообщений, стикеры(избранное, недавнее),…
jganenokk Oct 14, 2026
c82dfd5
Merge remote-tracking branch 'origin/feature/FullStack' into feature/…
klockky Oct 14, 2026
f214a38
Merge pull request #179 from KometTeam/feature/appstore-build
klockky Oct 14, 2026
d85e6be
refactor: переделал некоторые экраны настроек
jganenokk Oct 15, 2026
aba06e4
feat: АААААААААА ЗВОНКИ НЕНАВИЖУ СУКА УБЛЮДКИ НЕНАВИЖУ ЗАПРОСИ ЕБАЛО …
jganenokk Oct 15, 2026
f508ed0
feat: в африке воду дали
jganenokk Oct 15, 2026
febb91a
feat/fix: #185 #184 #175 drag&drop, подпись с композера, ярлыки, и ог…
jganenokk Oct 16, 2026
c63bb0b
feat: настройки и добавление стикерпаков
jganenokk Oct 17, 2026
9368d52
feat: групповые звонки нахуй наф*к😎, просмотр трансляции видео как в …
jganenokk Oct 18, 2026
90bba13
feat: импорт контактов с телефонной кНИжГИ
jganenokk Oct 18, 2026
8415b1d
теперь можно посмотреть трансляцию и камеру на фул экран
jganenokk Oct 18, 2026
d8d1abc
feat/fix: теперь сохраняется прогресс пролистывания чата, фикс того ч…
jganenokk Oct 18, 2026
714961f
feat: можно перевести денежные средства
jganenokk Oct 18, 2026
e075c47
fix: жалобы с чата и личные замечания, отступы, имена файлов, и клави…
jganenokk Oct 26, 2026
a383226
fix: #191
jganenokk Oct 26, 2026
119c703
ой
jganenokk Oct 27, 2026
5c4e398
фикс пк миграции при ошибках
jganenokk Oct 27, 2026
c7f3ccb
#192 возможность редактировать фотки, + пофиксил что пересланные сооб…
jganenokk Oct 28, 2026
7483cfd
страницы памяти 16КБ
jganenokk Oct 28, 2026
709a726
#194
jganenokk Oct 29, 2026
8f1e4ee
Показ сессий iPhone/iPad как iOS
klockky Oct 30, 2026
07cf324
Подмена iOS в сессиях только на iOS
klockky Oct 30, 2026
62463cb
фиксы, и нормальная работа с историями.
jganenokk Oct 30, 2026
5e8de35
поднял версию до 0.5.23
jganenokk Oct 30, 2026
4725f5a
еще немного фиксом
jganenokk Oct 31, 2026
a6fb912
управление памятью
jganenokk Oct 31, 2026
f47047c
whats added?
jganenokk Oct 31, 2026
7f3c72a
Проверка ссылок + #195
jganenokk Nov 1, 2026
2527a82
feat/fix: каналы: посты и рекомендуемые каналы. Новые обои и переделк…
jganenokk Nov 2, 2026
3e05099
fix(ci): тесты PerChatJsonStore, Windows и Linux сборки
jganenokk Nov 2, 2026
bddf15e
Feature/full stack (#197)
klockky Nov 2, 2026
5217862
fix(ci): пин flutter_webrtc на 5efd594 вместо осиротевшего cba2d1d (#…
jganenokk Nov 3, 2026
90ca7c0
(экспер.) Вход для иностранных номеров
jganenokk Nov 3, 2026
7f8bec8
fix(ci): вебртс теперь публичный, убрал токен из воркфлоу и override …
jganenokk Nov 3, 2026
947f567
Merge branch 'dev/0.5.0' into feature/FullStack
jganenokk Nov 3, 2026
255b273
ci: джоба git-pins, падает если пин в pubspec.lock мертвый
jganenokk Nov 3, 2026
2237178
fix(ios): подпись App Store entitlements приложения, а не шаблонами и…
klockky Nov 5, 2026
faf7ca5
fix(auth): restore account id for review login
nyakokitsu Nov 6, 2026
e8d25e0
fix(ios): complete App Store metadata
nyakokitsu Nov 6, 2026
27af112
fix(audio): open downloaded tracks with metadata
nyakokitsu Nov 7, 2026
449aec2
fix(audio): satisfy analyzer guards
nyakokitsu Nov 7, 2026
44d70e3
test(audio): isolate metadata dependencies
nyakokitsu Nov 7, 2026
dbd7c2d
test(audio): inject cache resolution
nyakokitsu Nov 7, 2026
37c4031
fix(audio): avoid file probe before playback
nyakokitsu Nov 7, 2026
15263d7
fix/feat/refactor: фиксы #202 #203 #204, повторная отправка, ответы н…
jganenokk Nov 7, 2026
5922f68
feat(audio): show cached metadata in file bubbles
nyakokitsu Nov 7, 2026
436ce93
test(audio): bound bubble metadata rendering
nyakokitsu Nov 7, 2026
c7d20a9
fix(messages): separate retry actions for failed sends
nyakokitsu Nov 7, 2026
3b53054
test(messages): satisfy analyzer
nyakokitsu Nov 7, 2026
de8b4e4
fix(messages): avoid reaction init for failed rows
nyakokitsu Nov 7, 2026
0825d29
fix(calls): request microphone permission before joining
nyakokitsu Nov 7, 2026
efa3bc9
групповые звонки
jganenokk Nov 7, 2026
67c676f
feat(stories): save and scrub story media
nyakokitsu Nov 7, 2026
157a3e0
feat(chats): add seasonal snow effect
nyakokitsu Nov 7, 2026
22d9a0e
fix(ios): satisfy analyzer null-aware lint
nyakokitsu Nov 7, 2026
40fd44d
refactor(chats): optimize seasonal snow placement
nyakokitsu Nov 7, 2026
65be4ff
fix(chats): update seasonal snow APIs
nyakokitsu Nov 7, 2026
614c35a
refactor(chats): smooth seasonal snow animation
nyakokitsu Nov 14, 2026
a65367a
Merge upstream feature/FullStack into fork
yamixdev Nov 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/build-android-fcm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ on:
- 'pubspec.yaml'
- '.github/workflows/build-android-fcm.yml'

env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.KOMET_DEPS_TOKEN }}@github.com/KometTeam/flutter-webrtc.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/KometTeam/flutter-webrtc

jobs:
build-android-fcm:
runs-on: ubuntu-latest
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/build-android-play.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ name: Build Android (Google Play)
on:
workflow_dispatch:

env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.KOMET_DEPS_TOKEN }}@github.com/KometTeam/flutter-webrtc.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/KometTeam/flutter-webrtc

jobs:
build-play:
runs-on: ubuntu-latest
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ on:
- 'pubspec.yaml'
- '.github/workflows/build-android.yml'

env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.KOMET_DEPS_TOKEN }}@github.com/KometTeam/flutter-webrtc.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/KometTeam/flutter-webrtc

jobs:
build-android:
runs-on: ubuntu-latest
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/build-ios-appstore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'lib/**'
- 'scripts/build_ios_share.sh'
- 'scripts/sign_ios_appstore.py'
- 'scripts/validate_ios_appstore_metadata.py'
- 'native/komet_share/**'
- 'native/komet_tlottie/**'
- 'native/crypto-core'
Expand All @@ -26,6 +27,7 @@ on:
- 'lib/**'
- 'scripts/build_ios_share.sh'
- 'scripts/sign_ios_appstore.py'
- 'scripts/validate_ios_appstore_metadata.py'
- 'native/komet_share/**'
- 'native/komet_tlottie/**'
- 'native/crypto-core'
Expand All @@ -39,9 +41,6 @@ on:
- '.github/actions/pin-kolibri-crates/**'

env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.KOMET_DEPS_TOKEN }}@github.com/KometTeam/flutter-webrtc.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/KometTeam/flutter-webrtc
FLUTTER_VERSION: '3.47.0'

jobs:
Expand Down Expand Up @@ -84,6 +83,9 @@ jobs:
- name: Pin kolibri crates
uses: ./.github/actions/pin-kolibri-crates

- name: Validate App Store metadata
run: python3 scripts/validate_ios_appstore_metadata.py

# Схема max:// принадлежит официальному приложению MAX, App Store-сборка её не заявляет
- name: Drop the max URL scheme
run: |
Expand All @@ -101,8 +103,8 @@ jobs:
- name: Build App Store variant (no codesign)
env:
KOMET_APPSTORE_BUILD: 'true'
KOMET_REVIEW_PHONE: ${{ secrets.KOMET_REVIEW_PHONE }}
KOMET_REVIEW_PAYLOAD: ${{ secrets.KOMET_REVIEW_PAYLOAD }}
KOMET_REVIEW_PHONE: ${{ secrets.KOMET_REVIEW_PHONE_IOS }}
KOMET_REVIEW_PAYLOAD: ${{ secrets.KOMET_REVIEW_PAYLOAD_IOS }}
run: |
flutter config --no-enable-swift-package-manager
flutter build ios --release --no-codesign -v \
Expand Down Expand Up @@ -195,11 +197,15 @@ jobs:
args=(
build/ios/iphoneos/Runner.app
--app-profile "$RUNNER_TEMP/appstore.mobileprovision"
--app-entitlements ios/Runner/Runner.entitlements
--identity "$IDENTITY"
--keychain "$KEYCHAIN_PATH"
)
if [ -f "$RUNNER_TEMP/appstore-share.mobileprovision" ]; then
args+=(--share-profile "$RUNNER_TEMP/appstore-share.mobileprovision")
args+=(
--share-profile "$RUNNER_TEMP/appstore-share.mobileprovision"
--share-entitlements ios/ShareExtension/ShareExtension.entitlements
)
fi
python3 scripts/sign_ios_appstore.py "${args[@]}"

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ on:
- '.github/actions/pin-kolibri-crates/**'

env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.KOMET_DEPS_TOKEN }}@github.com/KometTeam/flutter-webrtc.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/KometTeam/flutter-webrtc
FLUTTER_VERSION: '3.47.0'

jobs:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ on:
- '.github/workflows/build-linux.yml'

env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.KOMET_DEPS_TOKEN }}@github.com/KometTeam/flutter-webrtc.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/KometTeam/flutter-webrtc
FLUTTER_VERSION: '3.47.0'

jobs:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ on:
- '.github/workflows/build-macos.yml'

env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.KOMET_DEPS_TOKEN }}@github.com/KometTeam/flutter-webrtc.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/KometTeam/flutter-webrtc
FLUTTER_VERSION: '3.47.0'

jobs:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ on:
- '.github/workflows/build-windows.yml'

env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.KOMET_DEPS_TOKEN }}@github.com/KometTeam/flutter-webrtc.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/KometTeam/flutter-webrtc
FLUTTER_VERSION: '3.47.0'

jobs:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/flutter-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ on:
branches:
- 'dev/**'

env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.KOMET_DEPS_TOKEN }}@github.com/KometTeam/flutter-webrtc.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/KometTeam/flutter-webrtc

jobs:
analyze-and-build-android:
runs-on: ubuntu-latest
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/flutter-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ on:
branches:
- 'main'

env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.KOMET_DEPS_TOKEN }}@github.com/KometTeam/flutter-webrtc.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/KometTeam/flutter-webrtc

jobs:
android:
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ permissions:
contents: write

env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.KOMET_DEPS_TOKEN }}@github.com/KometTeam/flutter-webrtc.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/KometTeam/flutter-webrtc
FLUTTER_VERSION: '3.47.0'

jobs:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ permissions:
contents: write

env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.KOMET_DEPS_TOKEN }}@github.com/KometTeam/flutter-webrtc.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/KometTeam/flutter-webrtc
FLUTTER_VERSION: '3.47.0'

jobs:
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true

env:
GIT_CONFIG_COUNT: '1'
GIT_CONFIG_KEY_0: url.https://x-access-token:${{ secrets.KOMET_DEPS_TOKEN }}@github.com/KometTeam/flutter-webrtc.insteadOf
GIT_CONFIG_VALUE_0: https://github.com/KometTeam/flutter-webrtc

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -47,6 +42,14 @@ jobs:
- name: Flutter test
run: flutter test

git-pins:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v5
- name: Check git dependencies in pubspec.lock are reachable
run: tool/check_git_pins.sh

share-native:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand Down
90 changes: 83 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,61 @@ thread, and opening the sticker panel froze the app for up to 300 ms.
To run the engine test on the host, build the library with `cargo build --release` in
`native/komet_tlottie/rust` and pass it as `TLOTTIE_LIB`.

## Cache and storage

Settings → Storage (`StorageScreen`) shows what Komet keeps on disk by kind and clears the chosen
kinds. `CacheJanitor` (`lib/core/cache/cache_janitor.dart`) owns three caches: `MediaCache`
(`media_cache/`), the flutter_cache_manager image cache (`<tmp>/libCachedImageData`, which notices
files removed behind its back) and the sticker frames (`tlottie_frames/`, own 256 MB cap). One
budget, `AppCacheLimit` (pref key still `media_cache_limit_bytes`), covers all three together,
and when it is exceeded the least recently used files go first, skipping anything touched in the
last two minutes. Writers report their bytes (`CacheJanitor.noteWrite`) into per-cache totals kept
in memory; a full pass runs only when a total crosses the budget or a cap, or the last measurement
is older than 15 minutes (the image cache grows without telling us). The pass lists and stats the
directories inside `Isolate.run`, so thousands of files cost the UI isolate one message, not one
event per file. Kept media (`keep_*`, already erased on the server) and the database are shown but
never evicted. A `MediaCache` file's kind is read from
its name, so build new names in `media_cache_names.dart` where `mediaCacheKindOf` can see them.

## What's new

Store builds (no self-updater) show «Что нового» once per build from `assets/whats_new/<lang>.txt`.
`WhatsNewDocument` (`lib/core/whats_new/`, plain Dart) parses it; `WhatsNewRunner` plays scenarios.

- Lines without indentation are the notes; `//` lines are comments.
- `[words](#scenario)` makes those words tappable, `… → #scenario` at the end of a line makes the
whole line a tappable row. A link works in place of `#scenario`: `:settings/storage` (a MAX route,
same router as `max.ru/:…`), `max.ru/channel/123`, `https://…`.
- `#name` starts a scenario; its steps follow, indented, one per line, text in `"double quotes"`.

| Step | Does |
|------|------|
| `close` | closes the sheet (any step that navigates closes it first anyway) |
| `tab chats\|calls\|contacts\|settings` | pops to the shell and switches the bottom tab |
| `open <link>` | opens a route or link (`:settings/appearance`, `max.ru/…`, `https://…`) |
| `check <link>` | shows the link check sheet for that address, as a tap on a link in a chat would; opens nothing, whichever button is pressed |
| `back` | pops the current screen |
| `scroll top\|bottom\|<target>` | scrolls the current screen |
| `highlight <target>` | scrolls to the target and pulses it |
| `tap <target>` | scrolls to the target, flashes it and performs its action (opens, expands, switches) |
| `hint <target> "text"` | scrolls to the target and shows `showHintBubble` next to it |
| `notify "text" ["button" #scenario]` | `showCustomNotification`, optionally with an action |
| `wait <ms>` | pauses (0–10000) |
| `run #scenario` | runs another scenario |

A target is a `SpotlightTarget(id: …)` around a widget; ids live in `SpotlightIds`
(`lib/core/whats_new/spotlight_ids.dart`), which is also what the parser checks against. To make a
new element reachable, add its id there and wrap the widget; give it `onActivate` (the same action
as its own tap) and list it in `SpotlightIds.tappable` to let `tap` press it. Toggles that change a
setting stay out of `tappable` — a scenario shows them, never flips them. `open` does not wait for
the opened screen to close (`Navigator.push` completes only on pop); later steps wait for their
target to appear instead. A target not built yet (lower in a
lazy list) is found by scrolling the screen's main list until it mounts. `dart run tool/whats_new.dart`
checks every language and counts characters against Google Play's 500;
`dart run tool/whats_new.dart play ru` prints the Play text without links and comments. The test
`whats_new_document_test.dart` fails on any mistake in the shipped files or when the languages
differ in scenarios or number of notes.

## Keyboard and chat panels

The chat follows Telegram: the composer's bottom is always `max(keyboard, visible sticker panel)`
Expand Down Expand Up @@ -154,19 +209,23 @@ focus only after the keyboard has stayed closed for 250 ms, so a single zero-ins

## WebRTC plugin fork

`flutter_webrtc` is overridden with the private fork `KometTeam/flutter-webrtc` (upstream v1.5.2 +
patches), pinned by commit in `dependency_overrides` in `pubspec.yaml`. To change the plugin, commit
in the fork, push, and bump the `ref`. The patches:
`flutter_webrtc` comes from the public fork `KometTeam/flutter-webrtc` (upstream v1.5.2 + patches),
a git dependency pinned by commit in `dependencies` in `pubspec.yaml` — nothing else depends on the
plugin, so it needs no `dependency_overrides`, and a fresh clone builds without any token. To change
the plugin, commit in the fork, push, and bump the `ref` (then `flutter pub get` to refresh
`pubspec.lock`). The fork's `main` is protected against force-push and deletion, because pub clones
the fork and a commit no branch reaches is missing from a fresh clone (`Could not find a file named
"pubspec.yaml"`), while runs with a warm pub cache keep passing and hide it. CI caches pub
(`cache: true`), so the `git-pins` job in `tests.yml` runs `tool/check_git_pins.sh`: it mirrors
every git dependency of `pubspec.lock` the way pub does and fails when the `resolved-ref` is in no
branch or tag. The patches:

- desktop camera open/close and `getStats` run on background threads — libwebrtc does both through
`Thread::BlockingCall` on its worker thread, and on Linux the window is drawn on the platform
thread, so the UI froze for the 1–2 s a V4L2 camera takes to start;
- `VideoFrameTap` hands the frames of a video track to Dart: raw I420 on Linux/Windows, VP8 encoded
with MediaCodec on Android.

CI fetches the fork with the repo secret `KOMET_DEPS_TOKEN` (read access to the fork): every Flutter
workflow rewrites the fork URL through workflow-level `GIT_CONFIG_*` env.

Call screen sharing follows MAX: in SERVER topology frames travel as VP8/VP9 over SFU data channels,
not as an RTP track — `consumerScreenShare` to send (`ScreenSharePipeline`, libvpx encoder in an
isolate on desktop), `producerScreenShare` to receive (`RemoteScreens`: libvpx → `ui.Image` on
Expand Down Expand Up @@ -199,7 +258,9 @@ number, and `KOMET_REVIEW_PAYLOAD`, a session token encrypted with the app's own
(Argon2id + ChaCha20-Poly1305). The key is derived from `<digits of the phone>:<code>`, so the
payload in the APK is worthless without the pair handed to the reviewer, and neither define is
committed — `build-android-play.yml` reads them from the `KOMET_REVIEW_PHONE` and
`KOMET_REVIEW_PAYLOAD` secrets. Without both defines `ReviewAccess.enabled` is false and the login
`KOMET_REVIEW_PAYLOAD` secrets, `build-ios-appstore.yml` from `KOMET_REVIEW_PHONE_IOS` and
`KOMET_REVIEW_PAYLOAD_IOS`, so each store reviewer gets its own session and revoking one leaves
the other working. Without both defines `ReviewAccess.enabled` is false and the login
screen behaves exactly as before.

Entering the demo number skips `requestCode` and opens `CodeConfirmationScreen.review`, which
Expand All @@ -217,6 +278,21 @@ printf '{"token":"…"}' | dart run tool/review_blob.dart '+7 999 999 99 99' '12
The tool derives the key exactly as `ReviewAccess` does and prints one space-free Cyrillic blob —
that string is the secret's value.

## Login by call (foreign numbers)

The server rarely sends an SMS to a non-Russian number, and the way it confirms one is decided by
the answer to `AUTH_REQUEST` (17), never by the client:

- **`callOutParams` present** (`{trackId, ttl, pollingInterval}`, both in ms): the user calls a
robot. `CallOutConfirmationScreen` polls `AUTH_CHECK_CALL` (294, `{trackId}`) every
`pollingInterval` until `ttl` runs out — `status` 0 no number yet, 1 `callNumber` assigned, 2
passed, 3 timed out. On 2 it sends `AUTH_BY_TRACK` (291, `{trackId}`), whose answer has the
same shape as `AUTH` after a code (`tokenAttrs`, `passwordChallenge`, `presetAvatars`), so 2FA,
registration and login go through the same `VerifiedLoginFlow` as `CodeConfirmationScreen`.
"Refresh number" is a fresh `START_AUTH`.
- **no `callOutParams`**: the code screen as usual, but for a non-`RU` country the server calls
the user and the code is the last 6 digits of the incoming number — the screen says so.

## Architecture

The codebase follows a strict layered architecture:
Expand Down
10 changes: 3 additions & 7 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,8 @@
<service
android:name="com.ryanheise.audioservice.AudioService"
android:foregroundServiceType="mediaPlayback"
android:exported="true"
tools:ignore="Instantiatable">
<intent-filter>
<action android:name="android.media.browse.MediaBrowserService" />
</intent-filter>
</service>
android:exported="false"
tools:ignore="Instantiatable" />
<receiver
android:name="com.ryanheise.audioservice.MediaButtonReceiver"
android:exported="true"
Expand Down Expand Up @@ -174,7 +170,7 @@
tools:node="remove" />
<service
android:name=".CallForegroundService"
android:foregroundServiceType="microphone|mediaProjection"
android:foregroundServiceType="microphone|mediaProjection|mediaPlayback"
android:exported="false" />
<service
android:name=".FkmService"
Expand Down
Loading
Loading