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

4 commits

Author SHA1 Message Date
Wing
eb7d96ca96 Published mobile cores run Luau without its asserts, and each build checks it
The mobile core links Luau (zeron-visual's, through mlua and luau0-src),
and nothing set LUAU_CXXFLAGS for it: TestFlight's and the App Store's
cores and Android's published ones kept Luau's asserts, about a fifth of
script time. Now a mobile-dist build (scripts/ios/build-core.sh for a
Release configuration; scripts/android/build-core.sh with
ZERON_ANDROID_PROFILE=mobile-dist, android.yml off pull requests) builds
the library with LUAU_CXXFLAGS=-DNDEBUG. A development core (mobile)
keeps them, and so does iOS's host uniffi-bindgen: the flag is on the
library's build alone (through build-core.sh's env -i), so switching
configurations doesn't rebuild Luau for the host.

Each refuses a published library with the asserts, by what LUAU_ASSERT
keeps when they're on (Luau/Common.h: __FILE__): each Luau source file's
path, VM/src/l*.cpp, as the release engine's packages check.
build-core.sh's library build for a Release archive (mobile-dist,
aarch64-apple-ios, its env -i), here: 45 such paths in
libzeron_mobile.a without the flag, none with it (no luau0-src path at
all); the check fails the first and passes the second. Android's .so
(cargo ndk) has no NDK here to build with.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 11:39:52 -07: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
Wing
a2c68b097a
iOS core build: find cargo where the caller's PATH does (#982)
The TestFlight archive on the macos-26-arm64 20261021 runner image failed
with "env: cargo: No such file or directory": build-core.sh runs cargo
with a fixed PATH starting at ~/.cargo/bin, and that image no longer
puts cargo there. Keep the directory the caller's PATH resolves cargo
from, and pass CARGO_HOME/RUSTUP_HOME through the clean env.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 14:46:41 -07:00
Wing
fe46a971a3
iOS: rewrite on a Rust core (analytic layout, incremental markdown, UIKit + Liquid Glass) (#570)
* iOS rewrite: Rust mobile core scaffold, shared markdown crate, UIKit shell

- crates/markdown: desktop's block parser + incremental reparse, extracted so
  mobile and desktop share it (zeron-ui re-exports it unchanged)
- crates/mobile: UniFFI 0.32 facade, built for iOS by scripts/ios/build-core.sh
  from an Xcode build phase; Swift bindings committed under Core/Generated
- apps/ios: legacy SwiftUI app removed; minimal UIKit scene linking the core;
  Geist faces incl. italics bundled for Rust measurement + CoreText drawing
- docs/mobile-rewrite.md: architecture of the rewrite

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

* WIP iOS rewrite: text engine, layout engine, UIKit transcript + composer

- crates/text: pretext-style measurement + line layout (rustybuzz on the
  bundled faces, CoreText fallback for uncovered glyphs)
- crates/mobile/layout: incremental markdown → rows → measured display
  lists; immutable frames with prefix-sum offsets; streaming O(changed)
- apps/ios: virtualized transcript painter (CoreText at Rust positions),
  follow spring, glass composer, tab shell, transcript lab, CoreText
  line-break accuracy harness
- crates/client: data core in progress (does not build yet)

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

* iOS: session screen, list screens, question/queue panels, glass fixes

Sessions/Projects/PRs/Search lists share one diffable controller with
fixed-height hand-laid-out cells, swipe pin/archive/move and section menus.
Session screen: transcript + status pill + queue + composer/question panel
riding the keyboard; accessory hides for pushed sessions; scroll-edge
effect settles after the push transition.

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

* iOS: new-session canvas, More, sign-in, drafts, chip menus, perf UI tests

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

* iOS: wire the Rust core — demo workspace, live session transcripts, composer state

The layout engine subscribes to SessionHandle snapshots in Rust (rows never
cross FFI); AppModel maps CoreClient workspace snapshots to list view models;
CoreSessionSource drives the composer, questions, queue and config menus.
Keychain-backed credentials, WorkOS sign-in, demo mode via -demo.

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

* zeron-client: engine-free viewer core (snapshot; live sync in progress)

Registry/session mirrors over zeron-doc with an O(changed-entries)
transcript tracker, desktop-parity view models (pins, sections, projects,
PRs, search), command ledger + shared queue, demo host, UniFFI surface.

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

* CI: build + test the Rust mobile core for iOS jobs; check bindings drift

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

* iOS: streaming veil, queued-message editing via host lease, UI flow tests

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

* iOS: row accessibility, README for the rewrite, flow test fixes

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

* iOS: image viewer with zoom transition, signposts, in-app hitch benchmark

Lab -bench drives display-link flings through ~3,300 rows (idle and while
streaming) and reports Apple's hitch ratio; simulator: 0 hitches in 1,207
frames, worst frame one refresh interval.

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

* zeron-client live mode: registry + chat2 rooms, relay RPCs, uploads, auth refresh

Persisted registry/session replicas (docs.sqlite3), durable command outbox,
never-give-up joins with wake/online short-circuits, warm-set cap, host RPC
over the device relay with disk-cached catalogs, chunked uploads + pending://
attachment escorts, PR status watches, single-flight WorkOS refresh. Live
e2e tests run against an in-process edge (mock registry, real chat2 frames,
real HostRelay). iOS: turnRunning drives the composer; offline-host sends
show as queued.

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

* iOS: dev login + edge override, path monitor, UI test fixes

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

* iOS: live-stack round trip test, async row upgrades, host defaults

LiveStackTests drives the app against a real wrangler-dev edge and a
headless engine (mock harness): new projectless session → send → echo →
streamed reply through the chat2 room. zeron-client finalized (live e2e
against an in-process edge; demo e2e).

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

* iOS: pin mock harness in live-stack test; live round-trip screenshot

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

* Transcript reading width cap (760pt, centered) + centered composer on iPad/landscape

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

* iOS: context usage chip, pinned reorder, section rename/delete

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

* Composer @file mentions: host SearchFiles over the relay, glass suggestions, canonical links on send

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

* Layout: file mentions in user messages render as atomic accent @chips

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

* iOS: glass materialize for panels, pull-to-refresh sync probe, lint

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

* docs: mobile rewrite data path, verification matrix, numbers

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

* iOS: host mention suggestions in the root view so taps land

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

* iOS bench: per-frame main-thread cost counters (layout/apply/model builds)

Standalone -bench: 0 hitches idle and streaming; worst main-thread
layoutRows 1.5ms, apply 1.1ms, sync model build 0.27ms (every scrolled row
prefetched off-main; the streaming tail upgrades asynchronously).

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

* docs: mention screenshot

* iOS: mention list sits above the chip strip; open-latency instrumentation

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

* Cargo.lock: new mobile crates at 0.2.94 after merging main

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

* iOS: accessory + bottom glass hand off inside push/pop transitions

Recorded push/pop at 30fps: the accessory snapped ahead of the transition
(empty tab-bar glass, composer ghosting under the tab bar). Now the swap
runs alongside the transition coordinator and the session's bottom glass
fades opposite the tab bar (tracks interactive swipe-back; restores on
cancel).

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

* Text: bridge per-run fallback advances (CoreText measureRun) — 100% line-break agreement

LineBreakAccuracyTests on the simulator through the real bridge:
3528/3528 exact line starts, 0 line-count differences (was 95.6% / 99.1%);
the test now requires it. CI: rename the changes-filter variable that
shadowed github-script's `core`.

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

* zeron-text: CoreText-exact line breaking

ICU4X Unicode 17 line breaking (+ Thai/Lao/Khmer/Myanmar dictionaries) with
Apple's quote tailoring; kerning/ligatures restored across segment edges;
CoreText's fit slack and cross-break kerning; whitespace-overflow and
ligature-safe overflow splits; itemized shaping runs; in-context fallback
runs via FallbackMeasurer::measure_run. macOS CoreText harness: 100% exact
on 3.5k + 8.6k + 5.9k-case corpora, >=99.97% on random held-out text;
fidelity tests run on any platform.

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

* Layout: prepared-text heap diagnostic (3,300 rows ≈ 6.6 MB)

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

* Regenerate Swift bindings

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

* scripts/android: Kotlin bindings (verified) + cargo-ndk build for the mobile core

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

* iOS: org picker on multi-org sign-in; hitch test no longer perturbs itself

XCUITest polling snapshots the accessibility tree on the app's main thread
(30–50ms each) and caused the hitches it measured; sleep through the bench
and read once. Result: 0 hitches idle (671 frames) and streaming (536),
worst frame one refresh interval, 0 synchronous model builds.

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

* iOS: composer accessory steps aside on the Search tab

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

* Transcript: tap a tool line to read its full command/path in a sheet

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

* iOS: Archived · Undo glass toast (+ flow test)

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

* iOS: New Project — host picker + remote folder browser (legacy parity), flow test

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

* Layout: user rows use the shared message parser (strips Appshot context), test

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

* iOS: row controls precede the text element for accessibility hit-testing (+ tool group test)

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

* iOS: Dynamic Type for list rows (fixed heights per size category)

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

* iOS: drop transcript display-model cache on memory warnings

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

* iOS: persist only WorkOS credentials (dev bearers are per-launch)

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

* iOS README: live-stack recipe, bench/open/harness launch args

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

* iOS: morphing composer card + Zeron identity (palette, cell matrix, brand-mark rows, live accessory, project rails)

The composer is one glass surface that springs between a resting capsule
([+] Message… [↑]) and a card with full-width text and an inside toolbar
(attach, project dot / harness mark / effort / branch chips, violet send;
Queue/Steer pill while the agent works, long-press for delivery modes).

Visual identity moves off the reference app: Zeron palette and desktop
syntax seeds, rounded-square cell matrix status glyph in violet, rows led by
the harness mark with project dots and desktop status words, a 'New
session' accessory with the Zeron mark and a live '2 working · 1 needs you'
summary, color-rail project groups, Settings tab.

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

* iOS: Sessions front page as foldable sidebar sections

Pinned and user sections render inline as foldable groups (desktop sidebar
model) with counts and a live glyph when something inside is working; fold
state persists. Long-press a header to open it (pin reorder), rename or
delete. Replaces drill-in folder rows and the pinned-inline preference.

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

* docs: refresh iOS screenshots for the Zeron redesign

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

* iOS: drop the Projects and PRs tabs and the Zeron mark

Tabs are Sessions, Settings and search. New projects are created from the
new-session project picker (the created project is selected). PR state
still shows on rows and as a session chip. The accessory leads with a plus
instead of the mark.

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

* iOS: desktop PR badges and status glyphs, overflow fades everywhere

- PR badge as on desktop: pull-request icon + mono number, state tone
  wash (fill 0.08, ink 0.85) — rows (line two, right) and the composer chip.
- Status: the 2×3 mini glyph spinner only while working; Input / Failed are
  static dots, unseen-finished is a check + Done, idle shows the time;
  tones match the desktop sidebar. Transcript trailer uses the 3×3
  gradient spinner. Pin icon and unseen dot dropped from rows.
- Fades instead of cuts: a Rust display-list Fade primitive (one-line
  slots stay unwrapped and fade at the edge; folded bubbles fade their last
  line), painted by erasing along an alpha ramp; FadingLabel for titles and
  meta; horizontal scrollers (code, tables, composer chips, photos) fade
  whichever edge has more content.

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

* iOS: fix picker crashes, dead + button, scroll re-latching; names not ids; drop demo button

- Model/effort/branch menus crashed: UIDeferredMenuElement completions ran
  off the main thread after the async catalog call. Complete on MainActor.
- '+' did nothing in the card state: the toolbar row sat above it and ate
  the tap. Controls also no longer trigger the focus tap (it morphed the
  capsule under the finger).
- Follow-the-tail re-latched the moment a drag started near the bottom, so
  lists sprang back down on release while streaming. Follow now resumes
  only when the user returns to the tail (release or momentum within 70pt
  heading down); status-bar tap releases it.
- Never show ids: blank / 'unknown-device' device names become None
  (Unknown device in lists); model chips use labels learned from hosts'
  live catalogs; harness labels come from the core; Settings shows the
  account's name/email and org name (saved at sign-in, org backfilled for
  existing logins); Switch Organization signs in again.
