18 Commits
Author SHA1 Message Date
vhaudiquet 13da540ce5 fix(android): stop asking a turn card for intrinsic height
android / debug (push) Successful in 2m52s
ci / test (push) Successful in 1m7s
ci / chart (push) Successful in 6s
ci / docker (push) Successful in 2m1s
ci / web (push) Successful in 13s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 2m4s
android / release (push) Successful in 2m25s
ci / checks (push) Successful in 2m44s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 9s
ci / publish-edge-chart (push) Successful in 5s
An agent reply carrying a markdown table killed the chat screen: the
agent turn's Row was measured at IntrinsicSize.Min so its accent bar
could span the card, and the table renderer's wide variant is a
SubcomposeLayout, which throws when asked for intrinsics. Draw the 2 dp
bar behind the row instead and let the card take its height from its
content.

The web session's transcript carries such a table, so opening it crashed
before the first frame.
2026-12-02 12:05:25 +01:00
vhaudiquet 57569b6b56 fix(android): stop the history walk on an empty page
android / debug (push) Successful in 2m15s
android / release (push) Successful in 2m9s
ci / checks (push) Successful in 2m56s
ci / test (push) Successful in 1m8s
ci / chart (push) Successful in 6s
ci / docker (push) Successful in 1m57s
ci / web (push) Successful in 13s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 1m59s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 15s
ci / publish-edge-chart (push) Successful in 4s
loadOlder returned as soon as a page held no events, before clearing moreOlder. The screen kept thinking older turns existed and asked again each time the list settled. Against the mock claw, opening a session with no cached transcript sent six /history requests where one was enough.

An empty page clears moreOlder now, even when the response's more flag says otherwise. With no event to move oldestSeq, another request would only repeat the same empty answer.

assembleDebug passes; the same session sends one history request.
2026-12-02 11:40:04 +01:00
vhaudiquet 30b5e0f721 fix(android): read the location callback's answer as nullable
The fresh-fix request declared its callback parameter as non-null, but LocationManager answers with null when no provider has a fix. Kotlin's generated check threw on the main executor before the fallback could run, so the crash escaped PhoneStatusWorker's catch and killed the process when the app came to the foreground.

The callback takes Location? now. A null answer resumes the coroutine with null, which currentFix already treats as no fix and answers with lastKnownFix.

assembleDebug passes; a status run on the emulator completed without the process dying.
2026-12-02 11:39:55 +01:00
vhaudiquet 4710f783c7 fix(android): state why a turn failed
android / debug (push) Successful in 2m22s
android / release (push) Canceled after 1m4s
ci / test (push) Canceled after 0s
ci / chart (push) Canceled after 0s
ci / docker (push) Canceled after 0s
ci / web (push) Canceled after 0s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Canceled after 0s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Canceled after 0s
ci / publish-edge-chart (push) Canceled after 0s
ci / checks (push) Canceled after 5s
The phone's outcome tag printed the word and nothing else: a failed
turn read as "failed" with the provider's error nowhere on screen,
though the claw has carried the reason on turn_done since the web
client started showing it.

TurnDone decodes the field and the transcript item keeps it; the tag
renders it under the word in mono, wrapped whole, on the quiet surface
with the solid left rule the web block draws.

assembleDebug passes; the app was exercised on an API 36 emulator
against a claw serving a failed turn.
2026-12-02 11:39:26 +01:00
vhaudiquet 6f68ec6a22 fix(android): name the human on their own chat rows
ci / checks (push) Canceled after 0s
ci / test (push) Canceled after 0s
ci / chart (push) Canceled after 0s
ci / docker (push) Canceled after 0s
ci / web (push) Canceled after 0s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Canceled after 0s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Canceled after 0s
ci / publish-edge-chart (push) Canceled after 0s
android / debug (push) Canceled after 0s
android / release (push) Canceled after 0s
The transcript said "you" under a bare initial on the reader's rows
while their name sat unused in GET /v1/user: the phone never fetched
the profile, so a name and picture set on the web survived only there.

