Skip to content

feat(mobile): chats on the phone, PIN lock and release 0.14.0 - #223

Merged
httpsphl merged 14 commits into
mainfrom
feat/mobile-chats
Oct 8, 2026
Merged

httpsphl merged 14 commits into
mainfrom
feat/mobile-chats

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 8, 2026

Copy link
Copy Markdown
Owner

What

The phone (spec 28) can now talk with the bots, and can be locked with a PIN. Version bumped to 0.14.0 (the mobile relay of #222 was merged but never released, so it ships here too).

  • Conversations on the phone (28.12). The daemon sends the list of bots, pages of history (text only, no tool output, 6 KiB cut, split into sealed parts), the open chat's items, the reply as it is written (at most once a second) and list changes; the phone writes through the same messages.send as the app (30 a minute, apart from answers). Reading a chat on the computer (chat.read) clears the new-reply dot on the phone.
  • The PWA. Tabs Requests and Chats; bots grouped by crew with their mascots and crew chips; the chat with live reply, request and question cards inline, and a box that shows what was written at once; the phone's back gesture closes a chat instead of leaving the app; the header and the box stay fixed.
  • PIN lock (28.13). Optional. The session at rest is encrypted under a PBKDF2 key from a 6 to 10 digit PIN; locks a minute after leaving the page; waits grow after 3 wrong tries; the 10th wipes the session.
  • Relay. The computer may send 600 frames a minute (it speaks for every bot), the phone still 60.
  • Warnings (app and phone, three languages) now say that a connected, unlocked phone can read and write to the bots. The earlier idea of refusing messages to bypass_permissions bots is dropped (28.12): the PIN is the owner's protection.
  • Fix, also on the computer: the chat did not follow its end when it grew without a new item (the dots of a bot that starts working); it now does, unless the owner scrolled up.

Spec 28.12, 28.13 and the section 19 row are updated, with the real Android results.

Tested

  • cargo fmt, clippy -D warnings, cargo test (new tests/mobile_chats.rs), pnpm check (553 tests).
  • On a real Android (Chrome, installed as an app) with a real Claude Code bot and the updated server: list, open, write, reply arriving, request inline, new-reply dot, PIN lock, crews, back gesture, the chat following its end.

Manual steps left

  • iPhone/Safari (no device): camera and #, Web Crypto, notices on the Home Screen.
  • The relay connection open for hours behind Cloudflare.
  • The server image must be redeployed for the page and the new relay limit (done for the test).

Records what was seen on a real phone and on the VPS, and what is still open (iPhone, hours of relay, a few cases only tested automatically). Kept local until the next code change goes up.
… CH1)

The phone will read the bots' conversations and send them text. This slice writes the design (what is sealed, what never goes, the rule that a bot in bypass_permissions is only written to at the computer, the limits), the new sealed message types (ChatLine, PhoneItem, chats/history/send/watch and what comes back) with their TypeScript, and raises the relay's frame limit for the computer to 600 a minute, since it speaks for every bot.
Optional, the owner decides; the app only says why. The session is stored encrypted under a PBKDF2 key from the PIN, locks after a minute in the background, waits longer after wrong tries and wipes after ten.
Optional, the owner decides and the page only says why. With a PIN the token, ids, counters and key bytes are kept in an AES-GCM block under a PBKDF2 key, locked a minute after the page leaves the screen, slowed after wrong tries and forgotten after ten. A session made before this cannot take a PIN until connected again. Checked in a real browser: what is stored holds no token, reload opens locked, wrong and right PIN, and the lock after a minute out of sight.
The phone can ask for the list of bots and pages of history (text only, cut at
6 KiB, split into sealed parts), write to a bot through messages.send, watch one
conversation for item/live/state, and hear of list changes through line.

The bypass_permissions send ban is dropped: the PIN lock (28.13) is the owner's
protection, and ChatLine loses canSend. Sends are limited to 30 a minute apart
from answers. Test helpers (setup, connect_phone) move to tests/common.
Tabs Requests and Chats, the list with working/unread marks, the open chat
with history in parts, live reply, inline request and question cards, and a
box that shows what was written at once and swaps it for the real item.
Texts stay in memory; only the last reply seen per bot is kept on the device.
The phone and desktop warnings now say a connected, unlocked phone can read
and write to the bots.
…(spec 28.12)

The list groups bots by crew with their mascots and crew chips; the phone's
back gesture closes a chat or the settings instead of leaving the app; the
chat header and the box stay fixed. Reading a chat on the computer
(chat.read) clears the new-reply dot on the phone.
The chat only scrolled down when its items or the draft changed, so the dots
of a bot that starts working (and cards, images) pushed the end out of view.
It now follows any growth while the owner is at the end, on the computer and
on the phone, and leaves who scrolled up. On the phone the end no longer hides
behind the sticky box.
Settings is no longer a dialog: it is a page (also open before the first
crew) with a search on top and its parts in four groups. The account and the
phones leave Backup for "Account and phone"; Backup keeps the copies in the
cloud (which ask for the account), saving and restoring a file.
@httpsphl
httpsphl enabled auto-merge October 8, 2026 20:38
@httpsphl
httpsphl merged commit 784bed0 into main Oct 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant