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

Plugins can run a chat on a saved account (accounts.pin) and decide it at its first run (#1290)

* Bump the workspace to 0.2.137 for the beta

A beta is of the next release: 0.2.136-beta.N sorts older than stable 0.2.136,
and zgx-beta.yml refuses it. One commit, so the number is easy to change.

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

* zgx beta: by-hand runs of different versions don't queue behind each other

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

* zgx on Windows: the build fix from #1212

Only what apps/zgx needs to compile there: a visual's thread CPU time on
Windows, a Unix-only symlink test behind cfg(unix), and windows-sys. The rest of
#1212 stays on its own branch.

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

* zgx on Windows: the panel's browser tabs as WebView2 pages

zgx-desktop's webview2 feature, from zgx/windows-panel. Without it the Windows
beta's browser tabs are placeholders.

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

* The beta channel on Windows and the Linux desktop

A beta build there now follows update-channel.json, so it updates from
releases/beta and can go back to Stable; stable builds and every engine stay on
stable, and the macOS floor stays macOS's. On Linux a beta's directory isn't
named as a version, or the shipped engine reads it as newer and restarts into
itself whenever it's idle. On Windows a beta updates from its package, its
scripts and stable's zeron.exe as its engine under beta\<version>; stable's
single-exe update is unchanged. zgx finds its scripts beside the binary, and
the Windows beta has a window subsystem and Zeron's icon.

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

* zgx beta: Linux and Windows

Linux (x86_64, aarch64) and Windows (x86_64) beside macOS: the zgx interface and
the latest stable's own engine, by checksum, with stable's artifact names but
the beta's version. Windows has no standalone .exe, which can't run alone.
Every key stays under beta/, the manifest last, listing every platform's files.
A run by hand can pick platforms.

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

* zeron update names a beta's real directory

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

* zgx on Windows: the webview2 line at the new zgx pin

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

* Plugins: a host named exactly asks, whatever it reads as (the rebind hole)

A plugin allowed any public host could update to name `rebind.example.com`,
pointed at 127.0.0.1. Nothing asked (it read as public) and the window didn't
flag it, yet a named host reaches a private address it resolves to. `127.1` and
`0x7f.1` went the same way through the app's transport.

- `net::risky`: a name ending in a number reads as local, so it's flagged and
  asks.
- `capability::diff` (crates/engine): over an any-public grant, a newly named
  exact host asks. `*.` names still don't: they never reach a private address.
  This reverses "narrowing to named hosts doesn't ask" for exact names.
- The permission window, under exact names that don't read as local: "A named
  host can be on this computer or your network." en and zh-Hans.

Names like `.ts.net` and split DNS keep working once named and allowed, with no
manifest change. A plugin allowed as it is isn't asked again. Nothing here
works out where a name points: DNS can change after consent, so the person's
yes is what allows it, and the new line is what makes that yes honest.

Engine change: ships in a stable release before a beta.

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

* zgx beta: a draft takes the files, then it's published

Releases here are immutable once published, and the release action publishes a
prerelease before uploading unless it's a draft: beta-v0.2.137-beta.7 was
published empty and its uploads refused. So the draft takes the files, and the
next step publishes it as a prerelease that's never the latest.

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

* Change requests: start Git and gh off the runtime workers

SystemProcessRunner spawned on the calling task's worker thread. On
Windows the standard library creates every process behind one lock, and
CreateProcessW sometimes takes over half a second. PR watches start Git
several times a second, so the queue for that lock grew until all 16
runtime workers waited in it. The engine then answered nothing for
seconds at a time: viewport sockets dropped, sync probes missed their
deadlines, and a stop or a new message waited behind the queue.

Spawn on the blocking pool so a slow launch holds a blocking thread, not
a worker.

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

* Change requests: share one Git inspection per watched path

Every PR watch inspected its checkout on its own every 15 s, five to
eight Git processes each time. A project with ten chats ran ten
identical inspections. Only the provider query was shared.

Watches on one path now join an inspection started less than one poll
interval ago. The run is a shared future rather than a lock, so a watch
that stops being polled mid-inspection does not hold up the others.

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

* zgx beta: the Windows zgx-desktop dependency at the same pin

This branch names zgx-desktop again under cfg(windows), so the pin has to move
here too: two revs fail every platform when the manifest is parsed.

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

* zgx beta: the Windows zgx-desktop dependency at the same pin

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

* zgx beta: the Windows zgx-desktop dependency at the same pin

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

* zgx beta: the Windows zgx-desktop dependency at the same pin

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

* zgx beta: the engine comes from the same commit

A beta tests what's next, the engine too. It compiles the engine from its own
commit on every platform, rather than downloading the latest stable release's.

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

* zgx beta: its engine carries the beta's version

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

* zgx beta: the Windows zgx-desktop dependency at the same pin

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

* zgx beta: the Windows zgx-desktop dependency at the same pin

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

* zgx beta: 0.2.138, the version after stable 0.2.137

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

* zgx beta: the Windows zgx-desktop dependency at the same pin

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

* Add iOS App Store link to landing page

* edge: a chat2 checkpoint past one request's most can come in parts

The edge takes at most 32 MiB of checkpoint in one request; a long chat's
snapshot is past that (35 and 39 MB), so its host's every post was refused
413 and the room kept no fresh checkpoint.

`POST /chat2/{id}/checkpoint-part?offset=` appends a piece (at most 8 MiB)
to the room's staged checkpoint, kept as the blob store's chunk rows;
`POST /checkpoint?seqCovered=&staged=<size>` commits it by renaming those
rows, with the same guards (and `incomplete` when it isn't all there).
GET /checkpoint streams it a row at a time (Range as before), and the
nightly backup writes a large one as an object of its own, streamed. A
single POST, its 32 MiB cap and its 413 are as they were; engines send
parts once they run the change (zeron/zgx 3182a9702).

The edge half of zeron/zgx 3182a9702, alone, with its outcome type made
to name `incomplete` (tsc). Checked on staging: a 36 MiB checkpoint in 5
parts committed and read back byte-exact, whole and from a range; a small
one as one POST; one past 32 MiB still 413.

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

* zgx beta: 0.2.139, the version after stable 0.2.138

The Windows zgx-desktop dependency moves to the same zgx pin as the rest
(2b6f48e8), and the beta-only icon build dependency goes: zeron/zgx's
build.rs now embeds the icon for every Windows build.

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

* edge: an oversize checkpoint is refused before it's read

An engine from before checkpoint parts posts a long chat's whole snapshot
(35 MB and more) as one checkpoint, gets 413, and posts it again a few
seconds later: the edge read every byte of each before refusing it. Now
/checkpoint and /checkpoint-part read their bodies through `readCapped`:
a declared length past the cap is answered 413 before a byte is read,
and a body of no declared length is read only until it passes the cap.
What's within the cap is read as before.

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

* 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>

* 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>

* 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>

* Android: Waiting reads as Working, as it did before the core named it

The core now reports a chat waiting on background work as its own
indicator. Android draws it, counts it and filters it as Working, so
nothing on Android changes.

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

* engine: a run's environment knows which chat it is for

RunEnvironment::prepare and ::credential, and the registry's prepare_run
and run_credential, take the chat the run belongs to (None for runs of no
chat, such as title generation). Nothing uses it yet: this is the seam a
per-chat account needs, split out so the next change is only about pins.

* plugins: run a chat on a saved account (accounts.pin) and decide it at its first run

Switching an account moves everything on the device at once. Pinning moves
one chat: zeron.pin_account runs it on a saved account of its own while the
active account stays as it is. Zeron holds the pins and delivers the
credential; which account a chat gets is the plugin's to decide.

- zeron.pin_account / zeron.pins, the account.pinned and account.unpinned
  events, and the accounts.pin permission (outside the sandbox: always
  asked, even for your own plugins). Attributed and loop-guarded like a
  switch; a pin on an account that was removed is taken back and told.
- run.preparing: a service is asked, one chat at a time and for at most
  3 s, right before a chat with no pin runs for the first time; what its
  listener returns ({ account }) pins the chat. A late, failing or
  unusable answer is passed over, and each chat is asked once. Needs
  Sink::ask_service (a service's answer, where to_service drops it) and
  zeron.on handlers returning their value.
- Account rows say pinnable, mechanism (env: Claude Code's saved token in
  that chat's process; root: Muse's own config root) and signed_out;
  usage rows say limited_until. Harnesses with no per-chat mechanism say
  pinnable = false.
- Engine: agent_accounts::pins keeps the table (pins.json), refreshes a
  saved Claude login whose token is about to expire (the live login is
  never touched), and gives a pinned run its credential fingerprint so a
  parked session on another account is replaced before its next turn.

* plugins-dev: account-pin, new chats take turns across saved accounts

Answers run.preparing with the saved Claude Code account that has the
fewest chats (counted from zeron.pins, so the service can stop between
chats), without switching the active account. Engine tests run the example
as it ships; the window example says what the service did in a toast.

* zgx: a new chat's wallpaper holds still in its card

The art was laid from the card's right edge and slid the panel's whole
width as the panel opened. It's now laid at the window's width from the
card's right edge, moved right by what the panel takes beside the card,
and the card shows what of it falls inside: the sidebar folding or the
panel opening only moves the card's edges, never the art or its effect.

- The picture covers its box by zgx's own layout (`fit = "cover"`), and
  the window's width is followed as a state: a resize runs no script.
- Changing the picture or the effect no longer dims the art halfway:
  the old layer eases out as the new eases in.

Wing's composition is kept: inside the page's card, never under the top
bar. Tests: wallpaper (the art holds still as the sidebar folds, the
panel opens and the window resizes).

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

* zgx: a new chat's effects, redrawn on the picture's own grid

Each effect is drawn anew, over the whole picture as one layer, on the
picture's own grid (fitted to 2048 a side, as Zeron's proxy of it): the
cells hold to the picture as the window resizes, and every edge is
worked out over the window's own pixel, crisp at 2x.

- Dither: each cell quantized by Bayer's 8 by 8 screen to two shades of
  its own colour, so a sky's mid tones and a shadow's both take the
  weave, and the cell's mean stays its colour.
- ASCII: glyphs of Zeron's ramp (less `%`) over the picture, rising with
  its brightness (its darkness in the light), in the cell's colour
  lifted halfway to its full value, the paper glowing through.
- Halftone: rounded squares on the grid, as the cells of Zeron's mark.
- Scanlines: a CRT's soft rows, the dark between lifting in highlights.

Halftone and scanlines print ink on a paper that follows the scheme, so
each cell is the picture's colour from a step back. The effects stay
GPU layer shaders. Intensity, density and the fade are set in place.

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

* zgx: the new chat's wallpaper stays built

The wallpaper was torn down whenever the page left a new chat, then
built again, its picture decoded again and faded in over 320 ms each
time a new chat opened: the art showed a third of a second late. A
picture now stays built and decoded while a session shows, hidden, and
shows again from the first frame. A plugin's art still goes (it may
move while away).

Tests: wallpaper (the same layer, hidden while a session shows, then
showing from the first frames).

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

* zgx: record Zeron v2 in step with this branch

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: pin 69b824e1, so a transcript scrolls by moving its pixels at the display's full rate

The composer over the transcript and the see-through card under it kept
every scroll frame from copying what was drawn: each repainted the whole
view (about 2.1 Mpx), its GPU work missed 120 Hz, and the frame pacing
held the rest of the gesture to every other refresh. zgx now copies the
view and repaints only the strip, the composer and the card's corners,
and a frame late for its refresh is handed over at once while a scroll
is live.

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

* zgx: pin 4e288137: what draws over a scrolling transcript repaints all its ink

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

* zgx: pin bf4a3de0: spaces after a word that fills the line keep the caret at its end

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

* zgx: the wallpaper's effects are compiled as they load, so none pops in late on first use

* zgx: a new chat's wallpaper frees its layer while away, and draws it again in a frame on return

* zgx: the wallpaper's paper follows the scheme in place: its parameters are followed, the art never built again

* zgx: the gallery's wallpaper and Zeron v2's draw their effects on the picture's grid too

* zgx: ASCII's font pixels snap to the device's, a picture's zoom stays 1 to 4 in its effect, and the effects' header reads shorter

* zgx: the title bar's controls sit on the traffic lights' line

zgx's inset title bar centres macOS's buttons in its 40-point strip, 20
down; the bar kept old Zeron's 21, so every control stood a point under
the lights. On macOS the line is now the lights' own middle, 20 with
none reported (full screen).

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: the tab strips' chosen wash glides, and a session tab carried off shows the split's landings

ds/tab_strip: the chosen tab's wash is one pill under the tabs, springing
to the tab chosen and to its width on ds/tabs' spring (now
motion.TAB_SPRING), so a switch glides instead of swapping. The session
tabs take it. A session tab dragged is its chat's, as a sidebar row is:
while it's carried the split's panes show where it can land, and dropped
on a pane's edge it joins there. Its reorder on the strip stays as it is.

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

* zgx: the panel's tabs follow the pointer as they're dragged

A panel tab dragged lifts a little and follows the pointer along the
strip, held to its line; its neighbours slide aside as its middle passes
theirs, and let go it settles into its place, the order saved once.
Carried off the strip it's the platform's drag, as before. The chosen
wash glides, as the session tabs'. The tab's face, lifted or in the
drag's preview, is the one it has in the strip: its tile and insets.

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

* zgx: a grabbed tab leaves its strip, a gap travelling where it would land

Both strips: one tab only, the lifted one; its place is a gap the
neighbours slide around, closed while it's carried off the strip, and let
go over nothing it flies back into it. The session tabs lift and follow
the pointer as the panel's do, reordering once, on the drop.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: tabs slide on a stiff spring, their hover wash fades, and a press darkens them

The tabs beside one moving settle critically damped; a top-bar tab opening
grows in and one closing shrinks away as its neighbours close up. Values
in ds/motion.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: a top-bar tab comes and goes at once, its neighbours sliding

A chat alone's tab is replaced on each navigation: too often for an
entrance.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: a dragged tab swaps as its leading edge passes a neighbour's middle

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: ds/tabs answer a press, and a pill's hover wash fades in and out

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: the arrows go from tab to tab on both strips, choosing each, with the focus ring

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: a tab carried near an end of its strip scrolls the strip under it

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: a press travels 6 points before it's a drag

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: Back and Forward's arrows at the bar glyphs' optical size, in their stroke

* zgx: a test that a tab held near its strip's end scrolls the strip

* zgx: ds/tabs is a component, so its tabs' hover has a home wherever it's made

Settings' catalog (Plugins, Templates) builds its tabs outside a component:
the tabs' own hover state now has one there too.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: a tab's 6-point drag threshold is macOS's only; elsewhere the system's holds

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: a session tab shows the split's landings only once it's off its strip

Carried along the strip, the split's dividers stay and no landing mounts;
carried off it (the strip says so: `on_away`), the panes show where it can
land, and back over the strip they go again.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: the session strip keeps its tab in view only once a carried tab has landed

As the panel's strip does: not while a tab is carried or settling, so the
strip doesn't scroll under a tab landing on its slot; once it has, it does.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: a tab closed while it's carried is let go, not flown back or placed

Closed under the pointer (⌘W, a chat deleted), it no longer flies to the
strip's end or commits a place for a tab that's gone.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: a strip's chosen wash glides on the tabs' own slide spring, so it never drifts from its tab

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: ds/tabs' underline look stays as it was; only a pill darkens as it's pressed

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: tab strip tidying: dashed ids, a closed tab's chip let go, the leftward drag tested again

The strips' chosen and lifted nodes are #session-tab-chosen and
#panel-tab-lifted; a panel tab's ref and face go with it; the panel's drag
test drags right to left again, as it did before the swap moved to the
leading edge, and the tests say leading edge where they said middle.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: record Zeron v2 in step with this branch

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* fix: load codex usage for logins keyed by user and workspace

* fix: load codex usage for logins keyed by user and workspace

* zgx: the sidebar opens with Activity; off, by project then device, no empty projects

New defaults, for whoever hasn't chosen: Activity on, and with it off the
list grouped by project then device, sorted by last updated, compact, no
archived or empty projects, each row's agent and project icon shown.
A setting someone changed keeps its value.

The shell and panel fixtures keep the sidebar their tests were written on
(one list, Activity off, empty projects listed); tests/sidebar_defaults
checks the new defaults.

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

* zgx tests: a chat left at its bottom comes back at its bottom, whatever came meanwhile

Regression tests for "scroll state is not retained in chats", none failing
today (the report isn't reproduced headless). On the chat fixture's s7, its
replies far taller than the list's row estimate: scrolled to its bottom by
scroll steps or trackpad wheel flicks, left for another chat, a new chat or
home, it comes back at its bottom, its last reply's last paragraph in view
and no way back to the latest, and stays there as its rows measure:

- with nothing meanwhile, a reply landing (`reply_away`), its newest rows
  first and its history after (`tail_first`, `history`), and as the host
  opens a chat it no longer holds, the transcript emptied and loading at
  once, the chat a moment later (`slow_open`), alone and together;
- left mid-scroll, it comes back to the same message at the same height,
  a reply landing meanwhile, and through the slow open.

Fixture switches: `reply_away` (a tall turn lands in s7, open or not) and
`slow_open`.

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

* zgx: a chat comes back where it was read after a relaunch too

"When you scroll to a spot in a chat and go back to it later, it goes back
to the bottom." Each chat's place was kept for the run only
(`chat.transcript.places`, the shown chat's `anchor`): a relaunch opened
every chat at its end. And the chat a launch opens was put back at its end
even with its place in hand: a transcript's at-end state starts true, so
the window's first resizes held it at the end (`end_held`) and it noted
its end over the place.

- screens/chat/shared: each chat's place, the chat shown's as it's read,
  is kept across launches too (`chat_places`, the 200 most recently read),
  and a launch starts from them.
- ds/transcript: putting itself back at a place, it starts away from its
  end, and its rest at the end before the place is laid out doesn't hold
  it there; a place gone back to before its first layout waits for it.

Tests (transcript_return_later): left mid-scroll and come back after six
other chats, from a new chat, reopened from the engine with a reply
landing, after a turn ran, and across a relaunch (shown at quit, or
another chat shown): the same message at the same height. The relaunch
cases failed before. Left at its end, it comes back at its end across a
relaunch.

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

* zgx: a / or @ typed again after its list was closed opens it again

Closing the list (Escape, a click away) kept it closed for the trigger's
place, so deleting the trigger and typing it again there opened nothing.
A closed list now stays closed only while its trigger is still there.

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

* Linux: a dropped image no longer crashes the window with "texture must exist" (#1297)

* Linux: keep dropped images on screen until the next frame, not a crash

Pins zui 15ee708, which keeps a dropped image's atlas tiles until the next
draw and lets the wgpu renderer skip, then redraw, a scene that names a
freed atlas texture. Before, re-presenting a frame after an image was
dropped (an evicted tool image or visual, a resized browser frame) could
abort the window with "texture must exist" in wgpu_atlas.rs.

* Pin gpui-base cab50b0 so it shares zui 15ee708 with Zeron

zeronsh/gpui-component#7 moves gpui-base to the same zui; without it the
lock carried two copies of zui.

* fix: start new chats in the project the sidebar filter narrows to

* fix: show invoked skills and commands as chips in sent messages

* fix: highlight the active row as the mention list narrows

* zgx: pin 4d9a7b21: only ~~ strikes, so a path's ~ stays text

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

* zgx: a chat's chip carries the side chat's icon

A chat mentioned, in the composer and in a sent message, showed a speech
bubble; it now has the icon side chats and subagents have.

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

* zgx: a mention or command chip shows no ring under the pointer

A chip in a sent message is a link with no hover style, so the pointer
drew the focus ring round its words. It has a hover of its own now, which
changes nothing; a keyboard focus still shows the ring.

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

* zgx: chats a Zeron chat started run in the composer's Subagents tray

A chat another chat made through Zeron's tools (`childKind`: a subagent
or a side chat) now lists in the open chat's tray above the composer as
its subagents do: the same group and rows, running while it works, folded
with the finished once it rests (failed when it failed), no Stop. Its row
opens it as a side chat's tab of the panel, as the panel's own list does.
Side chats the person started (no `childKind`) aren't in it; nothing says
who started one.

- src/sessions.rs: a side chat's row carries `child_kind` (the engine's
  `childKind`; none for the person's).
- screens/chat/lanes.luau: `tasks(session)` takes the chat's children with
  a `child_kind` among its subagents; `open_task` opens one (`chat:<id>`)
  as a side chat.
- screens/chat/composer.luau: the tray's tasks are the open chat's.

Zeron v2's composer has no subagent tray: its .base.json is re-blessed.
Tests (chat_tasks): a chat with a Zeron-started subagent, a Zeron-started
side chat and the person's own; the first two in the tray, the third not,
a row opening its chat in the panel; and with the agent's own subagents.

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

* zgx: the / @ $ list shows whenever the caret is in a token, unless put away

Whether the list shows is now worked out from what is true now: the
caret is in a token, the composer has the keys, the window is at the
front and the composer is in view. Only Escape or a click away puts a
list away, and only for that token: moving the caret out of it,
deleting it, or typing its trigger again opens the next one. The window
going to the back, Settings or the palette over the page, and the
composer losing the keys only hide it.

Fixes: /settings taken, then / opened nothing; a list closed by the
window going to the back or the palette stayed closed. Each chat's draft
keeps its own put-away list.

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

* zgx: arriving on a chat gives its composer the keys

Escape out of Settings (any page), a sidebar or Activity row, Back and
Forward, a new chat, the palette opening a chat and a split's pane
taking the focus now put the keys in the composer. A field that takes
the keys after (a rename) keeps them. The composer draws no ring as it
gets them.

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

* zgx: a chat attached in the composer is a card on the sent message

A chat attached (a session dropped from the sidebar, its card over the
draft) went into the prompt's words as a link, so the sent bubble showed
it as an inline mention. It now travels in a block after the words
(`Chats attached:` then `- [title](zeron-chat:id)`, carried.luau
`with_chats`), as quotes and review comments do: the engine still reads
each link out to the agent, mobile shows the block as tappable links, and
the host takes it off the words (chat.rs `split_chats`) and shows each as
a card with the chat's title and its agent's mark, which opens the chat.
A chat linked in the words themselves (an @ mention) stays a chip there.

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

* zgx: a test that the lit mention row follows the list and the arrows

Checks the lit row by what Enter takes: as the list narrows it is the row
at the top, ArrowDown moves it, and narrowing again puts it back at the
top.

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

* zgx: the lit-row test reads the row Enter takes

The test looked for a `selected` flag in the tree, which zgx never
prints, so it could not pass. It now reads the lit row as the one Enter
takes, then puts the draft and the light back. Its checks are the same.

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

* zgx: a tab carried off its strip leaves the window its room

The strip's drag preview says it's absolute itself. zgx makes a preview
absolute as the drag begins, but its opacity turning on off the strip
restyled it from its props, so it took a row of the window: the content
ended a tab's height short. The held-tab test now carries one off the strip
and holds it there.

* zgx plugins: .project-icon, a project's icon a plugin may draw

A stable element wherever a project's icon is drawn: the sidebar's
project groups and its rows' project tiles, the session tabs, a side
chat's lane, the panel's project row and its lanes, project pickers (the
composer's place menu, the sidebar's project filter, any dropdown of
projects), the palette's projects and its sessions' line, archived chats.
Each is `.project-icon` in a box of the tile's own size giving `project`
(its id; on the box, as replacements read what's given above them).
A plugin with "ui.change" on it replaces it to draw each project's own:
`zeron.live("project")` is `{ id }`, and with "sessions.read" the
project's name, device and icon (`{ emoji?, image?, hue? }`).

- ds/tile: `project` (an id or a function of one) wraps the tile so.
- Each place passes its project's id (ds/sidebar, session_row,
  panel_home, dropdown, command_palette, composer; screens/chat/lane_tab,
  where; panel/home; settings/archived; shell/palette, route,
  session_tabs, sidebar). The project editor's preview is left out (it
  shows the look being edited).
- plugins-sdk: `project` reads as its record, as `session` does.
- src/plugins/records.rs: a project's record has its icon with
  "sessions.read"; src/plugins/elements.rs: `.project-icon` an element
  and stable; docs/plugins.md: its row, and `project`'s.

Without a plugin nothing moves: shell_fixture's home, palette and panel
lay out the same as before, box for box. Tests: project_icon (the
sidebar's groups, the palette, the panel), loading_tests'
a_plugin_draws_each_project_s_icon (each project's own, with and without
"sessions.read", and Zeron's without "ui.change" on it). Zeron v2's
sidebar the same (.base.json re-blessed).

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

* zgx: Zeron's agent loaders as a component, not wired yet

ds/agent_loader.luau: the mark's tiles turning over diagonal by diagonal
(Wing's loaders.luau), `glyph = "agent"` (5x3, 1.05 s) or "subagent"
(3x3, 0.75 s, drawn at a row's cap height), in secondary text. All on the
GPU from the time (a shader, as the working ring), 30 frames a second,
none while unseen or with motion reduced. Nothing uses it yet (the old
loaders for now); its note says how to wire it, and branch
zeron/agent-loaders has the wiring and its tests.

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

* zgx: Appearance's "Accent color throughout", on by default

With it on, links, the working dot and its icon, find highlights, @file
tokens in the composer, and the conversation's list markers, quote rail
and inline code use the accent color, as the shipping app does. Off,
each looks as it did. Kept across launches; works with every theme and
accent, light and dark, frosted and opaque, and in the Zeron v2
template.

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

* zgx: chips in replies, one wash each, and skills without their $

A reply's link to a file in the chat's folder, or to a chat, is now the
same chip a prompt's mention is (its icon and name, one wash), and still
opens it; web links stay links. A skill's chip shows its name alone
(frontend-design); a command keeps its /. Chips keep the text's ink.

A chip is never cut: a find match in it, or a reply fading in, used to
split it into pieces, each with its own icon and wash. A match now
washes the whole chip.

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

* zgx: a reply's link to one of the agent's skills is that skill's chip

An agent that links a skill links its SKILL.md (…/skills/<name>/SKILL.md,
often outside the chat's folder), so it stayed an underlined link. When
<name> is one of the chat's skills, it's now that skill's chip, by its
name. The chat's skill list is read once if it hasn't been, and the
words with such a link are drawn again as it lands. Other files outside
the folder stay links.

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

* zgx: pin 84566c1a: a span's icon can sit on a well of its own

zeronsh/zgx zeron/span-icon-well, on 4d9a7b21: `ui.span { icon = { …,
bg, radius, pad } }` draws a rounded well under a span's icon, for the
chips' icon wells.

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

* zgx: chips look as Zeron's shipping app paints them

A chip in a message (a file, a chat, a skill or a command) is now a pill
of the text's ink at 9% (white on dark, black on light), corner 5, its
icon on a well of its own (black on dark, white on light, 32% over glass
and 16% solid, corner 4, 2 points round the 14-point icon), its glyph in
the muted ink and a file's icon in its own colours: composer/chip.rs
`paint_chip`. Across, 3 points each side of the pill (a span's padding
is the same both sides).

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

* zgx: pin c44b6e31: a span's padding can differ before and after

zeronsh/zgx zeron/span-icon-well: `ui.span { padding = { before, after,
down } }`, for the chips' room as Zeron's shipping app has it.

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

* zgx: the @ list is a launcher: files, chats and what's attached

`@` opens a launcher in the menus' glass panel:
- the query and how many match, then the scopes All, Files, Chats and Attachments, each with its count; Tab and Shift+Tab go through them
- in All, each kind in its own section under a small heading
- rows with an icon tile, the name with the part typed in bold, a quiet second line, what it is or when at the end, and ↵ on the lit one
- a footer of the keys

It lists the chat's files, the person's other chats, and what the draft carries: files and pictures, appshots, quotes, browser picks, review comments and attached chats.

A file goes in as before, and a chat as Zeron's chat mention. An attachment goes in as a reference that reaches the agent as "(attachment: <name>)", the name its carried block gives it; taken off before it goes, its name alone. The sent bubble draws those words as that item's chip, only where the message carries an item by that name. `/` and `$` keep their list.

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

* zgx: chips take Zeron's room: a point before the well, 7 after the name

As the shipping app paints them (Geist's no-break space a quarter em: the
well and name 6 of them in, 2 after, at 14 points): the icon's well a
point in from the pill's start, 2 points between it and the name, and 7
after the name.

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

* zgx: the @ launcher takes clicks and keeps the draft's keys; ⇥ Switch tab

A click on the launcher's tabs (or anywhere in it) closed it: zgx moves
focus on a press to what's under it, and the list hides once the draft
loses the keys. A press inside the list now leaves the draft the keys:
its blur is no loss, and the draft has the keys back once the press is
done, its caret where it was. The tabs switch, rows insert, and the
blank room does nothing. The old list keeps them the same way.

The footer's legend reads ↑↓ Navigate, ↵ Insert, ⇥ Switch tab.

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

* zgx: the @ launcher's rows are one line, a menu row's

Every row is a menu row's height (28) on one line: its icon in a menu
glyph's box (18, the icon 14), its name with the part typed in bold, and
at its end in the muted ink where it is: a file's folder (cut from its
start when long), a chat's project, what an attachment is. No times, no
second line. The lit row's ↵ follows. A chat in a project shows its
project's tile, as the sidebar draws it; one with none, the side chat's
glyph.

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

* zgx: pin 623d2a8d: `focus_on_press = false`

zeronsh/zgx zeron/span-icon-well: a press on a node marked
`focus_on_press = false` leaves focus where it is, its clicks still
coming: the @ list's rows and tabs take clicks while the draft keeps the
keys, with nothing in the app putting focus back.

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

* zgx: the @ launcher's rows line up: a time column and the ↵ key's slot

Every row keeps the ↵ key's room at its end, the key showing in it on
the lit row alone, so lighting a row moves nothing; before it, a fixed
column for when a chat last moved (5m, 3d, 2w; empty for what has no
time). Each row's place (a file's folder, a chat's project, what an
attachment is) ends at the same x down the list.

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

* zgx: a press anywhere blank on the composer gives the draft the keys

The composer's press layer (its pill's padding, under the draft) asked
the draft to take the keys, and zgx then moved them on to what was under
the press, nothing. It's `focus_on_press = false` now, the caret at the
draft's end; the toolbar's blank room has a layer of its own under its
chips (its rows passing the pointer through), so a press between them
does the same. Controls take their own presses.

The @ list hangs from the draft with `focus_on_press = false` too, in
place of putting the keys back after each press.

zgx pinned at 97b30c37 (zeron/span-icon-well): a press layer under a row
the pointer passes through keeps focus too.

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

* feat(zgx): drag file and side-chat tabs into composers as context

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: v2 in step again with the default's screens/panel/init.luau

After the drag-to-composer change (a91cd0e5c): its panel-context wiring
is v3's, so v2's copy keeps its own.

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

* zgx: pin ef6ad578: a list's rows hash their key only when selectable, and a reply keeps its parser 60 s

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

* zgx: each pane's pills pair with its own: Jump to latest beside What's waiting in a split

The pill pair over a composer (the transcript's Jump to latest, the
composer's What's waiting) moved aside for each other through one width
each for the whole window, said only by the chat page. In a split the
panes' transcripts and composers said and read none: the window's
composer read a stale or empty width, every pill stood centred, and the
composer's pill covered the way back. Now each pane has its own pair by
key (page, lane.<slot>, window); the window's composer pairs with the
transcript at its foot (the focused pane's), and a pill going clears
only the width it said.

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

* zgx: a split's send glides the focused pane to its end

The window's composer sent through ds/transcript's unnamed send, the
chat page's transcript's, which a split doesn't make: the focused pane
stayed where it was read and its prompt showed only once the host's
copy came. Now the send (and a queued message steered in) goes to the
transcript at its foot (shared.at_foot): the focused pane's, its
prompt joining that lane's list at once, as on the chat page.

The shell fixture answers a send (kept in fixture_sent) and keeps the
store's own new_id.

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

* zgx: pin db9c2b29: no crash when a press removes its own target, and the zgx review's fixes

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

* zgx: @ mentions what's attached by Zeron's canonical links

An attachment mentioned with @ is a link by its number in the draft, as
the shipping app, mobile and the engine have it (proto
attachment_mentions.rs): a picture `[Image N](zeron-image:N)`, a file
`[its name](zeron-attachment:N)`, the name escaped as the proto escapes
it. The engine gives each agent the plain label ("Image 1",
"notes.md"); the message keeps the link, so it's a chip in the bubble,
after a relaunch too. An attached chat goes as its chat mention, a
browser pick as its token (not repeated after the words). Quotes and
review comments aren't offered for now.

Pictures go up as "Image N.<ext>", so the number pairs with its upload
whatever the picture was called; files match by the engine's
sanitising of their names. A mention of what's taken off before sending
leaves as its plain label. Messages from before, "(attachment: …)",
show as they did.

ds/attachment_mentions is the one port of the proto's parser, used by
the send and the bubble alike.

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

* zgx: a test that what's dragged in from the panel is mentioned as attached

A file tab and a saved side chat's tab dragged into the composer are
what the draft carries, the file numbered as anything attached; @ offers
both under Attachments, and each goes as its mention (the file's link by
its number, the chat's Zeron chat mention), an agent reading the file's
name; the sent message shows both as chips.

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

* zgx: pin 22187a69: list rows mount as on main, selection keys travel with the row text

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

* zgx: pin 99fffd84: a list keeps one allocation for its selection, and the review bot's caret and types fixes

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

* zgx: subagents show the side-chat icon everywhere, not the robot

The transcript's "Ran a subagent" rows, the Running tray's agent rows, a
subagent lane's tab and fallback, and its Open menu item all used "bot",
while side chats and the Subagents header used "side-chat".

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

* zgx: the @ launcher's polish, and a menu list's room the same over its first line and under its last

Every band of the launcher (the top, the scopes, the list, the keys) is
inset as a menu group is, so the trigger, tab labels, headings, tiles
and the first key start on one edge, and the count and the ↵ end on one.
Where a row is and when it moved sit together against the ↵ slot. A
nothing-typed hint shows, long file names are cut before their extension,
and the panel narrows with a small window.

Menu.List / Menu.list_height (ds/menu): a scrolling menu list's height
is its lines' own, and a heading that opens a list has no room of its
own over it, so the room over the first line equals the room under the
last. The launcher, the / and $ lists, Group, select, context menus and
the file viewer's menu use it. The / list's panel padding is back to 0.

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

* Claude Code: use discovered names for configured models

Co-Authored-By: Claude Code <noreply@anthropic.com>
(cherry picked from commit 12cbfa22fc)

* fix(zgx): open Work in submenus immediately on hover

(cherry picked from commit c56d6d5ca7)

* fix(zgx): close Work in submenus when pointer leaves

(cherry picked from commit 685e368f9e)

* engine: a turn revived on boot waits for the port its Zeron tools dial

Boot recovery revives cut-off turns while the engine is still being
assembled, before it records the IPC port it serves, and `zeron_mcp`
gives no server for port 0. A revived run so went out with no Zeron
tools: in a crash test the parent, woken by a child's report and cut off
by the restart, came back saying its Zeron tools were gone and couldn't
answer the report.

The revival now waits for the port (rung by `set_ipc_port`), at most ten
seconds, and the token file is recorded before the port so whoever the
port wakes finds both.

(cherry picked from commit d6557cbc5f9602fe5d6cfa3ef6ce4bb010524732)
(cherry picked from commit 22458d9945b4064bc64ef98293763ef4f707c9f7)
(cherry picked from commit 4590983a13)

* engine: the revived turn's port wait, tested; its bearer seen with the port

A serving engine records its port right after assembly, so the
restart tests' engine does too: unserved, every turn they revive would
wait out the ten seconds their own wait gives up at. A new test revives
a crashed turn into an engine not yet serving, and sees it hold until the
port is recorded and go out with Zeron's MCP server; a unit test times
`ipc_port_ready` on a paused clock.

The port is stored with Release and read with Acquire, so a revived run
that finds it already recorded also sees the token file recorded before.

(cherry picked from commit f365aadfac)

* engine: the recovery tests serve a port; an engine serving none says so

`run_recovery`'s engine never recorded a port, so each turn it revived
waited out the ten seconds that file's own `wait_for` gives up at, and
seven of its tests failed. Its helpers now record one right after
assembly, as a serving engine does and `restart_resume`'s already do.

An engine that knows it serves no port (the app lost the IPC bind) now
says so with `set_no_ipc_port`, which rings the same wait: a turn it
revives goes on at once without Zeron tools instead of after ten
seconds. A unit test sees the wait end as it is said, and not start
once it has been.

(cherry picked from commit 0b2674d938)

* zgx: a Work in row hovered open stays open as it's pressed

#1295 opens the Device, Project and Checkout submenus on hover, so the
press that followed toggled the one just opened shut. A press now opens
it, closing its siblings, and leaves an open one open, as a system menu's
row does.

The rows are menu items since #1295; the Work in tests find them by that
role (14 of them looked for buttons and failed).

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

* zgx: the update button's marks behind sit in the middle of their crescent

A circle behind another shows as a crescent from the cut round the one in
front (7.5 in) to its own edge (20). Its mark was nudged a fixed 2, so the
11-pt mark ran from 6.5 to 17.5: a point into the cut, 2.5 short of the
edge. The nudge is now the centre of the widest circle the crescent holds,
from the same sizes that cut it: (TILE - STEP + GAP_CUT) / 2 = 3.75, the
mark 0.75 clear of each side.

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

* zgx: each update mark sits in the middle of its own circle

The ones behind were nudged right toward what shows of their crescent,
which read as off-centre. Each mark is now centred in its circle; the
circle in front may cover some of it.

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

* zgx: the @ launcher's ↵ over the lit row's end, and its bands centred

No slot is kept for ↵: every row's name, place and time run to the row's
end. On the lit row ↵ sits over that end, and the row's text is cut short
of it by a short gap and fades over 16 before (fade_x on a clipping box,
as FadeText fades; its content keeps the row's whole width, so lighting a
row moves nothing).

The header's @, query or hint and count, the tabs' labels and counts, and
the footer's keys and words are each centred on their band's middle, each
text a line of its own size high.

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

* zgx: pin e875c5e0 (zgx #1755): a table's rules reach its frame

A reply's table with a long column that fits on a line was laid out at
its words' width inside a frame the reply's width: zgx mapped a grid's
`justify = "stretch"` to start, so taffy never stretched its `auto`
tracks. #1755 passes stretch through for grids; the table's grid asks
for it, so its prose column takes what's left and the rules reach the
frame. A test with the screenshot's shape checks the last column's
numbers end as far in from the frame's right as the first words start
from its left (fails on 99fffd84, passes on e875c5e0).

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

* zgx: plugins can show 3D scenes of their own triangles

Turns on zgx-script's `scene3d` feature (ui.scene3d, ui.mesh, ui.light,
ui.group) and pins zgx to zeron/pin-scene3d: ce91055f plus one commit,
zeronsh/zgx#1760, where `ui.mesh` takes `geometry = { positions,
indices, normals, colors, face_normals, face_colors }`. The CAD plugin
builds solids in Luau and can now hand them to the GPU instead of
painting them on a canvas. wgpu is already linked, so the build adds
only zgx-3d; a scene asks no grant and draws only when it changes.

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

* zgx: "how long ago" moves on by itself

A row's "now" / "12m" was worked out when the row was built and stayed
until something else about it changed (an idle chat said "now" for 15
minutes, until the sidebar's view was switched). The sidebar's rows, the
lanes, the palette and the session cards now read ds/status `since`: one
clock every one of them follows, ticking every 30 s and sleeping between,
so only the corners whose text changes redraw (measured on a live window:
~0.2 ms of bindings a tick, no frames otherwise).

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

* zgx: the panel's content stands still as it opens, closes and expands, drifting and fading

The panel's card keeps its own curve (ds/motion `panel`, 280 ms); what's
in it is now laid out once, at the width it's going to (closing, the one
it rested at), and stands at the window's right as the card's edge
uncovers it and covers it again. It drifts 5 points with that edge and
fades over 160 ms as it comes and goes (ds/motion `content`), instead of
squeezing at every frame of an expand. Shut, it leaves layout until it
opens, as the folded sidebar does, so `zgx inspect errors` names nothing
in it.

Expanding over the page, the page keeps its width under the panel's
edge, clipped in the cards' corners, and fades and drifts toward the
sidebar; collapsing, it takes back the width it's going to at once and
fades in. The page beside the panel still reflows live as the panel
opens and closes (#1207). The route moving shows both at once.

Tests: shell_route_motion (one width through open, expand, collapse,
close) and route_motion_tests (each fades through, never popping, and
settles with no new layout warnings).

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: a pane just added to a split fades in from its gap, drifting in from it

A pane just added still opens out of the gap it comes in at, at its full
size, on the split's own clock; what's in it now also drifts 5 points in
from that gap and fades in over 160 ms (ds/motion `arrive`), as the
panel's content does as it opens. Only a pane added to the split
showing: a launch, a reload or another tab shows its panes at once.

Test: split_tests (the new pane fades in a step at a time, the one
beside it never fades).

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: closing the panel's last tab closes the panel, and its home stands in the middle

The panel left open on an empty home after its last tab went read as
something still to deal with: Settings' "Close the panel with its last
tab" is now on by default (a person can still keep it open). The home's
block was pinned to the top of a tall card with the room all under it;
it now stands in the panel's middle as a new chat's composer does,
starting at the top and scrolling when the panel is shorter than it.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx sidebar: a section's title that doesn't fit fades at its end

* zgx: the sidebar's connection line starts on the foot's edge

"Offline" and "Reconnecting" stood 12 in, past Star on GitHub's glyph,
the filter and the empty list's words, which all start 8 in.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx sidebar: the connection line's words start on Star on GitHub's

After the offline dot they stood 5 to the left of the banner's words; after
the reconnecting ring, on them. The glyph now sits in a slot as wide as the
star, as far from the words. A section's title being dragged fades at the
card's end, as on its row.

* zgx: the panel keeps to half of the room as the window resizes, a dragged width until its toggle

As Zeron's: a window resize shares its change between the chat and the
panel, at once, so a panel at its share stays at half of what the sidebar
leaves (each keeping its least). A width dragged holds, as before, but
only until the panel's next toggle, which opens it at its share again. Its
edge is out of reach while the panel moves.

This overrides Wing's rule that the chat takes the whole of a resize
(Gaël's call); his fit test now checks the balance. The sidebar's toggle
still doesn't re-split the panel.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: the seams double-click back, bounce at their limits and fade as they light

Every seam (the sidebar's edge, the panel's, a split's divider) as
Zeron's resize handles: double-clicked, back to where it starts (the
sidebar at 256, the panel at its share, the panes at equal shares),
easing there as a toggle does. Dragged past its limit it gives 5 points
and comes back (220 ms, smoothstep), its lit gap dimmed while it's held
there. The gap's light fades in and out over 150 ms, and each seam takes
the pointer 10 points either side of its middle (ds/seam).

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: what comes and goes with a panel stands still and only fades a little

The panel's content, the page under the panel expanded and a pane just
added to a split no longer drift with the edge (5 points, `NUDGE`): they
stand where they're laid out and the edge alone uncovers and covers them,
as Zeron's panels did. They only fade, from 0.3 to full in 150 ms (Zeron's
quick fade, CSS ease; the floor is its menus' entrance's).

A hundredth of a point of travel over the sweep stays: no eye sees it,
but a list that builds only the rows it shows (the panel home's side
chats) reads where it shows only as it moves, and kept the none it had
as the sweep began.

* zgx: the panel's content follows its edge as it expands and collapses

Laid out at the far width from the first frame, the panel's content jumped
there at once: its centred home moved half the way in one frame, and
collapsing left the card empty beside it until the edge caught up. Between
two open widths it now follows the edge a frame at a time, as Zeron's
`panel_content_tween` eased it; opening and closing it still holds still
(closing from expanded, at the wide width it showed).

Expanded, the panel ended a point past the window's edge (the row's room
less two gaps of 4, not the gap and the window's 5): its edge stepped a
point out as it landed and back as it collapsed. It ends where it ends
unexpanded.

* zgx: the sidebar's edge takes the pointer on its own side, and its reset splits the chat and the panel again

Raised over the page (`z = 1`) so its edge reached 10 points into the
chat, the sidebar's whole slot stood over the top bar's first tabs, which
reach over its head: its window-drag head took the first tab's presses
(session_tabs' "a tab still opens its chat on a click"). The slot is back
under the page and the edge takes the pointer from 10 points inside its
gap's middle to the gap's far side, as Wing had it, a little wider. The
panel's edge and the split's dividers keep their 10 points either side.

Its double click put the sidebar back at 256 but left the panel where it
was. As Zeron's `reset_panel_widths`, a seam's reset restores the layout:
the chat and the panel split 50/50 again, a dragged panel width forgotten.

* zgx: the sidebar folds over still content, only fading a little, as the panel does

Its card slid 5 points as it folded and came back: the window's gap
before it closed on the sidebar's own clock, and the page's gap beside it
eased from 4 to 5. Now the sidebar moves its whole column, that gap
included, on Zeron's curve, and the gap goes only with its last 5 points;
the page's gap follows the column as it shows. So its card's left edge,
its rows and the gap beside it hold still while its right edge sweeps.
Its content fades as the panel's does (ds/motion `content`, 0.3 to full
in 150 ms). The rail, where it's on, appears with a fade alone, no longer
growing from 0.96.

Zeron v2's view gets the sidebar's shown width and the seam's reset count
too: it runs the same shell sidebar.

* zgx: the sidebar folding or coming back splits the chat and the panel again, easing

As Zeron's `toggle_sidebar` re-split the conversation and the right pane
(`resplit_panels`), the sidebar folding or coming back splits the chat and
the panel 50/50 again, a width dragged on the panel's edge forgotten as
there (it holds through window resizes and other chats, until a toggle).
Before, the chat took all the sidebar gave and the panel held: Wing's rule,
overridden at Gaël's request. It eases there on the sidebar's own clock, so
the chat between them only widens or narrows; on the panel's quicker curve
it narrowed a little first, then widened.

The split counts the window's gaps round the cards, which Zeron's columns
didn't have: they all came off the chat, its card 18 points short of the
panel at "half" each. The chat's card and the panel now split to the
point. (The leasts already counted them, as Wing set them: unchanged.)
pane_floor's shares follow; the side chats' parity test runs where the
panel's home, centred, stands on whole points.

* zgx: the panel's content, held as its edge moves, stands out of the card's flow

Laid out at its far width while the card's edge swept over it, the panel's
content overflowed the card in its flow, and zgx's layout check said so
on every opening and closing ("content overflows its clip horizontally by
90 (358 in 269)", logged at launch on a panel opening at its least). It
stands at the card's right out of the flow instead: the same place, a
clip meant.

* zgx: what the fit hid for room comes back by itself; what the person closed stays closed

* zgx: the panel shuts on the tab it showed, never on its home

Closing a session's last tab closes its panel; the tab, its chip and its
view now stay as the panel eases shut, and are let go once it has (or as
it opens again, a tab opens, or another session shows). So no frame of the
home shows on the way out, and a terminal or a page isn't torn down under
the motion.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: the panel's home stands level with a new chat's composer, no wider than the reading column

The composer's rule (a little over the middle of the room under the title
bar) now lives in screens/chat/dock, and the panel's home reads it over
the panel's whole height, so its block stands level with a new chat's
composer beside it, at any window size. Its rows are no wider than the
reading column (zeron.prose.measure), in the panel's middle, each row's
whole width still its target.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: Files with no file shows its tree, never an empty file

With no file open, the Files tab's tree shows however it was left, wide or
narrow; a file chosen then shows as the tree was asked (put away, the file
alone). Wing's narrow rule is unchanged.

* zgx: a test that the panel's tabs and the Files tree never move the panel's width

* zgx: the Files tree goes or comes at once as its pane crosses its narrow line

As the window resizes, the panel keeps its half, so its Files pane can cross
Wing's narrow line (a tree and a file's least): the tree now goes or comes
beside the file at once there, the file taking its room, instead of sliding
under the drag. Its toggle still slides.

* zgx: the keyboard test reads the title bar on its own

The window's tree dump stops past a budget, and the title bar, drawn last,
fell past it: its Panel stop was there, unread.

* zgx: the panel home's rows are no wider than a list of rows (zeron.form.list)

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: the panel's edge keeps the pointer as the panel moves, so it stays lit under a resting hand

As Wing's: no longer out of reach while the panel glides, so a hover is
never lost across a glide; a press there meanwhile still does nothing, as
Zeron's handle.

* zgx: the sidebar's default width is 272, a step wider than Zeron's 256

From fit_policy, the one place it lives: the first launch's width and what
a double click on its edge puts back (ds.Sidebar's `default_width`, given by
the shell). Gaël's.

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: record Zeron v2 in step with this branch

Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>

* zgx: a streaming reply's parse costs a chunk what's new

A reply streaming in was read whole on every chunk: its math pre-pass
(ds/math_source) scanned the whole text, and each `$x$` or `$$` closing
rewrote text already sent, so ui.markdown's keyed parse started over and
every block was made again. Now:

- The math read goes on from the last place nothing it decided can
  change (math_source `feed`), and marks where the text can be parsed in
  two: a line after a blank one that nothing later can join.
- The settled head keeps its blocks; only what follows the cut goes to
  ui.markdown under the key, its resets costing the tail alone
  (markdown_find). Pictures are put together as the head grows.
- The windowed transcript makes again only its last runs.
- The veil's colour binding read a link's or inline code's ink (a
  function) when a fade ended, instead of handing it on: each such fade's
  end was a script error.

Property tests: the math read and the parse as a text grows equal the
whole read at every chunk (random markdown, random chunks).
tests/streaming_cost.rs times a 42 KB reply chunk by chunk.

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

* zgx: pin 6282d95d: latest zgx main (36324af9), carrying #1760 and #1755

All 14 lines (the Windows zgx-desktop one included) move together.
Brings zgx main's pointer lock (#1601), the latch and list work merged
since, and carries Sina's #1760 (ui.mesh takes its own triangles) and
#1755 (grid justify stretch; its per-node cost fix follows).
Checks: cargo metadata --locked on 4 targets; UI suite 1144 passed, 2
failed (the known About tests); cargo test --bin zeron-zgx the same 11
failures as the previous pin; v2 in step.

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

* zgx: a streaming reply's frame costs a chunk what's new

After #1305 the parse cost a chunk what's new, but the frame still grew
with the reply. A profile of the transcript streaming a 42 KB reply
showed why: each chunk, zgx converted the whole block list and the whole
run list that ds/markdown's computeds handed back, and the windowed
text judged every run from the top as the view followed the end (on the
offset's change and on the last run's resize).

- The blocks (or, windowed, the runs of 16) are a list state written a
  block or a run at a time (`set_key`/`push`/`remove`), from the first
  one the parse changed, so a chunk converts what it changed.
- A pass over the runs skips those wholly above the view's reach (found
  by halving: their boxes lie in order), judging of them only the built
  ones (to let them go), the one holding a find's match and the last.
- Run counts are read with `runs:len()`, not a whole list's `peek`.

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

* GitHub plugin: stop retrying chats that aren't here; one gh query per repo and branch

zgx: a pull request watch that ends because the chat's folder isn't a
checkout on its device, or its device is offline, is set aside instead of
retried every 2 s. It starts again only when the chat's folder, branch or
device changes, or the device comes back online. Other ends back off from
2 s to 5 min, and a row scrolling out and back keeps its wait.

Engine: checkouts of one repository and branch share one cached answer.
A fresh answer outlives its last watcher until it goes stale, so a watch
that restarts doesn't run gh. The default branch is asked about every
10 min. The `owner:branch` --head selector is dropped: gh doesn't take
that form, and the query matched nothing.

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

* Preview scan: read listeners from the kernel instead of lsof and ps

macOS: the 2 s preview scan ran lsof twice and ps once per cycle while any
local chat had a folder, and each proxied connection ran ps -p. They are
now in-process: libproc for this user's TCP listeners and their folders,
one sysctl for the process table, KERN_PROCARGS2 for arguments. The scan
takes 1.2-1.8 ms instead of 144-216 ms. lsof stays as the fallback if the
kernel's socket record ever changes size.

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

* zgx: pin 530d3f9f: #1755 without its per-node cost

The same zgx main (36324af9) and carried commits as 6282d95d, with
#1755's fixed change: only grid nodes asking justify stretch pay for
it (re-gate: all 44 cells ≤ +0.02%). All 14 lines.
Checks: cargo metadata --locked on 4 targets; UI suite 1148 passed,
2 failed (the known About tests); cargo test --bin zeron-zgx the same
11 failures as before.

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

* zgx: pin 507531eb (zgx #1769): a scroll copies past its content's fades and layers

530d3f9f plus #1769: a mask, fade, layer or content blur on a node inside
a scroll view's content no longer forces a whole repaint as it scrolls
(backdrop blur, blend and a view under two fades still do). Gate: 42 of
44 cells ≤ +0.02%, the rest libc. All 14 lines.
Checks: cargo metadata --locked on 4 targets; UI suite 1148 passed, 2
failed (the known About tests); cargo test --bin zeron-zgx the same 11
failures as before.

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

* Revert "zgx: pin 507531eb (zgx #1769)": back to 530d3f9f

#1769's code review found copies that can be wrong (a layer shader
reading the window's position drifts with the content; stacked boxes in a
fade band under a blurred or masked layer) that the perf gate can't see.
Its author is fixing them and will send a new pin commit; until then the
shared branches stay on 530d3f9f.

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

* zgx demos: the editors' code size is text_size, not an inert size

ui.textarea's `size` did nothing (zgx #1752 makes it size the box and
`zgx lint` warn on it); `text_size` is what sets the type, so the two
gallery editors now show code at the prose code size they asked for.

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

* Chats reach long chats on other devices (#1307)

A long transcript was one RPC message across the device relay. Past 16 MiB
the Durable Object's single frame hit tungstenite's default frame cap in the
reader, ending the whole peer link; past 32 MiB workerd closed the host's
socket, ending every client's. Each read of such a chat from another device
failed with "WatchDocMessages: stream ended before the transcript arrived",
and send_message read the transcript before delivering, so sends failed too.

- Relay: clients that reassemble say so in the RPC stream id; hosts send them
  large replies in 512 KiB pieces. Older clients get an error for that request
  instead of a frame that ends their link. Relay dials take frames up to the
  local socket's cap, so older hosts' big frames arrive.
- WatchDocMessages takes a window (limit, offset, after): frames carry only
  the slice and its facts. Older hosts ignore it and the reader slices.
- send_message delivers first. The turn's marker is the sent message's own id,
  so nothing about the transcript can hold up or undo a send. It no longer
  needs the host's harness catalog when the chat has a harness.
- read_chat, get_chat, respond_to_input and waits ask for windows, and waits
  follow deltas rather than re-reading.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* zgx: a reply's text that begins empty shows its words as they stream

A streaming reply's text part written empty (or blank) has no block in
its row (blocks_of skips it), and appends to a streaming text part only
republished the draft, so its words showed only once the turn settled.
Its first words now republish the rows once, as a thought's already do;
more of them stay the draft's.

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

* zgx: pin c4b420c1: zgx main 4e0dd7ef with the carried commits on top

Main brings #1713, #1718, #1730, #1729, #1781, #1794, #1783, #1775, #1752,
#1764, #1795, #1803 and #1806. Carried (not on main yet): the collector's
goal (#1543 closed), Metal's queue at rest (#1544 open), and a clippy line.

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

* zgx: pin f32b9432: pin-main-6 with transcript rows built ahead of the scroll (#1772)

zgx 1ab4ec89 (main 14a02a13 + the carried commits) plus #1772's list
build-ahead, gate-clean with its review round done.

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

* zgx: a turn's thinking and tool calls cost what's new, not what's there

A long activity group (thousands of tool calls, long thinking) made the
app unusable: its cost grew with every call and every byte of thinking.
Now each update costs what changed, and what shows of an open group is
all that's built, pixel for pixel as before.

- ds/activity: an open group's rows come in runs of 16, each written only
  when one of its calls changes (by reference: the host now keeps each
  unchanged call's value) and built only near the view (held at its exact
  height otherwise, as a long reply's blocks are). Rows read one count and
  one last-branch place instead of each scanning the whole list for the
  trunk (O(N^2) an update). A thought's "Show all N lines" counts its
  gaps as its words grow instead of re-scanning them all on every height
  change. Runs are judged only once laid out at their height (opening,
  the tree lays them out first in no room, which built every row).
- ds/transcript: passes the group its view, as it does a reply's text.
- chat.rs: a reply being written keeps each call's built value while its
  part is unchanged (LIVE_TOOLS, by id and whether it's the part being
  written), looked up once per build however many layouts show it; the
  summary counts edited files with a set. `draft_of` pulled out of
  `publish_draft` for the benchmark.
- activity_cost_tests: the growth benchmark (`activity_cost`, ZGX_PROFILE
  phases, host build, nodes), a pixel comparison on a virtual clock
  (`activity_pixels`: 284 frames, bit-identical before and after), and two
  gates that run with every test: an open group's nodes don't grow with
  its calls, and a reply built again keeps its unchanged calls' values.

Open group, a call arriving: 2000 calls 84M instr + 6.0 ms host -> 17M +
2.0 ms; pressing it open: 2.7B -> 0.24B; a thinking chunk: 22M -> 1.2M;
idle ticks 0.8M -> 0.07M. A 500 KB thought's chunk: 26M -> 4.9M.

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

* The chat fixture keeps its chat open when the app's host publishes none

Run in the app itself (the Rust host installed, as `zgx inspect` drives it),
the host writes chat.session too. It never opened the fixture's chat (the
fixture's stub did), so an engine frame (WatchSessions, WatchChats, the engine
unreachable) has `publish_session` write nil: a moment after launch the page
went back to opening, its transcript gone, which read as scrolling to the top
blanking it. The fixture is the engine here: its chat stays open through
those frames, as an engine's does. The app opens its chats through the host,
so it publishes the real session and was never affected.

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

* zgx: pin a72154ba: a caret's row coming back mid-build selects nothing (#1823)

f32b9432 plus #1823's selection fix: an end parked in a row that's
mounted again before its text is back no longer lights the whole row.
Luau suite: 1153 passed, the 2 known About failures.

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

* Plugin launch: safe mode on Linux and Windows, a refused delete says so, a removed plugin forgotten whole

B1. Safe mode was ZERON_SAFE_MODE alone on Linux and Windows: no menu bar
to reach "Use Zeron v3", a template draws the palette, and Alt held at
launch wasn't read. Now:
- Alt held as Zeron opens is read on Windows (GetAsyncKeyState) and on
  Linux under X11 (libX11 opened at runtime, nothing linked). Wayland
  gives no app the keyboard before it has a window: there it's the flag
  or the shortcut.
- `zeron --safe-mode` (and the dev launch word) opens with Zeron's own
  interface, as --zeron-template did.
- Cmd+Alt+Shift+Home (Ctrl+Alt+Shift+Home on Linux and Windows) is the
  host's "Use Zeron v3" key: held before any script's command, so a
  template or plugin declaring it goes without (its row says whose), and
  reserved, so a focused web page or terminal never has it first. The
  palette shows it beside the item.
- The launch toast says Alt, not ⌥, off the Mac.

B7. A sidebar delete the host refuses showed nothing (the window had
already left the session): a warning toast now says
"Couldn’t delete “<title>”" (shell.sidebar.session.couldnt_delete, en
and zh-Hans).

B10 (R26 leftovers).
- A removed plugin's state is forgotten through zgx (ScriptHost::
  forget_state): its in-memory ui.state/ui.persist values and writes
  still queued go too. Deleting the folder alone let a queued write put
  it back and a plugin put back this run start from its old values.
- The sidebar filter's notice names the plugin from the host
  (sidebar.filter_by: the one loaded plugin allowed to set it, by its
  installed name; "A plugin" for none or several), never the `by` the
  plugin writes.

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

* Engine: approve and install plugins on your other devices

Beta users couldn't install a plugin on another of their devices from
Settings → Plugins: since R6 (#1139) a peer was refused ReviewPlugin
(local_only) and DecidePlugin {allow: true} (peer_refused) at both ends,
and ReviewPlugin wasn't forwardable, so the sending engine minted a review
for its own plugin list ("There's no plugin …"). A file couldn't be sent
at all.

Now a verified peer (the edge's fromDevice, same account) may mint a
plugin review and allow with it; a review is bound to who minted it
(reviews::Origin), so B's review for A is good only to A over the link,
never to B's own app, an unverified dial or an agent. The sending engine
carries reviews, allows and files only for its own app
(zeron_rpc::app_forward_only), never an agent's token. A .zeron-plugin
file goes over in 384 KiB pieces (StagePluginPackage, then InstallPlugin
{upload}), since relay requests aren't chunked. Templates' consent and
signing stay local. An older engine's refusal is said as the version it
needs (REMOTE_APPROVALS_SINCE).

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

* Plugins launch: one SDK everywhere, zgx tests in CI, install.sh guards ~/.zeron

- A4: re-copy apps/zgx/plugins-sdk/zeron.luau into all 14 copies (git,
  github, parallax-scenes, 11 plugins-dev examples); 12 lacked the agents
  block, all lacked the "project" context fix. examples_tests
  `sdk_copies_match_canonical` checks them byte for byte. The beta packaging
  (macOS, Linux, Windows) stamps the canonical SDK into each shipped builtin,
  so builtins can't ship a stale one. Builtins aren't signed (the engine scans
  them as Zeron's own), so nothing to re-sign.
- A6: a `zgx` CI suite (zgx-tests.yml, planned by scripts/ci/plan.py): apps/zgx
  unit tests and the Luau UI tests (`zgx test ui`, CLI at the pinned rev) on
  macOS and Linux, plus the engine's plugin tests on macOS. Known failures
  (10 Rust, 2 Luau About tests) live in scripts/ci/zgx-known-failures.txt;
  anything else fails. core-tests also runs engine tests/plugin_services.rs.
  No Windows job yet.
- B13: plugins-dev/install.sh refuses ~/.zeron as well as ~/.comet-native
  (and anything under them, symlinks resolved); its default is every example.

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

* Plugins: an author's new key updates (asking again); removing takes everything

- Key rotation (B4): an update signed by another key installs when the edge,
  asked now, says the new key is live and verified and the old one (revoked
  or not) belongs to the same username. It waits for the person again
  (decision bound to the new key, `reask`); the update found says
  `new_key: true`. Anyone else's key, a revoked new key, or no answer from
  the edge: refused as before.
- A folder squatting a built-in's id (B11, R25c): `entry(id)` prefers
  Zeron's own, so removing the folder no longer wipes the built-in's
  decision and storage.
- Git installs (B11, R25d): `path` is canonicalized and must stay inside the
  clone; the manifest there can't be a link.
- Storage (B12, R29): a folder that vanishes between scans takes its
  `.storage/<id>.*` with it, and a fresh install under an id starts empty.
  (Export paths were already restricted on this branch.)
- `.removed` (B8): emptied right after a remove and at every start.

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

* Plugins: a folder gone for a while keeps its storage

A folder can vanish briefly for harmless reasons (a rename by hand, an editor
or sync tool replacing it, a dev moving it), and wiping its data then is
worse than the leak it prevents. That leak is already closed where it
matters: a fresh install under an id starts with no leftover storage, and
Remove deletes everything for good.

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

* zgx: allow and install plugins on your other devices from Settings → Plugins

The consent sheet for another device's plugin had no Allow (may_allow
refused "elsewhere"), and its review was minted by this device's engine
for this device's list. Now the sheet shows the plugin as that device's
engine lists it, offers "Allow on {device}" (armed like any other), mints
the review on that device (targetDeviceId) and decides there; it says the
approval is that device's only. Signing stays this device's.

Install… offers Choose File for another device too: the file is sent in
384 KiB pieces (StagePluginPackage) and installed there (InstallPlugin
{upload, name}).

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

* Engine: remote approvals arrive in the 0.2.139 stable

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

* Plugin docs: who made it, trust model, making a package, install errors

Explain the author labels (by you, @username, Unverified, Changed since
you allowed it) and how a username is claimed; a short trust model; the
manifest's author, mcp, settings_description and signature fields;
links.open and notifications in the permission table; update_plugin only
checks; export_plugin / zeron plugin export; the reason words install
errors carry. Platform-neutral words in place of "this Mac".

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

* Plugins launch: export a package, plain-words install errors, tampered sheet

- export_plugin MCP tool and `zeron plugin export <id> [--to]`: an
  agent's export goes to plugin-exports only (the engine refuses its
  `to`), as templates' do.
- Install/update failures read "<reason>: <words>"; the app says each
  reason in its locale (en, zh-Hans). GitHub 403/429 is rate_limited, not
  "can't be found"; git missing says what to do instead. Release
  lookups ask as you when gh is signed in or GITHUB_TOKEN/GH_TOKEN is
  set, anonymously again on a 401.
- A tampered plugin's sheet offers only Remove and Reinstall (fetched
  again from its source, put in place, asked again); the engine and the
  consent host both refuse an Allow of it.

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

* zgx: a trackpad's swipe scrolls and never steps the history

Two-finger (and three-finger) swipes between pages no longer go back or
forward on the main page or in Settings, in Zeron's look and v2's. The
title bar's arrows and Cmd-[ / Cmd-] still do.

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

* zgx v2: the title bar's island is back with the sidebar closed over art

v3 turned the shared title bar's island off for both looks; v2's window
buttons and controls stood bare over a new chat's wallpaper. The island
shows again while the sidebar is collapsed over art; v3 passes no art,
so it never shows there. A test mounts both looks to hold it.

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

* engine: a chat pinned at its first run parks on its pinned credential

Dispatch read the run credential before prepare_run, where run.preparing
pins the chat, so every chat a plugin pinned at its first run had its
parked session replaced (and resumed) before its second turn. drive_run
reads the credential again once the run is prepared.

Also refresh account-pin's copy of the plugin SDK.

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>
Co-authored-by: hoangvu12 <hggaming91@gmail.com>
Co-authored-by: Sina Khalili <20732540+SinaKhalili@users.noreply.github.com>
Co-authored-by: gaelcado <cado.gael@gmail.com>
Co-authored-by: laurentcodes <stlaurentcodes@gmail.com>
Co-authored-by: Daniel Katulevskiy <84909978+katulevskiy@users.noreply.github.com>
Co-authored-by: José Gurruchaga <jsgrrchg@gmail.com>
Co-authored-by: sheauhuu <xiaohu.c@qq.com>
This commit is contained in:
Chance 2026-11-10 01:34:35 -05:00 • committed by GitHub
commit 8ea7bf8c1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 3006 additions and 46 deletions