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

156 commits

Author SHA1 Message Date
Wing
e2412b52f8 Merge zeron/cloud-fast-wake 2026-11-08 16:40:34 -07:00
Wing
5691b2405b Merge zeron/relay-mobile-android 2026-11-08 16:40:33 -07:00
Wing
f852eab0f2 iOS bindings: regenerate after merging cloud-durable
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:11:39 -07:00
Wing
9a6180cbe8 Merge cloud-durable into zeron/cloud-fast-wake
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:08:27 -07:00
Wing
972978d5e7 Merge relay-mobile-ios into zeron/relay-mobile-android
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:01:35 -07:00
Wing
a7659ca4df Merge relay-layer into zeron/relay-mobile-ios
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:57:46 -07:00
Wing
4e4faa64f3 iOS bindings: regenerate for CoreClient.on_background_idle
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 19:58:38 -07:00
Wing
960a21734b Merge zeron/cloud-attachments-r2
# Conflicts:
#	crates/client/src/live/mod.rs
#	crates/client/src/session/mod.rs
#	crates/client/tests/support/mock_edge.rs
#	crates/sync/src/store.rs
#	crates/ui/src/state.rs
2026-11-07 19:37:42 -07:00
Wing
a21e2add2c Merge zeron/cloud-fast-wake 2026-11-07 19:36:35 -07:00
Wing
9a651772d6 Merge zeron/credit-rate 2026-11-07 19:36:35 -07:00
Wing
cf27cfc23a Merge zeron/relay-mobile-ios 2026-11-07 19:36:11 -07:00
Wing
263fd8d8f1 iOS bindings: regenerate for SessionHandle.remove_send
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 19:14:08 -07:00
Wing
6a628b1262 iOS: version 1.0.2, with Activity
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-07 18:47:13 -07:00
Wing
11420d6917 iOS Activity: Archived shows more a tap; no archive while working
Matches the desktop's shelf and Archive:
- Archived shows its first 10, then "Show N more" (25 a tap).
- With Activity on, a working or waiting chat's swipe offers Sleep
  without Archive, and its menu's Archive is disabled: "Stop it first:
  its agent is still working".
- `-fresh-demo` starts the demo from its fixtures alone; a test that
  passes `-activity` also starts with nothing folded.
- The Activity UI flows scroll to rows below the fold, match menu
  items that carry a subtitle, and swipe the list's last row clear of
  the bottom bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-07 18:47:00 -07:00
Wing
a02a326b3f iOS: Activity on the Sessions page, Sleep, and Settings → Activity
The desktop sidebar's Activity (PR #1262) on iPhone and iPad: one list
of the chats that need you, the one back last at the top, Pinned above,
and Working, Asleep and Archived folded at its foot. Turned on from the
Sessions "…" menu (with a link to Settings → Activity) or Settings; off
by default, and off the page is as it was.

- Engine truth through the core: rows carry the sleep state
  (Chat::sleep_state) and whether a Waiting chat waits on a process;
  the FFI's ChatIndicator gains Waiting (drawn exactly as Working).
  CoreClient.sleepSession writes Chat.sleep (synced per field);
  stopWaiting asks the chat's host (StopWaiting).
- Sleep from a swipe or the long-press menu: In 1 Hour, In 3 Hours,
  This Evening, Tomorrow, Next Week (each saying when), or Custom… with
  the system date picker. Asleep rows say when they wake; Wake from the
  same places. Woke rows ring the alarm glyph until seen.
