0
Fork 0
mirror of https://github.com/zeronsh/comet.git synced 2026-11-16 18:57:19 +00:00
Commit graph

6 commits

Author SHA1 Message Date
Sina Khalili
74c68888c2 CI: keep signing and deploy credentials in environments only main and release tags can use
Every secret was repository-level, so anyone with write access could read it
by pushing a branch that edits a workflow (or a build script) and running it.
Jobs that need credentials now take them from GitHub environments whose
deployment-branch policy admits only main (and v* tags for releases):
apple-release, android-release, google-play and cloudflare. Branch, pull
request and merge-queue runs get no environment and fall back to the existing
unsigned/debug paths.

CODEOWNERS now names both owners on .github/, edge/vault/, scripts/ci/, the
release packaging scripts and the Android signing config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 15:23:14 -07:00
copilot-swe-agent[bot]
1e630c8c40
Merge remote-tracking branch 'origin/main' into android/play-testing-release
# Conflicts:
#	apps/android/README.md

Co-authored-by: SinaKhalili <20732540+SinaKhalili@users.noreply.github.com>
2026-11-02 21:58:58 +00:00
Daniel Katulevskiy
2500e8b34f
CI: one entry workflow with admission, reuse, priority/locks and a fast pull request tier (#1077)
* CI: one entry workflow with run admission and a fast pull request tier

Pull request checks took a median of ~3 hours from push to done, and ~110
minutes of that was jobs waiting for a runner. Each push asked for ~207
runner-minutes on 15-20 jobs, almost all of it compiling, so bursts of
pushes queued hundreds of jobs and every run held a few runners while the
rest of its jobs waited behind other runs.

- ci.yml is the only pull request / main / merge queue entry point. `plan`
  picks the suites a change needs; `admit` waits until every runner the
  run needs is free, then all its jobs start together and each runner is
  released when its job ends (scripts/ci/admit.py, first come first served
  with conservative backfilling, state read from the Actions API so fork
  pull requests work). `CI result` is the one check to require.
- Pull requests get a fast tier: Windows, macOS, voice and Android run only
  when the change looks platform specific (their files, platform
  conditionals or APIs in changed code); `ci:full` or CI_PR_TIER=full runs
  everything. Main and the merge queue run the full tier.
- Voice: 14 `cargo test` builds capped at 2 jobs (~40 min) become core-tests
  additions plus one nextest build for audio and the mobile voice core; the
  workflow no longer runs uncancelled on every push or saves caches from
  pull requests.
- Windows: three test jobs become one nextest build; one shared cache
  instead of four (~4.5 GB of the 10 GB repository cache).
- Linux UI and browser share one job and cache; edge coordinator and vault
  share one job; the macOS app is built with the test dependencies instead
  of a `cargo check` that recompiled everything; iOS no longer waits for
  the frame-source job, which only runs when the GPUI pin can change.
- Only main saves Rust caches.

* CI admission: cap reservations read from other runs, expire unseen ones

A pull request can edit its own ci.yml, so the reservation in its admit job
name is untrusted. Cap it at the largest plan.py makes, and stop counting an
admitted run's never-created jobs 90 minutes after admission, so one run
cannot hold more than a full run's runners or hold unused ones for long.

* CI: reuse passes on unchanged inputs; ci:priority, ci:lock and an emergency workflow

Reuse. plan fingerprints every suite's inputs in the tree under test (the
merge with main for pull requests): workspace manifest, lockfile, toolchain,
CI files, the suite's workflow and non-Rust files, and for Rust suites the
packages it tests plus every workspace package they depend on, plus any file
outside those that their sources name with a ../ path (scanned every run).
Every job records its pass in the Actions cache under that fingerprint as its
last step; a suite whose jobs all passed is skipped and reserves nothing, and
single Windows and voice jobs are skipped on their own. Pull requests trust
their own passes and main's; main and the merge queue trust only main's;
ci:full and manual runs reuse nothing. Callers are split per suite so each
records under its own fingerprint.

Priority and locks (labels, so triage or above). ci:priority puts a pull
request's runs at the front of the admission queue; ci:lock keeps a full
run's runners out of everyone else's budget while the pull request is open
(until unlabelled, merged, closed or CI_LOCK_HOURS), and admits its runs
first. Runs name their pull request in the admit job; the claim counts only
when that pull request's head is the run's commit. ci-emergency.yml (write
access) locks a pull request, cancels the other pull requests' CI runs and
re-runs its own if needed.

* CI reuse: fail closed

The merge queue, the last gate before main, reuses nothing. A pull request
that changes a Rust build file no selected suite's fingerprint covers reuses
nothing. Sources that build a path from CARGO_MANIFEST_DIR's parent in code
make their suite read the whole workspace. concat!(.., "/../x") paths and
.cargo/ count as inputs.

* CI result: fix the result listing (shell quoting)

* CI: run less on pull requests, more on schedule, and merge tiny test binaries

Measured in CI, test execution is a small part of every job; compiling and
starting jobs that run little is the cost. So:

- Voice: only the audio stack (zeron-audio, which nothing else builds yet)
  and the packaged Windows media runtime remain, for their own files. The
  mobile voice/orb tests were a subset of ios-core, the macOS/Windows
  `cargo check` of harness+engine duplicated the platform builds, and the
  voice-media tests join the Windows nextest build.
- Fast tier gating of jobs and steps to their own files: Windows packaging
  (`app`), the iOS simulator tests and their bindings, the Linux and macOS
  browser/preview fixtures. Android builds the APK on pull requests for the
  app, the FFI crate and dependency changes; the iOS mobile-core paths come
  from zeron-mobile's Cargo closure. Gated jobs and optional steps are part
  of the reuse fingerprint.
- GPUI frame-source runs only when the pinned zui revision moves.
- Version bumps (only `version = "..."` lines in Cargo.toml/Cargo.lock)
  select nothing and are left out of fingerprints.
- nextest `ci` profile for pull requests and main leaves out the slow/soak
  tests (48-chat and real-quantum doc_host sync, the codex dying-server
  backoff, preview leak, two sleep-bound discovery tests); the cursor_shim
  stress test runs 14 rounds (ZERON_STRESS_ROUNDS, 100 by default). Preview
  discovery tests run one at a time (fixed port).
- Nightly ci.yml schedule runs everything in full; weekly-tests.yml runs the
  engine integration binaries and crate tests no workflow ran.
- Linux core no longer builds the 8 test binaries that run nothing there
  (Windows-only or all-#[ignore]d). The small harness, engine and preview
  integration suites move into one `tests/misc` binary per crate. The orb
  geometry tests move to zeron-orb (they tested its re-export); the
  assertion-free microbenchmark is dropped. The macOS app builds with the
  tests instead of rebuilding zeron-ui without the fixture feature.

* CI: pass the nextest config to the build-only steps too

NEXTEST_PROFILE=ci names a profile from scripts/ci/nextest.toml; the macOS and
Windows `--no-run` builds did not load that file, so nextest refused the
unknown profile.

* Engine: keep the git identity setup inside the home it is given

configure_git_identity pinned HOME but inherited XDG_CONFIG_HOME, and
`git config --global` writes $XDG_CONFIG_HOME/git/config when that file
exists. With a sandbox or test home, the identity landed in the developer's
real git config: running the engine tests on a machine with XDG_CONFIG_HOME
set replaced the user's name and email with the test's. An XDG_CONFIG_HOME
outside the given home now gives way to the home's own, and the test pins it
for its own git calls too.

* CI: iOS simulator tests in parallel with ios-core; Windows UI tests side by side

- The C header and module map the simulator tests link are committed in
  apps/ios/CoreFFI (outside Xcode's synchronized folders) and refreshed by
  scripts/ios/build-core.sh like the Swift bindings; ios-core checks all
  three are current. ios-tests no longer waits for ios-core's artifact, so
  the iOS path is one job long instead of two.
- The simulator core for the unit tests builds in the dev profile, not the
  optimized `mobile` profile the app ships.
- Windows runs zeron-ui's tests side by side: nextest gives each its own
  process, so the in-process `--test-threads=1` restriction no longer applies.

* CI admission: budget defaults at the organization's runner limits

20 jobs in total and 5 on macOS (the organization's concurrency limits), and
at most 10 on Windows so Linux keeps half the pool. The repository variables
still override them.

* CI: skip the browser steps when the Linux setup failed

They run after a failed UI test on purpose (a separate signal), but without
the system packages (an apt mirror stall) they can only fail too.

* CI: retry the WebRTC terminal path test (a known race)

remote_terminals' network-change test asserts no keystroke goes through the
relay once the path reports Direct; in a loaded run one did. Retried like the
other timing-sensitive tests in nextest.toml until the race is fixed.

* Fix two races that failed CI on loaded runners

- Muse: a crash usually shows first as "Muse stdout closed", racing the
  process exit; `try_wait` lost that race under load and users got the bare
  protocol error instead of "Muse exited unexpectedly" with Muse's last
  stderr lines. Wait up to 250 ms for the exit, as the Pi driver already
  does (a_crash_mid_turn_reports_muses_last_words failed this way).
- Remote terminals: a subscription reported TerminalPath::Direct before
  attaching the direct writer, so a keystroke typed by whoever saw Direct
  could still go through the relay (a_terminal_rides_a_real_webrtc_pair_
  through_a_network_change failed this way). Report Direct once writes
  ride the link. The CI retry for that test goes.

Both tests pass 25 runs in a row under CPU load.

* CI reuse: count only the CI files a suite runs

Every suite's fingerprint included all of scripts/ci and the composite
actions, so a change to the planner or the scheduler (which decide what runs,
not whether it passes) re-ran every suite. Each suite now counts the CI files
it executes: nextest.toml and the Linux or Windows setup for the Rust suites,
test-core.sh for core, the macOS fixture runner for macOS, apt-install.sh for
the installer. ci.yml still counts for all.

* docs: changing the fingerprint inputs reruns everything once

* CI admission: no circular waits

Two ways admission could deadlock (until the fail-open timeout):

- Each waiting run counted every other waiting run's admit job as a busy
  runner, including runs queued behind it. With a full run (16 of 20) at the
  head and five or more waiting behind it, the head waited for their runners
  and they waited for it. A run now counts only the admit runners ahead of it.
- Two ci:lock labels each reserved 16 of 20 runners and counted the other's
  reservation, so neither locked pull request (nor anyone else) could start.
  Locks are now ordered by when their label was added: an older lock ignores
  a newer one's standing reservation.

Every wait now points forward in one order, so no cycle can form. A test
simulates 3000 random queues (sizes, priority, overlapping locks, polling
order) and checks they all drain; the previous scheduler deadlocked in 309.
The fail-open timeout drops from 5 h to 2 h as the backstop for the one case
outside the model (waiting admit jobs taking every runner in the pool).

* CI admission: waiting admit jobs yield when they starve the pool; ignore runs that never take their turn

Waiting costs a hosted runner from the same pool as the suites. With about
20 runs waiting, their admit jobs held the whole pool, admitted runs' jobs
got no runner, and nothing moved until the 2-hour fail-open. When an
admitted run's Linux or Windows job has queued 10 minutes, every running
admit job but the first quarter of the budget now starts its run without a
reservation, giving its runner back. A new test models GitHub's runner pool
as well as admission: without yielding most 30-run queues never drain, with
it all 200 do.

A reservation read from another run is not trusted, but a run whose edited
admit step never finished still held everyone behind it for 2 hours (and a
fake admitted run held a full run for 90 minutes). A waiting run that could
have been admitted for 3 minutes but still waits is now ignored, and an
admitted run's jobs that have not appeared 10 minutes after admission stop
counting, except the late result and publish jobs.

Polling backs off further from the head of the queue (5 min, 10 min under
400 requests left): the GITHUB_TOKEN quota is shared with releases, the
Cursor SDK update and CI emergency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* CI: voice and the Linux browser fixture nightly only; forks reuse only main's passes

Over two weeks the voice jobs left after the move into core-tests (AEC3
and the packaged Windows runtime) never failed, and the Linux browser
fixture's failures were window-timing flakes and package downloads. Both now
run nightly, on manual runs and with ci:full. The zeron-ui tests stay on
every change: 2,046 tests in 29 s, and the only check that caught one real
regression in that window.

A fork's earlier runs could save a pass entry for the fingerprint of a
later, clean-looking commit, so its suites would be skipped and the pull
request would still show a green CI result. Until the merge queue (which
reuses nothing) is the required gate, forks reuse only main's passes;
CI_FORK_REUSE=own turns their own back on (ci.yml passes it to plan in the
workflow commit that follows).

Docs: admission's new yield and unresponsive-run rules and polling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Engine: keep the user's own XDG_CONFIG_HOME when the git identity home is theirs

The XDG_CONFIG_HOME guard replaced any XDG_CONFIG_HOME outside `home` with
`home`'s. When `home` is this process's own, that hid an identity the user
keeps in an XDG_CONFIG_HOME elsewhere, and the machine identity went into
~/.gitconfig, which wins over it. It now only applies to a sandbox or test
home.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* CI workflows: Android gets only its own secrets, on pushes to main; CI_FORK_REUSE

secrets: inherit gave android.yml every repository secret, and the merge
queue (code not on main yet) would have signed with the release keystore.
ci.yml now passes the four signing secrets and the R2 token by name, on
pushes to main only; pull requests and the merge queue use the debug key,
as forks always did.

Also: ci.yml passes the CI_FORK_REUSE variable to plan, and the comments in
ci.yml, voice-tests.yml and ui-tests.yml say voice and the Linux browser
fixture run nightly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* CI: test-core also runs main's crates/doc/tests (attachments_roundtrip is among them)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-01 15:51:25 -07:00
Sina Khalili
1aac985c48 Build signed Android App Bundles and automate Play testing uploads 2026-10-27 20:38:31 -07:00
zeronsh[bot]
79fd52198a
Releases: serve the Android APK's stable name uncached; name each build uniquely (#1032)
The edge served every release artifact but .txt/.json as
`public, max-age=86400, immutable`, overriding the `no-cache` the Android
workflow uploads zeron-android-arm64.apk with. That name is replaced by
every build, so a browser that had downloaded it once kept handing back
the old APK for a day without asking again.

The release route (now edge/src/releases.ts, covered by a workerd test)
serves an object's own cache-control when it was uploaded with one, and
.apk as application/vnd.android.package-archive. Desktop artifacts upload
without one and keep their headers. Each published APK is also named for
its build number (zeron-<version>-<build>-android-arm64.apk), so the
per-build copies are never replaced and can be cached for good.

Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-10-24 21:00:59 -07:00
Wing
684becf0f8
Android app on the shared Rust mobile core (Material 3 Expressive) (#609)
* Android app on the shared Rust mobile core

A Jetpack Compose app (apps/android) that links crates/mobile through
UniFFI — the same transcript layout engine, text measurement and
virtualization as iOS. The painter draws Rust display lists on a Skia
canvas at Rust coordinates with the same Geist bytes; Minikin backs the
fallback measurer. UI is Material 3 Expressive with Zeron's palette.

Kotlin-only renames in crates/mobile/uniffi.toml avoid clashes with
Throwable.message and AutoCloseable.close.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: online hosts first, fade the transcript behind the composer; more screenshots

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: composer-first new session, capsule composer, iOS-parity session rows

- New session is the iOS/desktop canvas: harness mark + "What are we
  building?" over a composer card whose chips (project, branch or host,
  model, effort) open Material 3 Expressive grouped menus.
- One shared composer: a resting one-line capsule that becomes a card
  with context chips when focused; no drop shadow; shape-morphing
  send/stop; a Queue/Steer delivery chip while the agent works.
- Session rows show the harness brand mark, project + branch subline,
  Done/Input/Failed status and state-tinted PR badges; small extended FAB.
- Harness brand marks ported from the shared SVG path data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: Zeron's icon set and a Material 3 Expressive shell

- Every glyph is Zeron's own: the desktop icon set (crates/ui/assets/icons)
  plus the iOS tab/tool icons, compiled to VectorDrawables at build time
  (scripts/android/svg2vd.py) — no Material icons left in the UI.
- Expressive shell: display-weight Geist headers (emphasized type scale),
  filter pills with live counts, SegmentedListItem rows with project-toned
  harness tiles, a floating nav capsule + round search button, and the
  New session bar with the live summary (iOS accessory parity).
- Round tonal chrome on the session screen, expressive action menus for
  row / transcript / overflow actions, rebuilt settings and search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: runway, fold/reveal motion, attachments, @ mentions, queue editing

- Own-turn runway (desktop OwnTurnAnchor): an immediate send glides the
  prompt to the top and holds a viewport of room for the reply; a message
  queued behind the live turn takes the runway once its bubble lands.
- Row motion: fold toggles tween 140 ms ease-out, a growing tool group
  reveals over 360 ms expo; rows interpolate from the previous frame.
- Attachments: Photos / Files / Paste image via the system pickers,
  staged as JPEG (long side <= 2560, <= 24 MB, up to 8) with removable
  thumbnails; pending thumbnails in the transcript show a wavy upload
  ring driven by the escort progress.
- @ mentions: file suggestions above the composer; tokens become
  zeron-file links on send (session + new session).
- Queue editing: host lease with renewal, the user's draft stashed and
  restored, only the visible text committed.
- Project picker is a bottom sheet grouped by machine; choice menus are
  one group with a trailing check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: replace all screenshots with the current UI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: chat wallpaper (iOS parity)

The wallpaper hero behind the sessions list and the new-session page:
aspect-filled artwork fading out downward at the opacity the Rust
contrast guard allows (wallpaper_safe_opacity), the new-session composer
softening it, and the list fading it as it scrolls. Effects (dither,
ASCII, halftone, scanlines) run in the shared core (wallpaper_render).
Settings has choose / effect / remove; --es wallpaper <path> and
--es wallpaper-effect set it at launch, like iOS -wallpaper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: flat session chrome, per-chunk streaming veil

- The transcript ends where the composer begins: no gradient scrim, no
  text streaming behind the composer (the runway's viewport was the full
  height, so reply tails ran under it, faded and cramped).
- Header is a flat Material top app bar that takes the container tone
  once content scrolls under it, instead of a gradient cut-off.
- Jump to latest is a small FAB floating over the transcript.
- Streaming veil: each inserted chunk fades on its own clock, found by a
  prefix+suffix diff (list rows carry their bullet after the item text,
  so the old prefix check skipped the veil and words popped in); chunks
  are recorded during composition so new text is never drawn opaque
  first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: Material navigation — search app bar, extended FAB, no custom nav

Two destinations don't take a navigation bar in Material 3 (it's for
three to five), and a floating capsule isn't a Material component. Home
now follows the search-led Material pattern: AppBarWithSearch with the
account avatar (→ Settings, now its own screen with a large top app
bar), ExpandedFullScreenSearchBar for search, FilterChips, and an
ExtendedFloatingActionButton for New session that collapses on scroll.
Session and new-session headers are standard TopAppBars with icon
buttons. Removes the custom floating nav, pills, and tonal circle
buttons. All screenshots recaptured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: restore the filter pills; white send arrow on the accent

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: restore the pre-review home, settings and chat header

Brings back the Sessions header, floating nav with the New session bar,
Settings as a tab, the search screen, and the round header buttons.
Keeps the flat transcript/composer layout, jump FAB, streaming veil,
filter pills and white send arrow, and adds a status-bar scrim on
scrolled home and settings. Screenshots recaptured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: iOS feature parity — questions, drafts, sections, projects, archive

- Question panel: one page per question, auto-advance, "Other…" text,
  Pi input/editor prompts (prefill + multiline) answerable; replaces the
  composer while open.
- Sessions: Group by Project (git identity, Home per device), options
  menu (New section, Collapse all, Group by project, Archived), swipe
  right to pin, Move to section, section rename/delete, pinned reorder,
  Archived screen, Undo snackbar from every archive, iOS row precedence.
- New session: project picker grouped by repository with a host chip
  for checkouts, New project folder browser, text/options/images kept
  when closed unsent.
- Session: per-chat drafts, open failures return to Sessions with a
  note, image viewer (thumbnails and image chips), chip icons, "Sending
  to host…" and reconnect countdown, PR chip Open/Copy link, take photo,
  Ctrl+Enter sends, markSeen on leave.
- App: sends get 25s to deliver after backgrounding (short FGS), an
  expired session keeps its local store, OAuth state checked, tokens
  sealed with Android Keystore, sign-out confirmation, list/detail
  layout on large screens, Ctrl+N / Ctrl+Shift+F.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: README launch routes; pull to refresh waits for a real change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: remote voice mode (port of the iOS voice call)

Adds sh.zeron.android.voice, the Android side of the Codex voice
orchestrator call: audio on the phone, Codex and its tools on a
registered execution host advertising voiceHostCapability().

- VoiceController (iOS RemoteVoiceController): host eligibility and the
  remote-voice dev override, start/stop/mute, end reasons with messages
  and Retry/Settings, per-user/org remembered host and style, call
  sounds, proximity (earpiece + screen off at the ear), one call at a
  time, no auto reconnect, the scripted preview and a WebRTC self-test.
- VoicePeer + VoiceMedia (CodexVoicePeer/NativeVoiceMedia): Google WebRTC
  M150 (io.github.webrtc-sdk:android, the iOS pin's milestone), audio
  only; Prepare/Offer/ApplyAnswer/SetMuted/Levels/Close completed through
  VoiceCall.completeMedia exactly as iOS; manual audio until the host
  confirms, focus loss ends the call, speaker/earpiece/headset routing.
- VoiceCallService: microphone foreground service with a CallStyle call
  notification (host, call clock, Mute, Hang Up; tap opens the stage).
- Compose UI: the core orb on a Canvas, the core caption fader, the call
  stage, voice settings, the New session bar button / live call strip,
  the session header button and VoiceHost (mic prompt, keep-awake,
  off-stage failure snackbar).
- Call sounds from the iOS app in res/raw.

Wiring into AppModel, navigation and the existing screens is left to
the integrating change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: wire voice into the app

The call lives on AppModel (stopped on any sign-out). The New session
bar carries the voice button and the live call strip; sessions get a
header voice button; Settings gets a Voice row; the call stage and
voice settings are routes (also from the call notification and
zeron://voice). Launch extras: voice-preview, voice-stage, remote-voice,
voice-selftest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: zeron://voice opens the call

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: stop re-composing every session row on scroll

The sessions screen read `list.firstVisibleItemScrollOffset` while
composing (for the status-bar scrim), so it re-ran on every scroll frame
while the header was on screen. `RowActions` was rebuilt on each run, so
no row could skip: every visible row re-composed every frame.

`StatusBarScrim` now takes the list and derives `scrolled` itself (the
same read in Settings, Archived and Voice settings goes with it), and
`RowActions` is remembered.

Nothing Phone (2), release build, 1.5 s drag at the list top: UI thread
p90 7.7 -> 5.6 ms; 8 flings: 7 -> 0-3 janky frames.

* Android: fade the status-bar scrim without a grey flash

Animating from Color.Transparent (black at zero alpha) passes through
semi-transparent grey: in the light theme the status-bar band dropped
from luma 249 to 173 for ~67 ms on each toggle (screen recording). Fade
from the page tone at zero alpha instead; same for the nav bar pill.

* Android: ask for the panel's peak refresh rate while touching

Nothing OS holds third-party windows at 90 Hz on its 120 Hz panel
(`PRIORITY_APP_REQUEST_RENDER_FRAME_RATE_RANGE ... mMaxRefreshRate=90.0`)
unless the window asks for a display mode. Ask for the fastest mode while
the user touches the app and for 10 s after, then hand the choice back so
an idle screen isn't pinned at 120 Hz.

Drag at the list top: a frame every 11.2 -> 8.4 ms (90 -> 119 fps), no
dropped frames; coming back from idle costs one ~19 ms frame while the
mode switches.

* Android: side chats, subagents, terminals and visuals (iOS parity); M3 floating toolbar

Companions, as on iOS:
- Chips above the composer ("2 working", side chats, live terminals) and a
  companions sheet listing a session's subagents (live first, ticking),
  side chats (new, fork, swipe to archive) and terminals (swipe to close).
- Session header gains the companions button (badged while agents run); the
  menu groups New side chat / Fork / Terminal, Pin / Copy / Archive, Delete.
- Side chats head themselves under their parent; fresh ones left unused go.
- Subagent cards in the transcript open the subagent's live, read-only
  transcript with a working/finished/failed bar.
- Terminals: a View painting the Rust emulator's frames (box drawing and
  blocks drawn per cell), IME + hardware keys, fling scrollback, pinch to
  resize, word selection with a floating Copy / Add to message / Paste menu,
  a key bar (esc, sticky ctrl/alt, tab, repeating arrows, punctuation,
  paste), a tab switcher, status pill, and refs that reattach after launch.
- Agent visuals (show_visual) paint in the transcript with live surfaces
  and controls.

Home drops the tab bar for a Material 3 Expressive floating toolbar
(Settings, Search, voice) with New session as its FAB; it tucks away to the
FAB while scrolling down. Settings is a pushed page.

Merged main; the Kotlin bindings rename TerminalSession.close → end, and
build-core.sh ships libc++_shared.so (the core now links C++).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Android: Material 3 bottom app bar on the Sessions page

Settings, Search and voice as the bar's actions, New session as its FAB;
the bar slides away while the list scrolls down. Replaces the floating
toolbar, which sat small and centred over the list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android: Cloud and large-screen parity with iOS

Cloud (iOS Cloud/):
- CloudStore: status and credits, GitHub, the vault's logins and their
  usage, billing, session machines; cached reads that revalidate, with
  backoff when a read fails. Browser hand-offs come back through
  zeron://signed-in.
- Settings → Agents: Providers (each device's agents with their switches
  and logins, plus Cloud's), Cloud (GitHub, repositories, Cloud projects),
  Billing (credits, plans, packs, Stripe checkout and portal).
- An agent's accounts on Cloud or a device: usage bars, switch, remove,
  sign in through the browser (paste-code fallback), API keys.
- GitHub device-flow sheet; the Cloud project picker.
- New session on Cloud: the Cloud host, Cloud's models, branches from
  GitHub, "New Cloud project…", "Starting on Cloud…", out-of-credits.
- Sessions: the out-of-credits notice (a refused send shakes it), a failed
  Cloud machine named in the banner, an error card's "Log in".
- Welcome pages after sign-in: appearance, sync, GitHub, agents,
  notifications.

Large screens (iOS SplitRootController), from 700dp wide: the sessions
sidebar beside the open session or the new-session page; companions in an
inspector column with terminals, subagents and side chats pushed inside it
(the sidebar steps aside below 1100dp); Settings as a dialog; Ctrl+N,
Ctrl+Shift+F, Ctrl+B, Ctrl+J, Ctrl+Alt+0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android: the Cloud list's scrim derives its scroll state too

* Android: drop the title header from the session menu

It repeated the header's title and host, and clipped the first item.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android: the model picker as a sheet (iOS parity)

"Model" over where the chat runs, a provider switcher whose thumb follows
swipeable pages (the chat's provider first), models straight on the sheet
with the current one tinted and checked and scrolled into view, a notice
("Your next message continues this chat with Codex", or why the provider
can't change now), search past 12 models, loading skeletons, and a beat to
see the pick land before it closes. Sessions offer the host's other
providers between turns when the host can switch (Cloud chats: Cloud's
agents); picking one moves the chat there and drops the old effort and
options. The new-session page opens the same sheet with a tab per provider
the target runs.

A host that doesn't answer its model list gets the built-in catalog after
5 s (the FFI call can't be cancelled, so the wait is raced, not timed out);
providers that join after the sheet opens load then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android: build the APK in CI and offer it on zeron.sh

- .github/workflows/android.yml: a release APK (arm64, the core at the
  mobile-dist profile) whenever the app or the Rust core changes. Pull
  requests get it as an artifact; main publishes it to R2 as
  zeron.sh/releases/zeron-android-arm64.apk (no-cache) plus a versioned copy
  and sha256s. Publishing needs the upload key in secrets; forks and
  unconfigured repos build debug-signed and don't publish.
- Gradle: the version is the workspace's (Cargo.toml), the build number comes
  from CI, and assembleRelease signs with ZERON_ANDROID_KEYSTORE when set.
- build-core.sh: ZERON_ANDROID_PROFILE picks the core's Cargo profile.
- Website: Android in the mobile downloads row; on an Android phone the
  download buttons offer the APK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android: a third the APK size; CI artifact holds only the APK

- Compress native libraries and dex in the APK: it's downloaded from
  zeron.sh, not delivered by Play (161 MB → 44 MB locally).
- Drop material-icons-extended: the app draws Zeron's own icons, and only
  leftover imports referenced it.
- Package only the ABIs the core was built for (ZERON_ANDROID_ABIS): CI's
  arm64 APK no longer carries WebRTC's x86_64 library.
- The workflow stages in out/android: the repo's dist/ (desktop packaging)
  was swept into the artifact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android CI: build with the release key

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* Android CI: stop compiling the core for the host

The Kotlin bindings came from a host build of zeron-mobile, compiled twice
(the plain lib, then again with the generator's feature): about 7 of the
build's 15 minutes. UniFFI's generator now has a crate of its own
(crates/mobile-bindgen, uniffi + its CLI) and reads the bindings out of the
Android library just built, as the iOS script does with its device library;
the output is byte-identical. Without the NDK the script still builds a host
library for the bindings.

Pull requests build the core at the quicker `mobile` profile; main keeps
`mobile-dist` (thin LTO) for the published APK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: wing-anara <wing_13@live.com>
Co-authored-by: Alexandre VARGAS <alexandre.vargas.lopez@gmail.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-10-24 17:12:34 -07:00