UserProfile and UserProfileRepository cache the document and the
avatar bytes in DataStore beside the agent's identity, refreshed on app
open, on the sessions screen's refresh, and when a turn settles —
onboarding sets the profile mid-conversation. The bytes are fetched
only while the cache has none, so a turn-end refresh does not re-download
the picture; the profile carries presence, not a version, and the web
client makes the same trade.

ChatScreen reads that cache: the name takes the author slot and the
picture fills the 24 dp circle, with "you" only until a name is set. A
dispatch row keeps its own label and initial.

compileDebugKotlin passes.
2026-12-02 11:38:05 +01:00
vhaudiquet ec52ae90b2 feat(android): restyle the app after the web client
android / debug (push) Successful in 2m21s
ci / checks (push) Successful in 3m19s
ci / test (push) Successful in 1m17s
ci / chart (push) Successful in 6s
android / release (push) Successful in 2m19s
ci / docker (push) Successful in 2m2s
ci / web (push) Successful in 15s
ci / publish-edge-images (deploy/docker/claw.Dockerfile, rhema-claw) (push) Successful in 2m9s
ci / publish-edge-images (deploy/docker/ui.Dockerfile, rhema-claw-ui) (push) Successful in 28s
ci / publish-edge-chart (push) Successful in 4s
The phone still wore the old dark-shell language while the web client
had moved to the warmer, quieter one: purple-tinted neutrals, neon jade
on near-black, state drawn as colored pills and chips, cards floating
on drop shadows. The two surfaces of one claw no longer read as one
product.

Theme.kt now carries the web palette as a RhemaColors bundle of tokens
(warm paper in light, near-black with a mint accent in dark), picked
from the OS dark mode, with a matching splash and status bars. Hairline
borders replace shadows; corners settle at 12dp with pill buttons.

Components.kt redoes the shared voice: RhemaCard with its header
divider, AppCallout with the colored left bar, StatusWord as a bare
tinted word, RhemaTag as a quiet mono badge, and RhemaButton, RhemaField,
and RhemaSelect as strong-border outlines with mono timestamps.

ChatScreen renders the transcript the way the web does: left-aligned
user rows with small circular initial avatars, agent turns as surface
cards with the jade left bar and the outcome word, deltas folded into
the turn instead of separate tool and thinking cards, a Working row
while a turn streams. Sessions, Diagnostics, Settings, and Devices
follow: state words instead of chips, faint section labels, quiet nav
rows.

assembleDebug passes; the app was exercised against the mock claw on an
API 36 emulator in light and OS-forced dark.
2026-12-01 20:18:02 +01:00
vhaudiquet 1b85cd8937 feat(claw): provision the workspace git identity at boot
Every forge thread works in a per-thread workspace, and implementer
turns end in commits. git commit refuses to run without user.name and
user.email, and a fresh workspace carries no gitconfig: the first
commit on a fresh image fails, or succeeds with whatever the agent
improvised. The agent commits as itself — its own name and address,
never the user's, never inferred from whatever accounts happen to
exist.

The identity store gains an email field beside the name, so what
onboarding collects with identity_set and the Agent · General page
edits is what commits carry. The config gains an optional git
section, an operator's override. Each field resolves independently:
config, then identity, then defaults (claw, claw@hostname).

The resolved pair is written into the daemon user's global git config
at boot, in both run shapes — a cron pass commits too. The write is
guarded: the settings store remembers the last pair the daemon wrote,
and boot rewrites a field only when the config still holds that pair
or nothing. A value anyone else set wins outright; the daemon is a
tenant of its user's machine, not the owner of its git config.

Provisioning runs from the binary's boot, not daemon assembly, so the
tests that build daemons never touch a real gitconfig. An ssh sandbox
runs git on another host and stays unprovisioned — a later story.

The web UI gains an Email row on Agent · General; the phone's wire
model gains the optional field.
2026-11-22 11:53:15 +01:00
vhaudiquet d4758131fc feat(android): render chips from the span record, not the mark scan
The phone was the last surface reading chips as paired U+FFFC marks
in the text: a web user's staged paste rendered as its raw payload
inline, and the mark scan stayed the only parse. Now the row's chip
record does the work. `user_message`'s `pastes` spans parse beside the
text (the session annotation's own shape, absent on every row that
predates it), the controller carries them through the fold's dedupe
guard, and the render slices each chip out of the plain text at the
record's UTF-8 offsets — one walk maps every character boundary, so
a surrogate-heavy draft still lands exactly and a span that splits a
character skips whole rather than cutting one in half. A row without
a record still scans the mark form, exactly as before.

The composer still sends plain text only — this is the read side; the
phone never staged text chips even in the mark era.

Verified as CI does (assembleDebug, lintDebug) plus a JVM harness
running the verbatim slicing code against the daemon's own e2e record
numbers, surrogates and seams included.
2026-11-20 01:18:49 +01:00
vhaudiquet fa0e3d4470 feat(android): resume from the seq, and walk back through the session
The chat screen asked the claw for everything the cache did not hold by
counting events, and a session that ran for weeks cost the whole record
the first time it opened here. The stream now names each frame's seq and
the cache stores it, so a reopening screen sends since=<seq> and receives
only the gap. The cache migrates in place: the old count of events is
exactly the last seq plus one, because the record numbers densely.

A screen with no cache opens on the newest turn and walks back through
the new history route when the reader reaches the top, one whole turn
per page, so the phone does not hold a weeks-long transcript to show the
last few messages. Pages are folded through the same reducer the stream
uses and prepended, since the list runs oldest first: appended, they
would land at the newest end. A reset comment (the record no longer
holds the cursor) drops the mirror, and the tail that follows rebuilds
it. The outcome tag colours a steered turn as an accent rather than a
failure, matching the web UI.
2026-11-08 18:01:52 +01:00
kosmos 6ae21568d0 fix(android): gate the wifi read on ACCESS_WIFI_STATE, and declare it
Reported from the phone's diag log:

  status: crashed: SecurityException: WifiService: Neither user 10519 nor
  current process has android.permission.ACCESS_WIFI_STATE.
  at android.os.Parcel.createExceptionOrNull

`PhoneSensors.wifiSsid` read `WifiManager.connectionInfo` behind nothing
but the location grant, but WifiService gates every WifiManager call on
ACCESS_WIFI_STATE — and it enforces that by throwing SecurityException,
not by answering null. The permission was never declared, so the read
always threw.

The cost is larger than the missing SSID: the throw travels out of
`readSnapshot` into the worker's catch, which logs "status: crashed" and
returns failure — so one undeclared permission took the battery, network,
DND and location topics down with it, and the fleet's rows went stale
while the app looked healthy.

Two halves, both needed:

- the manifest declares ACCESS_WIFI_STATE (a normal permission: declaring
  it is the whole grant, no runtime prompt). An install that predates the
  line keeps the grant set it was installed with, so this alone does not
  stop the crash on an existing phone;
- `wifiSsid` returns null unless the permission is actually held, and
  wraps the read in `runCatching`, so the status report degrades to "no
  wifi name" instead of dying whole. The check is a `hasWifiState` beside
  the existing `hasLocation`, same idiom.
2026-11-08 17:54:15 +01:00
kosmos 9e132fdf71 fix(claw): read a blank since as unset instead of failing the request
The phone's notification poll sent `since` unconditionally, and before
the first ack there is no cursor at all, so it went out as `?since=`.
Axum's `Query` hands a present-but-empty parameter through as an empty
string, and `Option<i64>` only forgives a *missing* key, so the whole
poll answered `400 Failed to deserialize query string: since: cannot
parse integer from empty string` and the phone showed an error instead
of an empty queue.