- Sign-in no longer offers the demo (the -demo launch arg stays for tests).
- Regression UI tests for each.

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

* iOS: desktop tool groups, bottom transcript fade, project monograms, desktop branch icon

Tool groups now render and animate like the desktop transcript
(ui/src/transcript.rs), laid out in Rust:
- 26pt header: alt-arrow chevron on the rail trunk (140ms fold rotation),
  summary with the desktop wording (thought segments + shared tool
  summary), title shimmer while the group is the live tail (3.4s sweep).
- 32pt rows: 1pt hairline(0.12) rail with quadratic elbows, desktop tool
  icons (vector assets), verb + detail in text_muted, file calls as badges
  with the desktop's polychrome file icons (same manifest + resolver).
- Inline details per row: invocation (80-col wrap), output (24 lines +
  '… n more lines'), diffs (hunks, dual gutters, +/−/· markers, washes and
  bars), diff stats, thought text; separators; sideways scroll with fades.
- Motion: new rows arrive with the phased connector draw (480ms quint,
  prev-trunk → incoming → branch, 65ms stagger, 90ms lead-in), content
  fading in with the branch, group height reveal 360ms expo; folds tween
  140ms ease-out; groups present at attach never animate.
- Thoughts join groups ('Thought process'), subagent spawns get their own
  card group (genus split); a streaming thought opens by default.