- Settings → Activity: the view, folding working chats into Working, a
  note on Sleep, and auto-archive of idle chats (as the desktop's sweep).
  Group by Project and New Section stand aside while it's on.
- Demo: one chat asleep, one woken, one waiting on a process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-07 18:46:59 -07:00
Wing
346044f908 Merge zeron/relay-layer (279a9858): main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 17:38:18 -07:00
Wing
d96f4af7c6 Phone: a send's Cloud machine that updates first says so
The mobile core never read a session's stage. While one of the phone's sends
waits on a Cloud machine, it now reads the session list every 5 seconds, and
for a minute after the machine last read as starting, waking or updating;
nothing waiting, nothing read. Any read of the list counts, a screen's too.

The setup step under the waiting message, which said "Waking the machine"
until the machine's heartbeat came back, now says "Updating the machine"
while it installs a release, and the send doesn't fail for its age
meanwhile. iOS and Android draw that step as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 00:37:01 -07:00
Wing
fe8be7feba A send waiting with no network says the phone is offline, not the host
With the phone offline and a send in the outbox, the composer said "<host> is
offline — will send when it's back": a queued send was checked before the
phone's own connectivity. The phone can't know where the host is with no
network, and the send waits on the network first. The phone's own offline
state now wins over a waiting send, and the banner reads "Offline — sends are
saved", as it already did with nothing pending.

Seen on a real iPhone with the network cut. Checked there with screenshots
before and after. There's no unit test: the banner is chosen inside
CoreSessionSource, and the iOS test target needs a simulator build of the
core. main and Android's SessionScreen.kt have the same order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-06 21:14:35 -07:00
Wing
eb2ff01871 A turn saved mid-stream doesn't claim to be running with nobody to hear from
With no path or no host, a streaming tail is only a copy of what was. "Writing…" and
its clock went on for as long as the host stayed away, with a stop button that would
have waited in the doc for a later turn.

Also: the engine logs a chat link it accepts, which is how a rig sees a phone's link,
and relay_rig gives each chat a folder of its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 18:06:35 -07:00
Wing
830042791e iOS follows relayed chats, and says where a chat is
The app runs the relay layer, and an empty transcript says why it's empty, with the
desktop's strings. A send waiting on a path or a host no longer ages into "Not
delivered". Debug arguments let a rig play an old phone, a phone with no network, and
a send from outside.

relay_rig drives a headless engine while a phone is tested against it, and
docs/design/relay-mobile.md is the handoff for Android.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 18:06:35 -07:00
Wing
84f24f36ab Cloud: a credit is a minute of a small machine, from a cutover day
A credit is meant to be a minute of a small machine, which the provider
bills at 0.5×: 30 billable seconds. The code charged 60.

Balances are worked out from raw usage seconds at the current rate, so
just changing it would re-price all past usage too. The rate now goes by
the UTC day the usage fell on: days before CLOUD_CREDIT_RATE_FROM stay at
60 seconds a credit, and from that day on it's CLOUD_CREDIT_SECONDS. That
covers the balance, plan periods, usage per day and a running machine's
live estimate, which is split at midnight. Provider seconds and dollars
don't change.

Without a real day in CLOUD_CREDIT_RATE_FROM every day stays at 60, even
with CLOUD_CREDIT_SECONDS set. wrangler.jsonc carries the new rate and a
placeholder day, so merging changes nothing until a deployer picks one.

The apps say "a small machine" now, and the "about N hours" line, which
was about the default machine, says small-machine hours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 17:35:29 -07:00
Wing
922aea4cc7 iOS: a new session in a plain folder doesn't ask for a worktree
The "New worktree" pick is saved with the draft and survives a switch to a
project with no git, where its chip is hidden. The host then refused the run,
leaving an empty chat. Only a git project now sends a worktree; the pick stays
for the next one, and drafts already saved on phones are covered too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 15:13:55 -07:00
Wing
971a32710b
iOS: version 1.0.1, since Apple has closed 1.0 (#1240)
App Store Connect refuses new builds on a version it has approved.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-05 15:34:59 -07:00
Wing
2a2212c70f
The new app icon on iOS and Android (#1239)
iOS gets its light, dark and tinted icons. Android goes flat, ink on ivory in
light mode and ivory on ink in dark, its mark and tile separate layers again so
launchers can animate them. The sign-in screens carry the new mark.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-05 14:55:14 -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
zeronsh[bot]
b28c9953cd
Add fx as a native ACP provider (#1099)
Co-authored-by: Wing <44917547+wingleeio@users.noreply.github.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-10-29 10:41:20 -07:00
Alexandre V.L
64a26d3598
Questions: show what was answered, and close one without answering (#1022)
* Questions: show what was answered, and close one without answering

* Questions: fixture and before/after frames for answers and closing

* Questions: keep the question text clear of the panel's close, and let assistive tech press it

The corner close (desktop 28px at 12px in, iOS 36pt at 8pt in) overlapped the
first line of a long question; the text now wraps short of it. The desktop
close also answers the accessibility Click action, like the composer's own
buttons.

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

* Questions: reviewer polish (close-button header clearance on desktop/iOS/Android, side_chats test, ARCHITECTURE.md)

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: 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-27 01:09:11 +00:00
Wing
d8a14b35b1
Messages an agent sends other chats read as one line naming the recipient (desktop, iOS, Android) (#1068)
* Mobile: messages an agent sends other chats read as messages, not tools

A zeron send_message / send_messages call leaves the tool group and shows
as a bubble on the agent's side: `Message to [mark] Chat` over the text
it sent, left-aligned, the recipient resolved the way the MCP server does
and opening on tap. Faded while sending; a failed send says so.

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

* Screenshots: an agent's sent message on Android (dark, light, recipient opened)

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

* Desktop + iOS: messages an agent sends read as messages, not tools

Desktop: a zeron send_message / send_messages call becomes a SentMessage
row, `Message to [logo] Chat` over the user bubble mirrored to the
agent's side, the recipient resolved against the chat list at render
and opening on click (compact mode folds it with the rest of the work).
The sender caption and this one share render_chat_caption. iOS: the
caption link reads "Open chat"; a UI test taps a sent message's recipient.

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

* Sent messages: one line naming the recipient, not the message

An agent's send_message now reads as `Message to [logo] Chat` alone,
on desktop and in the shared mobile layout (a new caption row); the
user bubble loses its outgoing variant.

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

* iOS test + screenshots: the sent-message line

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

* Screenshots: the sent-message line on Android

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: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-10-26 14:07:57 -07:00
Wing
f65c5bc60a
Mobile: agent senders as a caption over the message (iOS + Android) (#1062)
* Mobile: agent senders as a caption over the message (shared core + iOS)

A message another chat sent through send_message shows
`Message from [mark] Chat` over its bubble, as on the desktop: the
routing header leaves the bubble, the sending chat's live title and
provider mark come from the workspace, and tapping opens that chat.
The header's writer and parser now live in zeron-proto.

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

* iOS: sender caption tap test, VoiceOver label, screenshots

The caption's one link is the sender (mark and title), read as
"Open sending chat"; AgentSenderTests taps it in the demo and lands
in the sending chat.

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

* Android: agent sender captions open the sending chat, with its provider mark

The caption's zeron-chat link opens the sender in-app (over this chat on
the phone so Back returns here; the main column beside the sidebar),
never handed to ACTION_VIEW. Transcript icons draw brand:<harness> with
the providers' own marks (Claude keeps its orange) and bubble.left as a
chat glyph.

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

* Android: sender caption screenshots (demo chat-side, dark/light, sender opened)

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

* Mobile: sender caption spaces its mark evenly and stays within the bubble

The mark rides a word joiner with a space on either side, so it sits as
far from the title as from "from"; the caption is capped at the bubble's
width and fades past it.

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

* iOS: recapture sender caption screenshots

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

* Android: recapture sender caption screenshots

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: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-10-26 07:16:09 -07:00
Wing
2ea4e3a05e
iOS: rest the composer level with the sidebar toolbar (#1014)
Beside the sidebar the composer assumed the toolbar sits on the safe
area. Where the system actually puts it differs by device and OS: on the
unfolded Duo its buttons sit ~10pt lower, so the composer floated above
them. iOS 26 draws the toolbar outside `nav.toolbar` (not even in the
window), so measure the row with a zero-size, invisible bar item and
center the resting composer on it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 11:56:38 -07:00
Wing
3c97a05cfa
iOS: paint terminal box and block glyphs; fix the subagents chip icon (#1010)
Box drawing, block elements and the ⏺ bullet are now painted into their
cells instead of shaped. Geist Mono has none of them, and fallback glyphs
neither fill the terminal's line height nor the cell width, so Claude
Code's block-art mascot showed seams and borders broke between rows; ⏺
fell back to the color emoji. Other one-cell symbols ask for their text
presentation.

The subagents chip drew its bot icon as a speck: the tool-* SVGs declare
1em and load at a point square. Rasterize assets at the icon's size.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 10:17:29 -07:00
Wing
dfbb6876c0
iOS terminals: direct WebRTC link to the host computer (#1007)
* iOS terminals: direct WebRTC link to the host computer

Terminals on iPhone, iPad and Duo now pair straight with the computer
that hosts the session and move onto a DataChannel within ~300-450ms of
opening, with the cloud relay carrying them until then and whenever the
direct path is down.

- zeron-term-link: the terminal link protocol and the relay/direct hub,
  moved out of the engine so the mobile client shares them. Switching
  paths neither drops nor repeats output; unacknowledged input is replayed
  and the host applies it exactly once.
- zeron-preview: ViewerPeers for engine-free clients, faster ICE (srflx
  early-out, 1s gather budget, 50ms checks), signaling wake probe.
- Client: network-path and foreground hooks re-pair at once, warm pairing
  when a terminal is about to open, relay writes retried with backoff.
- iOS: bolt "Direct" badge on the terminal and in Companions, local
  network usage string, DEBUG -e2e-terminal probe.

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

* iOS terminals: drop the Direct badge

Which route a terminal's bytes take is plumbing; the terminal just gets
faster. The path stays tracked for the DEBUG terminal probe.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 09:54:44 -07:00
Wing
fd7d268ca4
iOS: terminals, side chats and subagents beside every session (#988)
Subagents: a spawn's card in the transcript opens the child's own
transcript, read-only (the host's live doc while it runs, its uploaded
copy once done; nested spawns open further in). Side chats: start a fresh
one or fork the conversation; they open beside their parent. Terminals:
shells on the chat's host, in its folder, with a key bar, scrollback,
selection, pinch-to-zoom and reattach after relaunch.

All of it gathers in a companions panel: a sheet on iPhone, the inspector
column beside the session on iPad and the unfolded iPhone Duo (carried
over as a sheet when it folds). Glass chips above the composer show what's
working alongside.

The desktop's terminal emulator and echo predictor move into a shared
crate (zeron-term) that the mobile core now runs too, so typing over the
relay paints ahead of the host's echo the way the desktop's does.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 07:33:55 -07:00
Wing
987bb2f878
Agent CLI updates through the real owner, a known-bad release list, and Muse Code (#978)
* Agent CLI updates: update through the install's real owner, hold back known-bad releases

Ownership. An npm-packaged CLI (Claude Code, Codex, Pi, OpenCode) is now
updated by the package manager that installed it, judged from where its
launcher resolves and really lives: npm into the exact prefix it lives in
(with that prefix's own npm, `--allow-scripts` so npm 12 still runs the
package's postinstall), pnpm (approving its build on 10.4+), bun, yarn or
Volta. A mise-managed CLI (shim, install, wrapper script, or mise's own
binary behind a shim, including Homebrew's mise) and a copy inside some
project's node_modules are left to the user, saying why, instead of running
a self-updater that would write a second copy elsewhere. An update whose
install changed since its check is checked again rather than run.

Compatibility. A per-CLI policy of releases known not to work (or not
supported) with this zeron: published at {edge}/releases/
harness-compatibility.json (fetched at most hourly, cached for offline
starts, a 404 meaning none) ahead of a built-in list. A held-back release
is never reported as available, so neither Update nor an automatic install
reaches it, and an explicit apply straight at one is refused. An installed
release the policy names is flagged in Settings with the release to use.

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

* Muse Code: a harness slot, its installer and updater, and its marks

Adds HarnessId::Muse (Meta's Muse Code, driven over its own session
protocol) everywhere an agent is named: the registry (lazy, so nothing is
probed until it's used), the installer (dev.meta.ai's install.sh /
install.ps1), skills discovery (.agents/.codex/.claude skills in the project,
$XDG_CONFIG_HOME/muse/skills), the desktop and phone brand marks, labels and
the static model fallback (muse-spark-1.2).

Updates: the latest release comes from Muse's channel manifest
(MUSE_CHANNEL, muse-stable by default). Only the official launcher can
refresh itself, through its documented update environment (it has no
`update` subcommand); a standalone binary is reinstalled by hand. Muse's
`-R<n>` build revisions order after their release.

The session driver itself lands separately; until then a Muse run says so.

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

* Muse Code: drive sessions over its session protocol

MuseHarness now runs Muse natively over MSP (`muse serve`, NDJSON JSON-RPC
on stdio): the initialize handshake (schema version 1; Zeron's MCP server
offered only when the host grants it), sessions started or resumed by id
(a session Muse no longer has starts fresh, saying so), turns that end on
`turn/completed`, prompts during a turn steered in at the next step and
confirmed when Muse echoes them, stop as `turn/interrupt` with the runtime
kept, model changes applied in place, approvals allowed once (denied for a
read-only title run), questions through the composer, text, reasoning,
typed tool calls with diffs, subagent and workflow spawns as background
work, usage and context, and refusals and crashes reported with Muse's own
words. An inherited META_API_KEY is dropped so the user's login is used,
and Muse's self-update is off mid-session (Zeron updates it).

Tested against recorded Muse 1.4.x sessions replayed by a fake host.

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

* Muse Code: its real mark and name

Muse Code's own mark (Meta's infinity) replaces the placeholder "M", on the
desktop and the phone, kept in its brand blue (#0081FB) like Claude's
orange; the agent is named Muse Code throughout.

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

* Muse Code: follow-up prompts work against a real Muse

Found live against Muse 1.4.12: every prompt after a chat's first failed,
"workspaceRoots cannot ride ifBusy steer". The workspace root is sticky in
MSP (it binds at a turn's launch and persists), and Muse refuses it on a
steer, which may launch no turn to bind it to. Only the run's first prompt
carries it now; the fake host enforces the same rule, so the steering test
fails on the old behaviour.

A stray non-UTF-8 byte in a Muse frame now costs that character, not the
session (the same tolerance every other driver got in #977).

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

* Muse Code: any number of accounts, kept by Zeron, and sign-in in the app

Muse keeps one login per config root, on macOS in the Keychain. Zeron now
keeps each Muse account it adds in a config root of its own
(agent-accounts/muse-homes/<slot>, file-backed via TBH_CREDENTIAL_BACKEND
so no Keychain prompt can stall a background engine), and points a Muse
run at the selected one. Switching changes which root the next run gets —
the parked session is replaced at its next turn through the run-credential
fingerprint — nothing is ever swapped, so no process refreshing a login can
lose it. The root mirrors the user's real config (every entry linked, and
Muse's own entries except auth.json), so git, gh and Muse's settings and
skills see what they always do. With no account selected, Muse runs on its
own login, untouched.

Sign-in, identity and sign-out go through Muse's own account surface (MSP
account/loginStart device code, account/read, account/logout; the
experimental tier in 1.4): Providers → Muse Code shows Muse's code and link
the way GitHub's device sign-in does. Muse mints, refreshes and locks its
tokens itself; Zeron never reads one. Usage meters stay empty for now:
usage/read answers what that host process observed, and a probe's is fresh.

Registry: a second spawn-time environment provider (the agent accounts')
after the Cloud broker, consulted for run credentials too.

Verified live against Muse 1.4.12 with a real Meta account: the device
sign-in, the account label, a real turn and a steered second one on the
kept account, and sign-out (opt-in test: tests/muse_account_live.rs).

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

* Muse Code accounts: a sign-in stays valid while it waits, and a kept root shares no lock

Found testing in the app: a second "Connect" replaced the Muse sign-in
waiting for approval, killing the Muse holding its device code, so the page
already open for that code said it was invalid. A start now returns the
sign-in still waiting instead. A cancelled sign-in's root is deleted with
it, and roots of sign-ins an engine never finished are swept.

The mirrored config root linked Muse's credential-store lock
(`.auth.json.lock`) from the user's real config: every kept account and
the user's own login would have serialized on one lock. The store's file,
its lock and any temp file of an atomic write are now the account's own.

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

* Muse Code accounts: log each sign-in step, and no special note in Providers

The engine now logs a Muse sign-in's start, Muse's completion outcome (or
why its host failed, with stderr), the adoption, and any cancellation, so a
sign-in that goes wrong in the app can be traced. An opt-in test signs in
for real through the engine's own path.

Muse's Accounts section had a standing note no other provider shows; Muse
accounts behave like any other provider's, so it is gone.

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

* Muse Code accounts: usage meters, from the runs that use them

Muse observes a subscription's usage only from Meta's model stream, on
the host doing the work (`usage/read` on a fresh host is always empty), so
the meters come from runs: session hosts opt into Muse's experimental
surface, where `usage/changed` is delivered, and the driver turns each into
a new AgentEvent::PlanUsage (never written to the transcript). The engine
hands it to the run environments with the credential the run started
with; the Muse accounts record it on that kept account's row. Muse is no
longer probed for usage. Muse 1.4's tier is an opaque numeric id, so it is
not shown as a plan.

Verified live against Muse 1.4.12 on a kept account: a turn completes with
the experimental opt-in, and usage/changed carries the session window and
the week.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 14:48:35 -07:00
Wing
6f2721fab7
iOS: keep the session through iPhone Duo fold and unfold (#981)
Folding rebuilt the open session for the tab shell a turn later (with an
animated push), so under the system's fold animation the outer display
showed the Sessions list, then an empty loading page, then the
transcript. Unfolding rebuilt it again for the split. The split now
moves the same SessionViewController between its column and the tab
shell at once, keeping its scroll position and draft. UIKit doesn't
reliably send appearance callbacks mid-fold, so a session closes only
once it's on no navigation stack.

A width change (fold, rotation) re-wraps the transcript on the worker;
when that frame lands while following the tail it now pins to the
bottom at once instead of gliding there on the follow spring.

Also on iPhone Duo: the sidebar's title and search sat under an empty
bar from the split's own navigation controller (now hidden), and the
session's voice button joins ⋯ in the vertical bar.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 13:40:41 -07:00
Sina Khalili
5b8edb2de8
iOS: don't crash Providers when there's no device to pick (#980)
A new account with no paired computer and no Cloud offer has an empty
device menu. UIKit aborts on a .popUpMenu with nothing to select
("Menu does not have a valid element for default selection"), and
onboarding reopens Providers on launch, so the app crashed every time
it opened. Skip the pop-up accessory when the menu is empty.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 13:27:09 -07:00
Wing
4cd1591756
iOS: the bottom bar's shell has no tab bar to come back (#971)
The iPhone shell kept a UITabBarController (one tab, bar hidden) as the
container for the new bottom bar. Popping a screen that hides the bottom
bar (a session, Settings) made UIKit bring the tab bar back, so on device a
"Sessions" tab pill sat over the bottom bar.

The shell is now a plain container for the Sessions navigation stack, so
there's no tab bar left to reappear. "Is this the iPhone shell" checks walk
up to it (`mainShell`) instead of asking for a tab bar controller.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:42:44 -07:00
Wing
f30a8641b2
Log in from error cards, a one-row iOS bottom bar, and session delete (#967)
* Error cards: "Log in" for signed-out and limit-reached runs

A run refused because the agent is signed out or out of usage now says so,
with a Log in button that starts that provider's sign-in right away.

- proto: run_errors::provider_problem classifies a failure message as
  signed out or limit reached (one classifier for every client).
- iOS: errors render as a red alert card (soft red wash, lighter red text);
  Log in opens the chat's agent accounts (its computer, or Cloud) and starts
  the sign-in.
- Desktop: the transcript error card gets the same treatment and labels
  ("Signed out", "Limit reached"); Log in opens Providers for the chat's
  device with that agent open and its sign-in started.
- Mock agent: a "/error <message>" prompt fails the run with that message,
  for demos and screenshots of any failure.

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

* iOS: one-row Liquid Glass bottom bar

Replaces the tab bar and its "New session" accessory with a single row of
native toolbar items on the Sessions list: Settings, Search (the system's
toolbar-integrated field, filtering the list in place), voice, and a
prominent New session button. Settings pushes over the list; the bar
belongs to the front page alone and steps aside for sessions and folders.
During a call the voice button shows the call and reopens it.

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

* Error cards: Log in button on the right

The button now trails the message (centered on it) instead of sitting
under it, on iOS and desktop. On desktop the copy button moves beside it.

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

* Desktop error cards: borderless, Log in under the message

The transcript's error card drops its border (the red wash alone, like
iOS), and its Log in button goes back under the message. iOS keeps the
button on the right.

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

* iOS: delete sessions; title and device head the session menu

- Delete in the Sessions list's long-press menu and the session's ⋯ menu,
  after the desktop's "Delete session?" confirmation (a Cloud session's
  machine goes with it). Archive is no longer styled destructive.
- The session's title and "project @ device" move from the navigation bar
  into the ⋯ menu's header.

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

* Desktop error cards: Log in in the app's button style

A compact tinted button (6px corners, the card's red at low opacity,
medium 12px label) instead of a fully rounded solid pill.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 13:36:11 -07:00
Wing
cc7da5c2aa
Zeron Cloud, provider switching, and the phone model picker (#966)
Cloud chats on machines of their own (delegation, sleep/wake, durable delete), a credential vault, Stripe billing with Cloud's own portal, per-account Cloud availability, the edge's Cloud model list, provider switching between turns, the phone's tabbed model picker, and desktop/phone/engine polish.
2026-10-22 03:18:13 -07:00
Wing
c526d6f7cf
iOS: adapt to iPhone Duo (fold/unfold, uneven safe areas) (#942)
* iOS: adapt the shell to the window, not the device, for iPhone Duo

The split shell is now the root on every device. It shows the sidebar
when the window is regular in both directions (iPad, an unfolded iPhone
Duo) and collapses to the tab shell otherwise, live as the window changes,
so folding or unfolding carries the open session across. Phones in
landscape keep the tab shell. The sidebar narrows on narrow regular
windows so the session column keeps room, and foreground content centers
on the safe area since its insets can differ side to side.

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

* iOS: keep iPad sidebar width; lay the transcript out between side insets

UIKit holds the sidebar at its minimum on narrow windows, so lowering it
everywhere narrowed the iPad mini's. Only windows under 700pt (the
unfolded iPhone Duo) go down to 280pt now.

The transcript laid out at the full view width while the scroll view
shifted it by the leading safe-area inset, so with uneven side insets
(landscape iPhones, the Duo's camera edge) text ran under the trailing
edge and content was wider than the view. Lay out between the insets.

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

* iOS: rest the composer level with the sidebar toolbar

Beside the sidebar the composer sat 8pt above the safe area while the
sidebar's system toolbar sits on it, so the two bottoms didn't line up.
The composer now rests on the safe area when it's beside the sidebar and
stays 8pt up on its own (iPhone, sheets); it's still 8pt above the
keyboard everywhere.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 12:22:53 -07:00
Sina Khalili
c02739da30
Render LaTeX math in messages with zatex (#912)
* Render LaTeX math in messages with zatex

Add zatex, a small LaTeX math engine driven by any OpenType MATH font,
and typeset inline and display math in desktop and iOS transcripts.

- zatex: TeX parser plus Appendix G layout from the font's MATH table,
  fallback chains (Fira Math borrows from STIX Two), ssty script glyphs,
  strict errors with byte ranges, and bounded input, depth, items and work.
- Markdown: pulldown-cmark math, Block::Math, \(...\) and \[...\] rewriting,
  currency and shell-variable heuristics, streaming-safe mend.
- zeron-text: inline boxes and per-line height growth.
- iOS: formulas as GlyphPrims drawn with CoreText; desktop: NBSP slots
  painted from GPUI's glyph atlas, copying back to the TeX source.
- Settings on both platforms: Render math, Math font, Math size.
- Bundles STIX Two Math 2.13 and Fira Math 0.3.4 (OFL-1.1).

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

* Bundle six math fonts: Computer Modern, Libertinus, Palatino, Euler

Add New Computer Modern Math (Book), Libertinus Math, TeX Gyre Pagella
Math and Euler Math beside Fira Math and STIX Two, each falling back to
STIX Two, and offer all six in the Math font setting on desktop and iOS.

- zatex::bundled: six faces in an append-only font table; each face is
  parsed only when first used.
- Desktop registers and verifies a face with GPUI only when one of its
  glyphs is first painted; iOS copies a face's bytes across the FFI only
  when one of its glyphs is first drawn.
- Unknown math font values fall back to Fira Math without discarding the
  rest of the settings.
- Licenses: OFL-1.1 (Euler Math) and the GUST Font License (New Computer
  Modern, TeX Gyre Pagella) added beside the fonts and to the notices.

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

* zatex: bound layout work and formula size

Review feedback on #912 (DoS via untrusted message content):

- \middle bodies are laid out once: the list layout now builds pieces,
  sizes \middle placeholders from the rest of the body, then assembles.
  Nested \left...\middle...\right is linear instead of doubling per level.
- Every emitted glyph, rule, array cell and assembly part counts toward a
  work budget (4x max_items) that is never reset.
- Dimensions are capped at 100em after unit conversion (\kern1000in was
  7227em), and a finished formula wider than Options::max_width (2000em),
  taller than max_height (200em), or with any item farther out is
  TooLarge, so hosts never size a slot, row or backing store from it.
- Document the stack needed per nesting level; Fira's OFL text now comes
  from the v0.3.4 tag that matches the bundled font.

The reviewer's 16 KB reproducer (d=14) went from 11-27 s to about 1 ms.

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

* Markdown: keep prices, code and links intact around math

Review feedback on #912:

- A rejected $...$ span (price, path, shell variable) is no longer printed
  as raw source: its opening $ is escaped and the text reparsed, so
  markup inside it (bold, links, code spans) survives as on main.
- The \(...\) / \[...\] rewrite runs per top-level block, bounds code-span
  and closer searches to their paragraph, skips fences (including quoted
  or listed ones), link destinations, autolinks and reference definitions,
  and treats an opener glued to URL or identifier characters as an escape.
- Paragraphs end at setext underlines, table delimiter rows and HTML
  blocks for closer searches, so streaming and one-shot parses agree.
  A randomized parity test streams 8,000 documents at chunk sizes 1-17.
- Shell variables ($PATH:$HOME, $USER@$HOST) stay text.
- Streaming repair: $HOME no longer opens a never-closing formula, an
  unclosed $ or \( shields only its own line, and \(...\) / \[...\]
  contents are shielded like $...$.

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

* Desktop math: layout outside the cache lock, bounded slots, tolerant size

Review feedback on #912:

- The formula cache looks up under its lock, then lays out without it and
  re-locks to insert, so a slow layout never blocks other lookups.
- Inline slots refuse formulas whose (scaled) extent is non-finite,
  negative or past 8192 em, and show their source instead, so no surface
  ever builds a giant NBSP string.
- A malformed mathSize (1.5, "big", -1, null, ...) is clamped or falls
  back to 100% instead of resetting every setting.

With the zatex bounds, the reviewer's worst inputs lay out cold in about
1-2 ms on the UI thread and 3.5 us once cached.

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

* iOS math: fonts off the draw path, cached failures, bounded fallbacks

Review feedback on #912:

- A row's math fonts are resolved when its RowModel is built (on the
  prefetch queue), so draw(_:) never loads font data.
- Formulas zatex rejects are remembered (a 256-entry LRU of hashes on the
  layout worker), so re-preparing a row never pays a bad layout again.
- Long display math that can't be typeset wraps as inline code instead of
  a one-line code block, whose scroller canvas would span the whole line.
- Tests: the reviewer's `Hi $` + `\\`x8000 + `$` row stays bounded and
  shows its source.

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

* Markdown math: read delimiters from the parse, stay linear

The `\(…\)` rewrite and the absolute-destination rewrite no longer scan
the source with hand-rolled block rules. Both take their candidates from
pulldown-cmark's own inline text, so code (fenced or indented, in any
quote or list), raw HTML, autolinks, link destinations and reference
definitions keep their spelling by construction, and a formula pairs
only within one paragraph, heading, cell or link text.

- Linear: no per-event line scans, no backslash-run rescans, and every
  destination close comes from one backward pass (also fixing main's
  quadratic on unclosed `](`). 256 KB worst cases: 9.4 s → 13 ms.
- Openers after operators (`k=\(2\pi\)`, `-\(x\)`) are math; inside a
  URL or path word they stay escapes. Bodies with an unescaped `$` and
  source dollars pairing with a rewritten opener stay literal.
- Streaming: a trailing lone `$` no longer flashes prose as a formula;
  quoted/listed link definitions and lazy continuations reparse wide
  enough to match a full parse; stray task markers pulldown emits after
  an item closes are dropped.

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

* zatex: a formula's box holds all of its ink

Hosts size slots, lines and rows from a formula's box, so ink outside it
painted over surrounding text (`\text{Approve}\\[-40em]\\` reported zero
height and drew 19 em below its line). The box now grows vertically to
cover every glyph and rule; ink reaching more than an em past the advance
is refused as TooLarge. Bounds that overflow to infinity refuse too, the
stack note on max_depth is corrected, and the iOS layout thread gets an
explicit 8 MB stack.

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

* Math: reserve every formula's painted extent; tighten streaming fixes

- zatex reports `left`/`right`, the horizontal extent of everything a
  formula paints together with its advance box (`Formula::span`), and no
  longer tolerates an em of overhang. iOS sized inline formulas, display
  formulas and table columns from the bare advance, which negative space
  makes negative: `$\kern-8em$` pulled the following words back over the
  preceding ones, and ink left of the origin painted over text. iOS now
  reserves the span and draws from its left edge; the desktop starts its
  slot from it too.
- The lazy-continuation reparse reaches one block, only for a non-container
  block right under a quote or list: alternating list or quote runs made
  every append reparse (and re-find) the whole run (128 KB: 321 ms per
  append, now 0.2 ms).
- Task markers pulldown emits outside their own item are dropped.
- The trailing-`$` display repair applies only where that `$` really closes
  a formula in the parse, so code and raw HTML never show `\$`.
- Escapes around prose stay text: citations and numbers (`\[1\]`) and
  words (`\[Online\]`, `\(optional\)`) are not formulas.

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

* Markdown: check every rewrite against its parse; contain hostile input

- Each `\(…\)` pair must come out of the final parse as exactly one
  formula and each destination rewrite inside a link; anything else (a
  code span the dollar pass reopened, a trimmed newline that moved a
  line, a quote marker inside the body, a `](` with no link) is undone
  and the source reparsed, after a few rounds with no rewrite at all.
- A closer pairs with the nearest opener before it, so each body is
  checked once: `\( ` × 85K + `$ \)` took 4.4 s, now 10 ms. Bodies with a
  backtick or a trailing backslash stay literal, as do reference-link
  labels (their definition must still match) and bare words in `\[…\]`.
- Task markers are kept only inside their own open item (real ones under
  a quote or setext heading were dropped).
- Nesting past 32 levels is flattened, so `>` × 20 000 no longer
  overflows the tree builder's (and renderers') stack, and a
  pulldown-cmark panic (`- [ ] [b]:/\n      \n  -`) renders the source as
  plain text instead of taking the process down. Both also hit main.

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

* Math: bound a formula's room by its source; linear host passes

- zatex refuses a formula reserving more than 20 em + 2 em per source
  byte, either way: spacing alone (`\hspace{100em}` × 19, 266 bytes) made
  the desktop shape ~7,600 NBSPs and `\\[100em]` reserved a page-tall
  row. The 300-sample corpus across all six faces lays out unchanged.
- Desktop line heights are one forward pass over lines, slots and runs
  (hard-broken lines of formulas were lines × slots per render: 370 ms
  for 117 KB); iOS finds each fragment's formula by span index.
- Image alt text keeps a formula's `$…$` spelling.

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

* Math hosts: floor table columns at formulas, cap iOS canvases, reuse layouts

- Desktop: a table column never shrinks below its widest inline formula
  (iOS already grows columns to it). An ordinary `$a_1 + … + a_{10}$` cell
  wrapped its slot and painted ~120px into the next column.
- iOS: display formulas whose scrolling canvas would exceed 1.5M pt²
  (~54 MB at @3x) or 8000×2000 pt, and inline ones taller than 30 em,
  show as source: per-axis bounds let 308 bytes ask for a 3.6 GB canvas.
- iOS keeps successful layouts (1024 formulas / 8 MB of items): every
  streamed token re-prepared its paragraph and laid out each formula again.
- zatex emits at most 64 + 8 items per source byte: nested `\left(` around
  a tall body made 434 bytes into 18,000 items. The sample corpus is
  unchanged.

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

* Markdown math: decide dollars in one pass; contain every fallback

- Dollars are chosen once from a math-free parse: a `$` opens before a
  non-space and closes after one, `$$` pairs as display math, longer runs
  are literal, and a pair must share its paragraph and emphasis span and
  pass the price/shell checks (now also for `$$`: `kill $$ && echo $$`,
  PIDs beside code spans). Every other dollar is escaped up front, so
  pulldown pairs nothing else — the 16-round reparse loop is gone (a
  60-byte snippet forced ~74 parses: 434 ms on 256 KB, now 57 ms), and
  code spans no longer fall out past its cap.
- A failing rewrite leaves only its top-level block literal; the
  message's other formulas still render. Passes with nothing to rewrite
  skip their parse.
- Formulas never straddle emphasis or raw HTML (`**\(x** y\)`,
  `**bold $x** y$`); reference images keep their labels; URLs, `%`
  comments and prose (`\(see **note**\)`, mid-sentence `array \[i\]`,
  `cite \[1, 2\]`) stay literal.
- Destinations: candidates come from the parse's own paragraph regions
  (fixing `[a](/x y.md)` beside a `[a]:` definition), and a rewrite must
  finish its own link, not just sit inside another.
- Nesting past the cap collapses to text placed the way lists and tables
  take children, so nothing is dropped; task-marker ranges start at the
  bracket; labels spanning lines force a full reparse.
- Linear where main wasn't: autolink paren trimming (`)` × 64K: 2.95 s,
  now 0.2 ms) and mend's delimiter matching (950 ms per append, now
  27 ms); mend's `\(` glue rule matches the parser's, and a lone `\[`
  before prose no longer shields its block.

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

* Math: keep URLs and versions literal; bound table floors and slot lookups

- Dollars in a URL word (`scheme://…`) or right after `?`/`&` are part of
  it: `…/messages?$select=subject&$top=10` stays one link instead of
  ending at `?` and showing `$select=subject&$` as a formula.
- `\(x86\)`, `\(arm64\)`: tokens mixing letters with two or more digits
  read as versions, not formulas.
- iOS: a table column grows to at most 1200 pt for a formula (a wider one
  shrinks to fit its cell); the formula cache keys use a per-process seed.
- Desktop: link truncation finds a character's slot by binary search;
  line heights skip paragraphs without inline formulas. Clippy clean.

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

* Math hosts: tables can't be painted over or blown up by formulas

- Desktop: table cells clip what they paint, so a formula whose slot
  still wraps is cut at its cell instead of drawn over the next column.
  The column floor now shapes the whole unbreakable word around each
  formula (`cost=$F$`) at the size cells really set (rems, not 14 px).
- iOS: formulas in table cells are held to 6 em (a scrolling table is one
  canvas as tall as all its rows: ~2 KB once asked for 11 GB); display
  math drops its 2000 pt height cap — area alone bounds the canvas, and
  long `aligned` derivations render again.
- iOS's formula cache is an O(1) lazy LRU of up to 4096 formulas / 8 MB,
  so a paragraph of over a thousand formulas no longer thrashes while it
  streams.

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

* Markdown math: shell and regex dollars stay text; failures stay local

- Dollar spans that read as shell or regex text are not formulas: quoted
  (`"$HOME" and "$USER"`), a trailing `,`/`;`, a bracket closed before
  opened (`($foo) or ($bar)`), braced names (`${A}${B}`), anchors
  (`/x$/i`, `'a$|b$'`), an amount then words (`$10k, or 5$`), sigils
  (`@$ref`); `$$` around words with no TeX (`Use $$ for the PID…`); and
  `\(…\)` around short words or bare punctuation (`\( and \)`, `\(.*\)`).
- A failing rewrite leaves only its innermost block (or, outside any
  block, its line) literal: a stray `](` no longer turns off a whole
  list's math, nor a rewritten reference definition the whole message's.
- A formula may not break a link the math-free reading has
  (`[a $[$] b](u)`).
- Text pulldown reports inside raw HTML is no candidate (no stray `\`);
  collapsed deep content keeps word breaks; streaming display ranges end
  on a char boundary; a line break ends a destination even when escaped;
  the trailing-`$` check runs only for blocks holding a formula.

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

* Math hosts: table floors shape each word once; cache compaction keeps live uses

- Desktop: the table floor shapes each unbreakable word once, however
  many formulas it glues together, and at most 512 bytes of it (past
  that the formula's own width stands in; cells clip anyway). Glued
  formulas (`$x$a` × 4000) made it O(slots × word) per render: 755 ms.
- iOS: the formula cache compacts its use queue only after the entry just
  touched holds its new tick — compaction could drop that entry's only
  use, leaving it unevictable until the byte budget stuck over its limit.

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

* Markdown math: identifiers and anchors stay text; linear URL check

- `select_dollars` finds each word's start (past opening brackets and
  quotes) once per word: `(` × 64K then `$a` × 32K rescanned the brackets
  per dollar — 2.6 s on 256 KB, now 13 ms.
- Code and shell identifiers aren't formulas: an opener glued to a word,
  `.` or `=` whose closer runs into another identifier
  (`TOKEN=$TOKEN -e ID=$ID`, R's `df$col`, Vue's `this.$refs`), spans
  starting at a quote or ending on `=`/`+`/`.` (`grep 'foo$' a && grep
  'bar$' b`, `x=$a y=$b`).
- An escaped `\%`/`\&` before a closer is TeX, not a sigil: `$50\%$`
  renders again.
- A `\)` in another emphasis span drops its opener instead of letting it
  pair with a later closer.
- Display-tail blocks past the end of the source (the setext guard's
  zero-width space) get an empty in-bounds range.

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

* Math hosts: per-row canvas budget on iOS; desktop never paints past its text

- iOS: every formula in a row (one backing store) shares a 4M pt² budget
  (~144 MB at @3x, what a long code block or wide table costs); past it
  the rest show as source. A list of capped display formulas summed to
  7.9 GB. Table header cells get the cell cap too, which is now 10 em
  (a 5-row vector fits); display formulas may cover 3M pt² (a 40-row
  derivation at 200% renders).
- Desktop: an inline formula wider than the room from its slot to its
  text element's edge shrinks to fit, as on iOS; cells holding formulas
  stay left-aligned (aligned lines shift glyphs but not slot positions);
  inline formulas taller than 8 em show as source (one line height per
  element); the table floor breaks words where GPUI does; the formula
  cache keeps up to 4096 formulas (still 8 MB).
- zatex: a formula's room is 4 em + 2 em per source byte (was 20 em +):
  16 bytes of `\hspace{46em}` no longer reserve 46 em of slot. The
  sample corpus lays out unchanged.

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

* Math hosts: tables check their real canvas; RTL and narrow rows safe

- iOS: a table's canvas (all columns by all rows) is measured when it's
  prepared; past 4M pt² with formulas it's set with them as source, as a
  text table — formulas that widen a column or raise a row multiplied
  across it (2 KB once asked for 4–15 GB). A row's formulas are charged
  their area plus the band they open across a 1400 pt row (iPad width).
  A header-only table no longer leaves the cell limit on (now 12 em)
  for the blocks after it.
- Desktop: paragraphs with right-to-left text show inline formulas as
  source (slots are placed by left-to-right positions; formulas vanished
  or landed on the words); a slot with no room left on its row isn't
  painted, and centering never pushes one past the element; inline
  formulas are capped at 12 em of text (math size included); each
  display formula's layout is kept per block (a screenful outgrowing the
  shared cache laid every one out each frame); the table floor finds
  word breaks by binary search; `span` is O(1) from zatex's extent.

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

* Markdown math: pair dollars across TeX's own emphasis markers

Choose delimiter pairs from one math-free parse without requiring a pair
to share an emphasis span, so $x^*$ and $y^*$ (and \(x^*\)) stay
formulas. Prose, shell and code spans are judged by dollar_prose, links
are checked against formulas that overlap them, and URL/sigil dollars
are tracked by UrlWords.

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

* Math: contain zatex panics, empty negative rules, URLs after emphasis

- zatex::layout catches a layout panic as ErrorKind::Internal so hosts
  show the source instead of crashing their render path.
- Rules over negative-width content are empty, as in TeX.
- A URL word's scheme is found past any leading punctuation, so
  **https://…/$id$/x** stays one link.

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

* Markdown math: a URL word starts past brackets, quotes and emphasis only

Stripping every leading punctuation byte also stripped table pipes, so
|https://a.com|$x^2$| kept its formula literal.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Wing <contact@winglee.io>
2026-10-17 19:30:30 -07:00
José Gurruchaga
26c8e8404d
Reorder sidebar sections by dragging their header (#909)
* Reorder sidebar sections by dragging their header

Sections now keep a placed order. Each section row carries its own
orderKey, minted between its neighbours' keys as pins are, so the order
syncs across devices and concurrent moves converge. Sections no move has
keyed yet, including those older apps create, follow by creation.

On desktop, dragging a section header lifts the section and slides its
siblings aside; releasing outside the sidebar sends it home. Synced
workspaces need an engine advertising sidebar-section-order-v1.

* Drag sessions between sections on iOS

On the iOS front page, long-pressing a session and dragging it moves it
into Pinned or a user section at the slot it is dropped on, or back to
Recent. Placements carry their neighbours as after/before anchors, so the
order syncs with desktop. A folded destination opens to show the row.

Sections now list their members in their placed order, as desktop does,
instead of by recency. The client and FFI gain pin_session_at and
place_session; assign_section places without anchors.

* Key only unkeyed sections when placing, so concurrent moves survive

Placing a section (or member) re-keyed every row once any lacked a key,
so a move on one device after a section was created could overwrite a
concurrent move from another device with a later clock. Key only the
keyless tail, past the last key, and fall back to re-keying everything
only when no key fits there. Also de-flake the same-section concurrent
move test and dedupe section members in the client view.

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

---------

Co-authored-by: Wing <contact@winglee.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:34:40 -07:00
Wing
8a0fded891
Native visuals: agents show interactive Luau visuals rendered by GPUI (#900)
* Render agent visuals natively from sandboxed Luau scripts

show_visual now takes a Luau script instead of an HTML page. The script
builds its data and state once and returns a view function whose ui.*
tree (layout, text, stats, tables, charts, tabs, toggles, sliders,
buttons, links, 2D canvases, 3D scenes) Zeron renders with its own GPUI
elements, so a visual scrolls, clips, blurs under the glass composer and
takes input like any transcript row on every platform.

zeron-visual is the GPUI-free runtime: a Luau sandbox with no I/O, a
memory cap and per-call time budgets, seeded randomness, strict props
whose style rules are the API (theme color tokens, the transcript's type
scale, no fills or borders), canvas drawing commands, and 3D scene
projection. The engine runs every script through check() before showing
it and returns line-numbered errors to the agent.

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

* Render visual scenes and shaders on the GPU

- Scenes rasterize with a depth buffer (no more painter's-algorithm
  occlusion errors), clip at the near plane, shade curved solids
  smoothly, and paint as one image; the software path renders in
  parallel row bands at full resolution.
- With a GPU (wgpu, new crate zeron-visual-gpu), scenes render with PBR
  materials (roughness, metal, glow, glass with ior and dispersion),
  soft shadows, MSAA, and bloom; the software renderer is the fallback.
- ui.shader runs Shadertoy-style GLSL on the GPU: iTime, iResolution,
  iMouse, iCamera (orbit), named inputs bound to state, iNoise, and up to
  four buffer passes read as iChannel0-3 with feedback. Composited by
  blend (light by default, so black is clear; alpha; opaque) with
  optional bloom. Each pass is validated with naga so errors reach the
  agent with their line.

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

* Add visual assets and iOS visuals, and harden untrusted visual input

Assets: show_visual takes files (glTF models, PNG/JPEG/WebP/HDR images)
from the agent's working directory. The engine checks and stores them
beside the script; scenes gain s:model, textures, environment maps and
sprites, and shaders get iTexture0-3. Limits (16 files, 8 MB each, 10 MB
together) fit the MCP server's one WebSocket message to the engine.

Rendering: GPU scenes and shaders fade out toward their edges; plain
translucent surfaces blend unbent (only glass refracts) and, with sprites,
draw before glass so it refracts them; bloom composites correctly in
alpha mode; shader images sample upright as on Shadertoy.

iOS: each visual gets a Rust worker thread in zeron-mobile that runs the
script, lays the tree out, draws canvases and charts, and renders scenes
and shaders with wgpu; the transcript takes each visual's measured
height, and VisualView only paints what arrives and forwards touches.
The demo gains an "Agent visuals" chat (ZERON_DEMO_VISUALS can point it
at a desktop's visuals).

Hardening (security and code review):
- glTF: images stay encoded and are size-checked when drawn; accessor
  shapes are validated; node walks are bounded; parsing can't panic.
- Images: a pixel budget besides the side limit; textures larger than
  the GPU allows are refused.
- wgpu errors are caught or logged, never a panic; the texture cache is
  keyed by content, bounded, and decodes outside its lock.
- The engine checks for a running turn first and removes partial
  writes; asset names may not differ only by case; the MCP server reads
  only regular files, bounded.
- Desktop: released visuals free their GPU images; iTime and iMouse
  follow the docs; no second render when a drag ends.
- iOS: fonts are shared, not leaked per visual; offscreen and
  backgrounded visuals pause; commands see the tree the last one left;
  failed loads retry.

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

* Render desktop visual frames off the main thread and reuse GPU targets

Desktop scenes and shaders rendered and read back inside GPUI's paint,
blocking the main thread on the GPU every animated frame, so a heavy
agent shader could stall the app. Paint now does only the cheap parts
(input, uniforms, the scene's budgeted Lua draw) and hands the render
to a background thread, one frame in flight per visual; the view shows
the newest finished frame and repaints when the next lands.

Scenes also allocated ~70 MB of render targets every frame. They now
live in a SceneState kept per visual (desktop and iOS) and are remade
only when the size changes; scenes and shaders keep their readback
staging buffer too. The test room's steady frame went from ~8 ms to
~3 ms at 1440x720.

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

---------

Co-authored-by: wing-anara <wing@anara.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:04:16 -07:00
Wing
edb23db4b4
iOS: Group by Project setting for the Sessions page (#875)
Sessions outside Pinned and user sections can group under their project,
like the desktop sidebar's "By project": checkouts of one repository share
a group, project-less sessions group per device. Toggle in Settings →
Sessions and in the Sessions ⋯ menu; local to the phone.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 10:23:20 -07:00
Daniel Katulevskiy
e799aecc16
Fix remote sends stranded by mobile suspension and lost host wakes (#777)
* Fix durable remote send and host wake recovery

* Couple accepted chat rows to durable server host wakes

* Make Linux browser captures wait for mapped and presented frames

---------

Co-authored-by: Wing <contact@winglee.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:24:36 -07:00
José Gurruchaga
4a5fb8b443
Internal session plumbing and packaging cleanup (#819)
* test(codex): document and probe native voice capabilities

* feat(proto): define local voice session contracts

* fix(harness): bound realtime media and prioritize control messages

* feat(codex): attach realtime voice to an idle thread runtime

* feat(engine): own voice leases and enforce subscription eligibility

* feat(mcp): create standalone sessions on selected hosts

Add chat/side kinds with compatible defaults, resolve projects within the selected device, and validate that host's harness and model catalogs before writing. Route transcript reads to the chat host and preserve send baselines across waits so missing session rows and delayed replies cannot return an old response.

Cover invalid requests, remote catalogs, mixed batches, wait races, two-engine execution and interrupt delivery. Add an isolated MCP stdio smoke fixture.

* feat(doc): persist canonical voice transcripts once

* docs(mcp): document standalone and remote session workflows

* feat(audio): add native capture and streaming playback

* feat(audio): handle echo cancellation and voice interruptions

* feat(ui): coordinate voice ownership over local engine RPC

* feat(ui): extract the Bezel orb into a native Zeron component

* feat(ui): replace the composer with a central orb during voice sessions

* feat(mcp): constrain voice orchestration to subscription policy

* build(voice): add microphone permissions and offline audio CI

* test(voice): verify lifecycle, billing boundaries and rollout gates

* fix(voice): preserve text transport and idle billing boundaries

* feat(codex): connect subscription voice through native WebRTC

* feat(engine): activate native voice ownership and preserve delegated work

* feat(ui): enable native voice with central orb and retained drafts

* fix(mcp): keep voice delegation on subscription-backed Codex

* test(voice): document native transport and add opt-in connectivity smoke

* fix(voice): close audit races and validate project subscription context

* Fix Codex voice initialization and macOS microphone permissions

* Allow Codex voice agents to delegate through upstream MCP

* Make voice a persistent orchestrator with a dedicated stage

* Add call controls and elapsed time to the voice stage

* Remove decorative rings around the voice orb

* Add voice selection menu and simplify stage artwork

* Remove voice status labels beneath the orb

* Fix dictation and realtime voice integration after rebase

* Move Codex voice style selection into Voice settings

* Restore window dragging from the voice stage titlebar

* Open the voice stage immediately when starting a call

* Smooth voice orb motion and speaking transitions

* Remove the green audio pulse from the voice microphone control

* Show the live voice orb above the orchestrator chat composer

* Use full chat IDs in MCP reply instructions

* Correlate MCP replies by message IDs instead of remote timestamps

* Keep the voice stage open when launched from Settings

* test(voice): add a split-host Codex voice compatibility probe

* feat(voice): package a standalone desktop media runtime

* feat(proto): define client-media voice control contracts

* refactor(codex): separate voice signaling from local audio

* feat(engine): own remote voice sessions with ephemeral leases

* feat(rpc): route versioned voice controls to execution hosts

* feat(voice): coordinate local media with remote Codex control

* feat(ui): start voice on a selected remote Codex host

* test(voice): cover cancelled preparations and stale session controls

* test(voice): prepare desktop rollout validation and offline CI

* feat(ios): add a pinned native WebRTC compatibility endpoint

* feat(mobile): expose remote voice sessions through UniFFI

* feat(ios): bridge native audio lifecycle to remote voice calls

* feat(ios): add remote voice controls and registered host selection

* test(voice): cover relay and iOS lifecycle and prepare live acceptance

Add half-open and native callback regressions, stage-only diagnostics, complete runtime notices, and development test instructions. Keep real Mac/Fedora/iPhone acceptance opt-in for user validation.

* refactor(orb): share the thinking-orb engine through zeron-orb

Move the renderer-agnostic engine, presets, motion and a new OrbAnimator
(clock, audio response, state crossfades) into crates/orb. The GPUI widget
now delegates to the animator, so desktop and mobile paint identical frames.

* feat(voice): rebuild iOS remote voice around the desktop orb and phone-call audio

- Share the call view (phase, caption, levels, speaking, orb state) in
  voice-session; the client derives speaking because client media has no
  host meter. Keep owner-event headroom so level meters never overflow it.
- Title remote orchestrator chats "Voice session" like local ones.
- UniFFI: typed call state and end reasons instead of JSON, a distinct
  denied-microphone failure, and OrbRenderer frames from zeron-orb.
- iOS: OrbView paints the desktop orb; start voice from the New session bar
  (live strip while a call runs), the session nav bar and the iPad sidebar;
  full-screen call stage with caption, transcript (flagged when Codex waits
  for an answer), mute, route picker and hang-up.
- Phone-call audio: proximity sensor moves output to the earpiece, headsets
  win, calls survive screen lock, headset loss re-routes instead of ending.
  Install the WebRTC audio configuration globally so it is not reverted when
  the audio unit starts.

* fix(voice): install the macOS voice runtime under codex-resources/voice

Codex's helper only initializes from a codex-resources/voice directory and
exits with code 23 on initializeRuntime anywhere else, which the desktop
reported as "Voice could not connect". Bundle the runtime at
Contents/Resources/codex-resources/voice, reject other locations up front,
and report a helper that cannot start as an unavailable runtime.

Ship the runtime byte-for-byte with OpenAI's Developer ID signatures instead
of re-signing it ad hoc.

* fix(ios): reopen the call stage from the live strip and redo voice settings

The live strip in the bottom bar is a plain UIControl, which never sends
.primaryActionTriggered, so tapping it did nothing; listen for touchUpInside.
UI tests cover reopening the stage after the transcript and after minimizing.

Voice settings now follow the Settings list style: the resting orb, the
devices Codex can run on with their status, the voice as a pop-up menu, and
what to expect during a call.

* fix(ios): resume the orb animation when the app becomes active again

At willEnterForeground the app still reports .background, so the display
link never restarted and the orb stayed frozen after returning from Home.

* fix(ios): guard voice preview state in Release builds

* feat(voice): veil streamed caption words in on desktop and iPhone

Move the transcript's renderer-agnostic streaming veil into zeron-veil so
the voice call caption can use the same chunk fades on both platforms. A
new CaptionVeil keeps the veil aligned with the ellipsized tail and fades
the previous utterance out when the speaker turn changes; reduced motion
shows text directly. Desktop recolors GPUI runs; iOS gets UTF-16 spans
through CaptionFader and paints an attributed caption on a display link.
The desktop transcript keeps its behavior; the iOS transcript is untouched.

* fix(ui): step the voice stage aside when opening any session

Opening a session only hid the stage indirectly, when the selection changed,
so clicking the thread already under the stage (or the one you came from
Settings) did nothing. open_chat now hides the stage explicitly; the call
keeps running in the background.

* feat(voice): reuse host orchestrator chats across calls

* fix(voice): reserve orchestrator atomically and preserve rotation retries

* feat(voice): rotate the orchestrator transcript after 1000 entries

* feat(voice): package remote media runtime for Linux and Windows

* feat(voice): use the installed Codex helper everywhere and stop bundling it

Remote voice now plays audio through the client's own standalone Codex
installation, like local voice, instead of a runtime packaged inside
Zeron. The resolver moves to zeron-voice-media and is shared by the
harness and the desktop media endpoint; ZERON_VOICE_MEDIA_DIR remains a
development override. macOS, Linux and Windows packages no longer
contain Codex binaries, GStreamer/GLib or the Visual C++ runtime, so
Zeron takes on none of their redistribution or update obligations.
package-voice-runtime.py stays as a development projection tool.

Missing-runtime messages point to Codex's official installer, since npm
installs lack the voice runtime.

Notices and disclosures:
- THIRD_PARTY_NOTICES: full MIT chain for the orb (Bezel,
  gpui-thinking-orbs, thinking-orbs), Codex NOTICE, OpenAI trademark and
  non-affiliation statement, and WebRTC for iOS.
- The iOS app carries the orb's MIT notice; the Linux tarball now ships
  LICENSE and THIRD_PARTY_NOTICES.md.
- Microphone purpose strings on macOS and iOS state that voice sessions
  stream audio to OpenAI; dictation stays on device.
- Docs describe the voice data flow, and the acceptance checklist lists
  the legal and privacy decisions that block a public release.

* feat(ios): show the voice call in the Dynamic Island and on the Lock Screen

* fix(voice): hide the voice trigger when this device has no Codex

The microphone in the sidebar footer only shows when Codex is installed and
enabled on this device, following the same catalog the composer offers. It
re-reads after Settings → Agents changes and when returning to a window that
hides it. A start without Codex now asks for an install instead of a retry.

* test(voice): seed the real rotation threshold in the remote rotation test

* feat(voice): sound the start and end of a call on desktop and iPhone

A call sounds as it is placed, before the microphone opens, and again when
the user hangs up or a connected call ends. A failure to connect stays quiet
and explains itself. Nothing sounds in between. The iPhone plays them as
system sounds, so they follow the ringer switch.

* perf(voice): skip the rate limits round trip before each call

The pre-call probe read account/rateLimits/read, a ~1 s backend round
trip, and ran twice per call (prepare and negotiate). Its result was never
shown: the native backend makes the final usage decision. Dropping it
saves about 1.7 s per call on desktop and iPhone.

* perf(voice): release the orchestrator runtime 5 minutes after hang-up

The voice orchestrator's Codex runtime and MCP servers hold ~200 MB. Its
idle window was the generic 30 minutes, counted from the runtime's start,
so a call ending late in the window left a runtime reaped right after the
hang-up. It now idles 5 minutes, restarted at each hang-up.

Hang-ups wake the reaper directly, so even a short call restarts the
window, and a reap armed before a call began rechecks for it instead of
cutting the call.

* fix(voice): enable client-owned remote voice by default

* fix(harness): read whole resumed histories and report why stdout failed

509818ed capped every JSON-RPC line at 8 MiB on the transport shared by
text chats. A resumed long chat returns its history in one response
(54-71 MiB measured), so resume failed and was reported as an exit even
though Codex was alive. Lift the cap (voice bounds its own messages) and
keep the read error's cause for every waiting and later request.

* fix(harness): name the rejected request in JSON-RPC errors again

dca9a05f made peer rejections structured but dropped the method from
their message, so chats showed 'JSON-RPC rejection -32600: …' without
saying which request failed. Prefix the method again and render it as
upstream did, keeping the code available for auth detection.

* test: skip POSIX mode check on Windows hosts

* fix: launch Codex batch shims from plain paths and answer account/read in fake

* refactor(engine): remove the superseded local session RPC surface

The client-media protocol replaced these methods; nothing calls them anymore.

* refactor(harness): restore the shared JSON-RPC transport

Return the stdio transport every agent uses to its upstream behavior
(unbounded writes, no timeouts or polling timers) and keep only an
additive notification route that is registered while a subscriber
exists.

* fix(ui): let the full-window stage show the window glass

On translucent appearances the stage painted an opaque fill unlike the
new-thread page. Drop the fill there and fade out the page it covers.

* fix(ui): show the full-window stage over Settings

Settings replaces the workspace layout and never mounted the stage, so
opening it from there did nothing. Mount it beside the settings sidebar
and fade the page it covers.

* fix(voice-session): keep the live caption on the newest turn

Turns arrive interleaved: a user final often lands after the answer has
started streaming. Keep each turn's text separately and caption the
newest one, so a late final never takes the caption back and deltas
never restart it. Desktop and mobile now share this state.

* ci: build the desktop UI only in the UI workflow

The offline-linux job compiled zeron-ui without the WebKitGTK and
JSON-GLib packages its build script requires, so it failed every run.
Drop its UI step; the UI workflow already runs those lib tests and now
also runs the orb geometry test.
2026-10-06 23:47:32 -07:00
José Gurruchaga
8e6da95908
Fix iOS showing fixture conversations when a session fails to open (#826)
* test(ios): reproduce fixture fallback for unknown chat routes

* fix(ios): return to sessions when a chat cannot be opened

---------

Co-authored-by: José Gurruchaga <jsgrrchg@outlook.com>
2026-10-06 19:57:12 -07:00
notsapinho
73bd3c8429
Composer: mention images and files as chips (#775)
* Mention images and files in the composer as chips

Pasting, dropping or attaching a file now stages it and drops a chip at the
caret, so a prompt can say which attachment it means. Images read "Image N";
any other regular file (up to the existing 24 MB limit) is staged as opaque
bytes and its chip carries the file name and the file theme's icon.

Chips and attachments stay in step: removing the last chip for an attachment
unstages it (undo brings both back), removing a tile removes its chips, and
the `@` list pins staged attachments above project files. Chips share one pill
style across files, folders, skills, commands and attachments, in the composer,
the transcript and queue rows. The chip text is the plain label when a prompt
reaches a provider, which pairs with the upload of the same name; uploads and
the prompt trailer are unchanged.

Non-image attachments also render as file pills in sent messages and as icon
tiles in queue rows, and a queued message with files can be restored for
editing: uploads read back whatever their type, while workspace files stay
image-only.

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

* Derive chip prefix and directory flag from the chip kind

FileMentionLink stored its kind alongside a prefix character and an is_dir
flag that the kind already determines; they are now methods on the link, and
the sent-message span drops its is_dir field. Attachment chips are converted
to plain labels in harness_prompt instead of inside file_mention_prompt, which
no longer knows about attachments, and the icon cache locks without a
poisoned-mutex branch.

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

* Drop tiles for chipped attachments and center chip labels

A chip is the attachment's handle (hover previews it, deleting it unstages
it), so the composer and queue rows no longer repeat chipped attachments as
tiles; attachments without a chip keep theirs. Sent messages keep their
strip, which carries upload progress and opens the image.

Chip pills sat a pixel below the line box's middle, which left labels
looking high. Geist's cap height is centered on the line box, so the pill
now is too.

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

* Show sent attachments as chips only, with image chips opening the image

A sent message's chips stand in for their attachments, so the strip above
the bubble keeps only attachments without a chip (appshots, mobile sends).
An image chip carries its upload's path: clicking it opens the image full
size, as the thumbnail did, and its upload is loaded and kept with the row.

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

* Keep chips and attachments in step while editing a queued message

Chip deletion was never reconciled during a queued edit, so a file whose
chip was deleted still uploaded on save. Reconciliation was off because
restored files had no chip numbers and the edit shared the displaced
draft's numbering and undo stash.

Restored attachments now take the numbers of the chips that name them,
the edit gets its own numbering and stash (the draft's come back when it
ends), reconciliation runs during the edit, and a saved edit demotes chips
whose attachment is gone. When the edited row disappears and both drafts
merge, the edit's chips become their labels so numbers cannot collide.

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

* Show upload progress on sent chips

Chipped attachments left the strip above a sent message, and with it the
thumbnail's upload ring. A chip now carries the upload it names: while
the bytes are still crossing to the host its icon well shows the transfer
percent as a ring (or a spinner when no real position is known), and an
image that can't be read back shows a warning there. File chips get the
same progress; image chips still open the image once loaded.

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

* Show desktop file attachments as name pills on mobile

Desktop can now send any file, and those refs reach mobile through the
synced transcript. The mobile user row handed every attachment to an
image widget, so a ZIP became a broken thumbnail and a failed image load.
Non-image refs now render as a file-icon + name pill (upload prefix
stripped, pending refs included) using the existing Icon widget, so iOS
needs no changes. Composer chip links show as their plain label instead
of raw Markdown, and the "See the attached file(s)." placeholder is
hidden like the image one.

attachment_display_name moves to zeron-proto (desktop re-exports it),
next to a shared is_image_path using the desktop's decodable extensions,
so mobile splits images from files the same way.

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

* Cover external file drops end to end and run attachment tests on macOS

The file-chip tests called add_paths directly, so nothing exercised the
ExternalPaths receiver a real Finder or file-manager drop goes through.
The new test dispatches FileDropEvent enter/hover/drop with a zip, a PNG,
a folder and an oversize file into the main chat and both side chats,
and checks chips, staged files and the error notice in each.

A mixed drop showed only the last refusal, so a folder's error was hidden
behind an oversize file's. Refusals from one drop now share the notice.

The macOS job's nextest filter now includes the attachment staging, chip,
drop and queue/transcript chip regressions.

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

* Open image chips full size on click instead of on hover

The composer's tiles opened an image full size on click; with them gone,
image chips previewed on hover instead. A click on an image chip now opens
the same full-size viewer, with the pointing hand over it, and its hover
card is gone. A drag across the chip still only selects text; file chips
keep their name tooltip.

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

* Show the desktop's chips in iOS message bubbles

Synced prompts on iOS showed file mentions as accent "@name" text and
attachment chips as plain labels, beside a thumbnail strip that repeated
them. Bubbles now draw every chip kind (files, folders, skills, commands,
images, file attachments) as the desktop's soft pill with an icon well,
using the tool badge's colors and the bundled file-theme icons.

As on the desktop, attachments a chip names leave the strip above the
bubble, and tapping an image chip opens its upload in the image viewer.
The chip-to-upload match moves into zeron-proto so both clients share it,
and the demo's veil chat now opens on a prompt with chips.

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

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Wing <contact@winglee.io>
2026-10-05 11:33:45 -07:00
wing-anara
dbb639be37
Group projects by git identity, plus Zeron Icons and rolling labels (#799)
* Group projects by git identity and pick the project before the device

Each git project now carries a repository id stamped by its owning engine:
the normalized origin remote (host/owner/repo), else a device-scoped hash of
the common git dir so remote-less worktrees still match. Clones and
worktrees of one repository share it across devices.

- Sidebar project mode folds projects with the same id into one group,
  named and iconed by the oldest checkout; the project icon moves to the
  group header and its rows drop theirs.
- Every checkout of a repository shares one project icon and color, on
  desktop and mobile.
- The new-session composer picks the project first (one row per
  repository across devices), then the device among its checkouts;
  project-less sessions still pick any device.
- iOS: the project menu lists one entry per repository with its hosts, and
  the host chip picks the checkout. The demo workspace gains a clone on a
  second device.

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

* Adopt Zeron Icons in the shell

Swap the shell's glyphs for icons.zeron.sh: carets, back/forward arrows,
plus, folder, branch, pull request, expand/collapse and file tree, plus new
fork and worktree glyphs (fork buttons no longer borrow the branch icon;
worktree rows no longer borrow folder-with-files).

The sidebar and right-pane toggles draw the Sidebar glyph from quads so its
panel can morph open <-> closed (280ms, cubic-bezier(.22, 1, .36, 1)). The
morph rides a new per-key state tween in motion.rs on the hover-fade clock:
it snaps on mount and reverses continuously mid-flight.

The sidebar project selector drops its caret.

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

* Keep composer chips steady across project switches

Switching projects reset every picker slot, so the model chip blanked and
the branch/checkout chips read "Select ref" until the reloads landed.

- Model catalogs are per device: a same-device project switch keeps them,
  and a device switch revalidates with the loaded rows still on screen
  (stale slots reload once through the engine's cache).
- The checkout and branch chip labels hold the previous project's ref until
  the new refs land; the branch popover and the send plan never read it.

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

* Roll label changes like Scritto's text

New roll_text element (a port of scrit.to's <scritto-text> roll): when a
keyed label changes, shared leading/trailing runs hold (the tail slides to
its new x) while the changed middle rolls — old glyphs rise out and shrink
as new ones rise in, staggered left to right on cubic-bezier(.22,1,.36,1),
with the width gliding between the two values.

Steady state hands back to the plain truncating label, invisibly: the line
height, baseline, glyph y-offsets and ceil'd width match gpui's own text
element, glyph sizes quantize to 1/8 px, and the width/tail ride the shell's
200ms RESIZE clock so whatever follows the label (the model chip's effort
text) settles early and never moves while glyphs finish. No overshoot —
labels land dead still. Reduced motion renders plain text.

Applied to the composer's model/project/device trigger chips and their
suffixes, the branch/checkout footer chips, the compact picker's effort
title (it retitles live while the slider drags), and the working trailer's
flavour word and elapsed timer (digits roll in place, the unit holds).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Stabilize the compact sidebar row's trailing cluster

The trailing items packed right in presence-dependent order, so the remote
globe and time columns shifted between rows with and without a PR badge,
and the hover archive affordance appeared in previously-empty space.

Now the PR badge sits LEFT of one fixed slot (30px x 14px; wider only for a
long jump hint) that shows the relative time, swaps in place to the archive
glyph while the row is hovered, and shows the Cmd+N jump legend while the
modifier is held — the legend beats the hover archive. The remote globe is
gone from compact rows. Columns land at the same x on every row and nothing
resizes on hover.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Keep the model chip's effort text muted at every level

It brightened whenever the pick departed from the model's default; the
effort now always reads in the chip's muted second tone. The default level
is still marked inside the model menu.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Blur and tilt rolling glyphs like Scritto

Rolling glyphs now carry Scritto's 0.1em blur and 2deg tilt, both fading
as each glyph lands, and scale on the GPU from one full-size raster
(paint_glyph_transformed) instead of re-rasterizing at quantized sizes.
Glyphs at rest — the shared runs and the sliding tail — still paint
through the ordinary pipeline, so the hand-off to the plain label stays
pixel-identical.

LOCAL ONLY: Cargo.toml [patch]es zui to ../zui-edgefade (branch
glyph-transform-blur, 0966d06) for paint_glyph_transformed. Before
pushing, push that branch, repin the zui rev here, drop the [patch], and
bump the gpui-component pin alongside.

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

* Pin zui 0966d06 for transformed and blurred glyphs

zui main now carries paint_glyph_transformed (zeronsh/zui 0966d06), so the
local [patch] onto ../zui-edgefade from the previous commit goes away. The
gpui-component pin moves with it (fix/zui-1561532 4764fd0) so Cargo.lock
keeps a single gpui.

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

* Identify repositories by their trunk's root commit

The identity was the normalized origin remote, so one repository split
into several projects whenever checkouts spelled their remote differently:
a pre-rename name kept alive by GitHub's redirect (zeronsh/comet-native vs
zeronsh/zeron), an SSH host alias (github-winglee vs github.com), or a
transferred owner.

It is now commit:<sha> of HEAD's first-parent root — the commit the trunk
grew from. Clones, worktrees and forks share it regardless of remote, and
a merged-in unrelated history (a second parent) never displaces it. A
shallow clone (whose boundary commits only look parentless) or an unborn
HEAD falls back to the normalized remote, then to the device-scoped
common-git-dir hash as before. Readers treat the id as opaque, so nothing
else changes; the scheme is unreleased, so no engine has stamped old ids.

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

* Return the compact model list to provider tabs

Restores the list page from the picker's original design (d56d83ba): a
back button beside the providers as tabs — Starred first, then each
provider's run of the list — over the search row. A tab jumps the list to
its group, the group at the top of the scroll lights its tab, the strip
keeps the viewed tab in sight and fades at both edges over tabs scrolled
past them, and the list opens on the current model's group.

The tabs and back button are row-height squares with the rows' corners,
inset 4pt from the card like the list and panel. The separate provider
page and the panel's provider button are gone (Tab on the panel still
cycles providers); browsing every provider's models (#749) is unchanged.

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

* Address adversarial review: catalogs, subfolders, frame rate, "+" target

- Device switch: a catalog still holding the previous device's models no
  longer resolves a send (only the explicit or remembered model and
  effort go out), stays marked stale until the new device answers, and a
  failed reload replaces those rows instead of retaining them.
- Repository identity carries the folder's path inside the repository, so
  monorepo siblings and plain folders inside an enclosing repo stay
  separate projects; the same subfolder still matches across clones. A
  failed identity check keeps the space's last id instead of flipping
  forms, and the trunk-root walk is cached per HEAD commit.
- Rolling text renews the shared ~30Hz pulse lease instead of requesting
  display-rate frames (the working timer rolled for most of every turn).
- The working trailer's word and timer key their rolls by turn, so a new
  turn starts fresh; the roll memory is bounded.
- The project group's "+" opens on this device's checkout first instead
  of the oldest one anywhere.

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

* Address adversarial review round 2

- A harness list still from the previous device stays marked stale until
  the new device answers (one in-flight reload) and reads as not loaded,
  so neither the chip nor a send falls back to a harness only the old
  device offered. The chip's effort is unclamped while the model slot is
  stale, matching what a send carries.
- Reduced motion switching on mid-roll settles the label at once instead
  of leaving the roll frozen with no frames to finish it.
- The working trailer's "Sending" bridge keys its own roll, so it never
  rolls out of the previous turn's last flavour word.

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

* Address adversarial review round 3

- A stale harness list counts as catalog loading, so with no picked or
  remembered harness the model chip shows its loading state across a
  device switch instead of going blank.
- The working trailer's sending bridge keys its roll on its own send
  start, so it never rolls out of the previous turn's word or an earlier
  send's "Queued" line.

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

* Don't report "No agents available" from a stale harness list

The previous device's list can't say this one has no agents; during a
device switch the chip shows its loading state instead.

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

---------

Co-authored-by: Wing <contact@winglee.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 00:44:41 -07:00
José Gurruchaga
df0cd2980a
Replace Pi ACP adapter with native RPC integration (#630)
* feat(pi): add native RPC transport and compatibility contracts

* feat(pi): implement native harness and event normalization

* feat(pi): resume native and legacy ACP sessions

* feat(pi): support native steering and reliable cancellation

* feat(pi): expose native models commands and skills

* feat(pi): bridge extension dialogs to desktop and mobile input

* feat(pi): preserve Zeron MCP delegation in native sessions

* feat(pi): activate native RPC driver and CLI discovery

* refactor(pi): retire ACP adapter and verify native lifecycle parity

* fix(pi): preserve switched sessions empty resumes and composer drafts

* docs(pi): translate RPC migration research into English

* style(ios): trim whitespace in updated question bindings

* test(acp): wait for scenario progress before steering

* test(pi): compare canonical session paths on Windows

* fix(pi): deliver steering bursts in the same model step

* fix(ios): preserve generated Swift binding whitespace

* fix(pi): scrub nested-agent env and keep dropped-resolver semantics

Pi's native launch skipped owned::configure, so CLAUDECODE and the other
nested-agent variables the ACP launch removed leaked into pi. The engine's
new input-cancellation task also turned a dropped resolver into an empty
answer; keep it an error for harnesses (opencode rejects on error).

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

* ci: run the native Pi RPC driver tests

pi_rpc needs the native-fixture feature and pi_resume is an engine test;
neither ran in any workflow.

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

* fix(pi): never overwrite a configured Pi steering mode

set_steering_mode persists to Pi's global settings.json. Selecting `all` on
every session start silently rewrote the user's standalone Pi preference and
undid any `/steering` choice on the next run. Select `all` only while neither
the global nor the project settings configure a mode.

PiHarness::with_agent_dir lets tests (and callers) pin PI_CODING_AGENT_DIR for
both the child and Zeron's own reads, so fixture tests never consult the
developer's real Pi settings.

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

* fix(ios): don't trap on duplicate question ids when prefilling answers

Dictionary(uniqueKeysWithValues:) crashes on a repeated key; question ids come
from agents and synced docs, so keep the first instead.

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

* style(pi): rustfmt the steering-mode guard and its tests

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

* fix(pi): start fresh with a notice when a session can't be restored

The native driver hard-failed a resume whose Pi session file was missing.
The engine injects the chat's stored session id on every dispatch, so one
unwritten or deleted session file left the chat failing every message for
good. The ACP adapter and the Codex driver start a new session and announce
the lost context instead; do the same. Proven-empty sessions still keep
their UUID via --session-id.

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

* fix(pi): never fail a turn over an attachment Pi can't inline

Composer uploads include SVG, HEIC, BMP, TIFF and AVIF. The native driver
errored the whole run on any of those (or an unreadable path), while the
Claude driver skips them and the retired adapter ignored attachments: the
path refs already ride the prompt text. Load images best-effort instead.

Also give native startup the 120s budget the ACP handshake gave Pi, since
extensions can start cold.

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

* style(pi): rustfmt the lost-session live test

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

---------

Co-authored-by: Wing <contact@winglee.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 17:14:54 -07:00