Both ends: the client omits `since` unless it has a positive id to send,
and a `blank_as_none` deserializer makes a blank value mean "not set"
for `NotificationQuery` and `EventStreamQuery` alike — an empty `since`
reads as "from the start" however it got there.
2026-11-06 20:39:53 +00:00
vhaudiquet 1467f98c96 docs: the phone reports are state, not conversation
The claw README claimed the phone ingest dispatches battery, network,
and DND flips to the agent; the ingest door stores topic-keyed
payloads and answers "observed", and the Android worker posts nothing
but topic keys. The README now says state-only with the bare
phone:<device> key as the dispatch path, and the worker's comment
matches what it actually posts.
2026-11-05 19:12:18 +01:00
vhaudiquet 43d4c86d5e feat(android): attach photos and camera shots
The (+) door stages gallery picks and camera shots as removable
chips against the daemon's own budget (eight a message, 5 MiB
decoded each, refusals surfaced, never silent drops); send reads
the files back as bare base64, the old {"text"} body unchanged
when there are none. Sent rows preview their staged files at once
and a replay fetches by attachment id like any attachment card.
Model options carry the vision badge only when the listing knows.
2026-10-26 23:34:41 -05:00
vhaudiquet 5e9952ac6d fix(android): a worker crash lands in the log instead of dying silent
The diagnostics page showed the status job "waiting" while its runs
and the report-now kick died without a trace: any exception before the
first log line was invisible, indistinguishable from a job that never
starts. Every worker now wraps its run — a crash logs its type, message,
and first frame; a cancellation logs as such and rethrows. The screen
gains the report-now kick's own row (a one-time job's empty list is
"never run", not an error) and the tap lands in the log, so the next
stale-row mystery names its cause instead of hiding it.
2026-10-25 19:18:13 +02:00
vhaudiquet 7225dfddd3 feat(android): a diagnostics page answers why the fleet row is stale
A stale "last seen" had no client-side answer: a dead worker, a down
claw, and a claw that drops writes all looked identical from the
settings screen. The new page separates them: the WorkManager jobs'
live state (a cancelled schedule renders as "not scheduled"), the two
clocks — the phone's last landed report against the claw's last stamp
— whose disagreement names the broken end, auto-detected system checks
(battery optimization, background restriction, notifications) with
jumps into the exact settings page, a report-now kick, and a 200-line
in-memory flight recorder where every worker run logs its outcome.
2026-10-25 10:28:38 +02:00
vhaudiquet da483daadd fix(android): let the schedule carry a failed report, not backoff
A failed post returns retry(), which moves the next run onto
WorkManager's exponential backoff — 30s doubling, capped at five hours.
A couple of failures while the claw is unreachable is enough to leave
the fleet without a report for most of a day, which reads exactly like
the phone being gone.

The snapshot is only saved when every post landed, so the next
scheduled run re-derives the whole transition set and posts it again.
The fifteen-minute schedule is the retry; return success and keep it.
2026-10-20 07:40:43 +02:00
vhaudiquet 385788c935 fix(android): refresh the phone's own row when it reports
The fleet card reads last-seen from the claw, and only a landed report
moves it. Periodic work is deferred while the device idles — Doze
stretches the fifteen-minute floor to hours — so a phone sitting in the
human's hand could show itself as "last seen 3h ago" with nothing wrong
on the claw.

Kick a status run on resume, the same way the commands worker already
is, and reload the fleet whenever a run lands. The landed-run signal is
a new clock in StatusRepository, written in the same edit that saves the
snapshot (which only happens once every post of the run succeeded), so
the card reloads on a report that actually reached the claw.
2026-10-20 07:40:43 +02:00
vhaudiquet 81da26b955 feat(rhema-code): add the colors setting with four palettes
The stored `colors` key names a palette — rhema (the default,
Jadeite), aquamarine, black-and-white, or dracula — and the
Appearance page of /settings cycles it live, like the theme and
icon toggles beside it. Each palette carries a dark and a light
appearance under the existing `theme` key; dracula's light side is
derived, the official palette ships only dark.

The appearance decision moves off token comparison: Theme now
answers is_dark() from the ground/text luminance, so palettes
beyond the original two get the right per-profile fallback tones.
2026-10-17 04:28:31 +08:00