Also: the transcript fades into the background behind the composer (like
the nav bar edge at the top); project markers are the desktop monogram
tiles (8-tone palette, fill 0.08 / letter 0.85, FNV-1a of the project
path — the core's index now matches desktop); branches use the desktop
git-branch icon in the subline tone. scripts/ios/gen-icons.py mirrors the
desktop icon sets into the asset catalog.

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

* iOS: a cancelled swipe-back no longer disconnects the session

viewWillDisappear reports isMovingFromParent at the *start* of an
interactive pop, and the session detached its view + closed the transcript
engine right there. Cancel the swipe and you stayed on a session that no
longer received updates (and was evictable from the warm set) until you
left and came back. Teardown moves to viewDidDisappear, which only runs once
the pop really completes.

The cancelled pop also re-ran the accessory swap, and flipping twice left the
'New session' accessory showing over the session. The accessory is now
derived from what's on top (syncAccessory) after every transition.

Regression UI test drags a third of the way back mid-stream, lets go, and
checks the accessory stays hidden and the reply streams to completion.

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

* iOS: tapping outside the composer minimizes it and the keyboard

Tapping the transcript resigns the composer (controls in rows keep their
taps); the card is now only for composing — focused, holding photos, or the
new-session canvas — so an unfocused draft rests as the capsule, previewing
up to two lines with send still live. The new-session canvas dismisses the
keyboard on an outside tap (its card stays open). Mention suggestions close
with the keyboard.

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

* iPad: t3code-style split shell

iPad gets a split view laid out like t3code: a 256pt sidebar (208–320)
beside the session column; compact widths (Slide Over, narrow Split View)
collapse to the iPhone tab shell, carrying the open session over.

- Sidebar: wordmark, new session + options, search (filters in place),
  the front-page sections as t3's three-line card rows (project tile +
  name + status, title at full width, branch + PR badge + harness), the
  open session in the active-row fill, footer with Settings / Archived and
  the live summary; 1px column border.
- Main column: the open session, or a new-session draft (t3 opens a draft,
  not an empty page) — composer centered at the 768pt message width under
  'What should we build in {project}?', not auto-focused.
- Session header beside the sidebar: t3's leading breadcrumb
  ('project / title', editor-style nav item).
- Message column and composer at t3's 768pt (was 760 / 784).
- ⌘N new session, ⌘⇧F search, ⌘B toggle sidebar; Settings as a form sheet.
- AppRouter abstracts the shell for routes, lists and sheets.

iPad UI tests cover opening sessions beside the sidebar (landscape and
portrait), drafting a new session, sidebar search and settings.

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

* iOS: tool rail colors follow the app's appearance

The rail and its reveal covers resolved their colors at init, before the view
was in the window — so they used the *system* appearance. With the app set to
Light on a Dark device the rail was drawn white at 12% (invisible on light)
and new rows faded in from a black cover. Colors now resolve when the view
joins the window and on appearance changes (also the bottom edge fade and
photo thumbnail borders).

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

* iOS: long queued messages no longer push their row's buttons off the card

A queue row's label had default layout priorities, so a long message's full
width won over the row and stretched it past the glass card — the send-now
and more buttons slid off the right edge. The label now compresses (it
already fades at its edge) and the buttons hold their size. The queue UI test
queues a second, long message and checks its actions stay on screen.

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

* iOS: queue survives navigating away; accessory no longer flies in from the top

- Reopening a session with queued messages (or an open question) showed no
  queue: the panels start dematerialized and only re-materialized when their
  content changed while on screen, so a first render left the glass off and
  the rows at alpha 0. A first render now shows them directly.
- Swiping back re-added the 'New session' accessory inside the transition's
  animation, so its first layout animated from a zero frame — it flew in from
  the top of the screen. It's now placed before the animation (no layout
  animation) and only its content fades in with the gesture.

Regression test: queue a message, go back (accessory sits above the tab bar),
reopen — the queue is there and actionable.

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

* iOS: running subagents show as running; project tiles center on the text

- Subagent cards used the spawn call's 'resolved' flag, but under eager-done
  the spawn resolves while the subagent keeps running — so live subagents
  looked finished. Running / failed now follow the subagent lifecycle
  (subagent_ref + subagent_status), as on desktop: a mini spinner while it
  runs, danger tint if it failed. Layout test covers running/done/failed.
- The project tile centered on the line box and rode high next to lowercase
  names; it now centers on the x-height, and its letter on cap height.

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

* iOS: chat wallpaper (desktop new-thread background) with a contrast guard

Settings → Wallpaper: choose a photo, pick the desktop's effect (None,
Dither, ASCII, Halftone, Scanlines), or remove it. It shows at the top of the
new-chat page (iPhone sheet and the iPad draft) and behind the Sessions list:
aspect-filled over 72% of the viewport (≤ 760pt), fading out top → bottom by
alpha (no tinted overlay), softened behind the composer like desktop, and on
the Sessions list fading further as the list scrolls up over it.

Readability: rather than a scrim, the artwork's opacity is capped per image
and appearance so text over it keeps WCAG contrast — primary text 4.5:1,
secondary 3:1 — against the worst pixels (95th/5th luminance percentile) of
the region text sits on, composited in sRGB like the screen does.

The effects and the contrast guard live in the Rust core (wallpaper.rs; the
desktop's algorithms, pixel-for-pixel) so Android gets them too; renders are
cached per appearance off the main thread. Also: the new-chat headline no
longer slides under the composer when the keyboard is up.

Tests: Rust (effects, desktop scanline gain, contrast guard light/dark) and a
Settings UI test. '-wallpaper <path> [-wallpaper-effect ascii]' sets one at
launch for screenshots.

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

* iOS: new-session headline always sits above the composer

The headline now lives in its own region — from the top of the sheet to the
composer's top edge — and is centered there, so the keyboard lifting the
composer (or a project name wrapping it onto two lines) can never slide it
underneath. UI test: two-line headline, keyboard up, clear of the composer.

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

* iOS: image upload progress rides the thumbnails, not a banner

Sending images no longer puts an 'Uploading… n%' pill above the composer.
The pending thumbnails (still on pending:// refs) get a scrim, a ring that
fills with the transfer and the percentage, and it fades away when the
upload lands. The demo host now escorts attachments like a live host
(progress on the session before the turn runs), so the ring is testable;
UI test pastes an image, sends it, and checks the ring shows and no banner
does.

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

* iOS: seamless new chat → chat handoff on send

Sending from the new-session draft no longer dismisses a sheet and pushes a
chat. The chat goes in underneath at once and a handoff plays over the
window:
- focus moves to the chat's composer before the draft leaves, so the
  keyboard is handed over instead of dropping and popping back;
- the draft page dissolves with a slight settle;
- the draft's composer (lifted out as an image, travelling empty) glides
  into the chat's composer and crossfades into it;
- the message flies from where it was typed into its user bubble, picking up
  the bubble's fill on the way, while the transcript fades in.

On iPhone the sheet is hidden (dimming dropped) immediately and torn down
only after the motion — dismissal and keyboard re-hosting are a heavy
compositor frame that otherwise swallowed the animation. Snapshots are real
images (replicants go blank once the sheet is gone), and the motion starts a
frame after the swap. The iPad draft column uses the same handoff in place.
Reduce Motion shortens it to a crossfade.

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

* iOS: desktop streaming runway

Port of the desktop transcript's own-turn runway (transcript.rs
OwnTurnAnchor): on an immediate send the prompt glides to the top of the
viewport — the desktop's frame-rate-independent ease-out (15% of the
remaining distance per 60 fps frame, ~230 ms to 90%) — and the content is
held one viewport tall below it, so the reply streams into reserved space
without the view moving on every token. The reply consumes the reservation;
past it, the ordinary tail follow takes over. The anchor lives for the turn,
so when the viewport grows back past the reply (keyboard dismissed) the space
is reserved again instead of the prompt dropping. A drag releases the hold
(the reservation stays as scroll room); returning to the bottom or Jump to
latest glides back to the held position. Queued sends keep the live turn's
runway; the new-chat handoff starts one for the first message. The runway
resizes with the composer inset in the same pass (no dip when the keyboard
moves), and the jump button stays hidden while following.

docs/screenshots/ios-rewrite: handoff.gif, runway.gif and the full
handoff-and-runway.mp4 recording.

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

* iOS: sending dismisses the keyboard

Sending a message puts the keyboard away and the composer rests as the
capsule, in chats and from the new-chat draft. The draft handoff no longer
hands focus to the chat's composer: the keyboard slides down with the motion,
and the lifted draft card tracks the chat's composer frame live as it drops,
settling onto the resting capsule (bottom edges aligned, no image squash)
before they crossfade.

With the keyboard gone the runway has room for queued messages too: a message
queued behind the live turn now takes the runway when its bubble lands in the
transcript (desktop promote_materialized_queued_turn) instead of just
following the tail.

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

* iOS: quieter selection, concentric + plate, queue = send, toast above chrome

- Selected tab no longer uses the violet accent (the glass pill and label
  carry the selection); the 'New session' + plate is a circle concentric
  with the accessory capsule instead of a rounded square inside it.
- The Queue action looks exactly like Send (violet circle, arrow): no icon +
  'Queue' pill. The long-press delivery menu and accessibility labels stay.
- The archive toast sits just above the bottom chrome actually on screen
  (accessory or tab bar, expanded or minimized) instead of a fixed 150pt that
  floated over list rows.

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

* iOS Settings: drop Switch Organization and Diagnostics

Switch Organization only signed you out; the Diagnostics section (transcript
lab, core version) was developer-facing — the lab stays reachable via -lab.
The wallpaper settings test scrolls its row clear of the bottom chrome now
that the section sits at the end of the list.

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

* iOS Settings: restore the wallpaper actions

Removing the Switch Organization case also cut the wallpaper choose / effect
/ remove cases that sat between it and Archived, so those rows did nothing.
The wallpaper settings UI test caught it.

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

* iOS: pull to refresh ends (and waits for the resync)

The refresh control was ended through the primary action's sender, which is
nil for primary actions — so endRefreshing never ran and the front page spun
forever. The control is now captured directly, and the pull runs the
foreground resync (registry redial, health probe, room kicks) then ends once
the workspace updates (at least 0.6s, at most 3s).

UI test: pull on the front page and check the list settles back to its
resting position (fails on the old code — the list stayed pushed down).

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

* iPad: the phone UI with a sidebar; model chip never shows the harness

- iPad sidebar is the phone's Sessions page (same rows, sections,
  wallpaper, New session capsule), search in its bar, Settings beside
  the options menu; the session header and new-session page match the
  phone (the three-line cards, breadcrumb header and draft headline go)
- New-session model chip opens on a real model name: the host's last
  catalog (or the built-in one) at once, then the host's own list;
  switching hosts reloads it
- Central Icons glyphs for the Sessions and Settings tabs
- Drop references to other apps from comments and tests

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

* iPad: new session is a compose button at the sidebar's top-left

The floating capsule is the phone's tab-bar accessory; beside a sidebar
the compose button in the bar is where it's expected.

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

* iPad: sidebar actions in a bottom toolbar

Settings and options grouped on the left, new session (prominent +) on
the right, in the system toolbar so glass grouping and glyph centering
are the platform's.

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

* iOS: fixes from review

- Sign-out wipes the account's local docs and in-memory state; a
  different account/org never opens the last one's store
- Sign-in reports a workspace that failed to open instead of bouncing
- Pull to refresh ignores the redial's reconnecting blip
- iPad: action sheets anchored (no popover crash); the open session
  survives compact <-> regular; one live view per session
- Archived list offers Unarchive; Settings refreshes live
- Composer keeps text when a send / session start fails; queued-message
  edits keep the user's draft and images, keep hidden context and
  attachments, and hand back the lease when leaving or switching
- Drafts saved on backgrounding; a reappearing session re-attaches
- Wallpaper downsampled from the file off the main thread
- Question answers submit once; recycled image views can't show a stale
  load; NewProject never mixes one device's path with another
- Release builds drop the -dev / -edge / -signedout test hooks
- PrivacyInfo.xcprivacy; TestFlight job timeout + cache on failure
- Demo tests wait for the chat row instead of racing it

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

* Core: fixes from review

- Token refresh runs as its own task holding the single-flight gate and
  storing the rotated pair itself: a caller's timeout can no longer drop
  a refresh mid-flight and strand the client on a spent refresh token
- Chat rooms stop with the client (sign-out) and close on delete, so
  nothing re-saves a deleted snapshot or dials after sign-out
- Layout worker starts a fresh width cache past 4 MB (streaming CJK /
  emoji / unbreakable tokens grew it by a whole prefix per update)
- Copy reads the current source even when a block renders the same
- Dynamic Type changes keep expanded / folded / open-diff state
- percent_decode works on bytes (no panic on % before a multi-byte char)
- Tests: queued-edit text rebuild, iPad sign-out sheet anchor

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

* Fixes from verifying the review fixes

- Only a sign-out the user asked for forgets local docs; an expired
  session keeps its store (unsent outbox); 408/429 from the token
  endpoint are transient, not a rejected credential
- Switching queued edits returns the user's draft at once and ignores
  taps while a lease is pending; a lease acquired after leaving the
  session is handed straight back
- A draft restored by an edit commit keeps its @file mentions
- iPad: a session closed in the compact shell isn't reopened on widen
- Composer recomputes are serialized (an older read can't publish last)
- Part change detection hashes the whole text
- Queue-edit tests use the core's real trailer / Appshot formats

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

* Mobile layout: bound tool-diff computation (100ms, then coarser)

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

* Remove the PR screenshots

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 22:57:46 -07:00