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

Compare commits

..

121 commits

Author SHA1 Message Date
Wing
f6a9bbfc29
Merge pull request #1468 from zeronsh/zeron/main-catches-up-0.3.7
main catches up with the release line (Zeron 0.3.7)
2026-11-15 16:41:56 -07:00
Wing
55a5c39219 Zeron 0.3.7: Cloud chats switch accounts; a scroll away stays away
0.3.6 plus:
- A Cloud chat's model menu offers Cloud's accounts again, to switch the
  provider account every Cloud machine uses (#1467).
- The transcript no longer pulls you back to the end after you scroll away:
  not during a send's glide, nor at a resize after a scroll (#1450).

Version 0.3.7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 16:41:46 -07:00
Wing
3344446195
Merge pull request #1450 from zeronsh/zeron/transcript-scroll-away
Transcript: a scroll away from the end stays where it was taken
2026-11-15 16:41:32 -07:00
Wing
2fc1d11aeb
Merge pull request #1467 from zeronsh/zeron/cloud-model-accounts
Composer: a Cloud chat's model menu offers Cloud's accounts
2026-11-15 15:54:30 -07:00
Wing
19b04d04d5 Composer: a Cloud chat's model menu offers Cloud's accounts
A chat on a Cloud machine had no Account row in its model menu: its
accounts were asked of the machine (`cloud-…`), which the engine doesn't
answer for, and whose accounts aren't its own anyway. Cloud's are the
vault's, every Cloud machine's alike, which this engine answers for under
"cloud" (crates/engine cloud_accounts), as Settings → Providers shows them
under Cloud (#1456). Any Cloud device (a chat's machine, the account's
Cloud device) now reads, switches and refreshes those; a machine is never
asked (it would be woken).

Test: model_accounts' "a chat on a Cloud machine reads and switches
Cloud's accounts" (fails without this: the machine was asked). Full UI
suite (1425) passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:54:23 -07:00
Wing
68e460af25
Merge pull request #1457 from zeronsh/zeron/main-catches-up-0.3.6
main catches up with the release line (Zeron 0.3.6)
2026-11-14 21:14:06 -07:00
Wing
e48dcbed12 Zeron 0.3.6: Cloud's providers managed again; Cloud machines come online
0.3.5 plus:
- Settings → Providers: Cloud is a choice again while it's on, its
  accounts (Claude Code, Codex) and API keys managed there (#1456).
- Cloud: the updater and the pre-sleep tidy keep zeron-engine, which
  `zeron headless` runs (#1455; the edge's install and repair, #1454, are
  live).
- Plugins: read the composer's draft and set it aside; compose can replace
  it or write another chat's (#1445, #1452, #1453).
- Browser: a load error over a page that drew can be dismissed (#1431).
- The "Task completed" chime and banner come on a finished turn, not your
  own send; a banner's click opens its chat.

Version 0.3.6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 21:13:50 -07:00
Wing
7e1f34316a
Merge pull request #1456 from zeronsh/zeron/providers-cloud
Providers: Cloud is a choice again, its accounts and API keys managed there
2026-11-14 21:13:34 -07:00
Wing
739ab4187f Providers: Cloud is a choice again, its accounts and API keys managed there
Zeron 0.3's Settings → Providers listed only computers, so Cloud's
providers (the vault's logins and keys every Cloud machine uses) couldn't
be managed at all. As 0.2 did, Cloud is one more choice after the
computers while Cloud is on (`agents.target("cloud")`, which the engine
answers from the vault: crates/engine cloud_accounts).

- Its cards: Claude Code and Codex, their accounts (sign in, switch,
  remove), with no switch, settings or Update (`ProviderCard.fixed`), and
  nothing to install or add.
- Its API keys: Anthropic's and OpenAI's, saved to the vault for the
  account's Cloud device (`agents.cloud_key` → VaultPutApiKey), the key
  every Cloud machine uses from its next turn.
- devices.picker takes extra choices; the page's body is Cloud's own.

Tests: ui/tests/providers_cloud.test.luau (Cloud offered while on, its
cards and keys, back to this computer; none without Cloud); agents'
`a_cloud_key_is_one_cloud_runs_for_its_device`. Full UI suite (1424) and
agents:: (12) pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 21:13:25 -07:00
Wing
59783f1516
Merge pull request #1455 from zeronsh/zeron/cloud-updater-keeps-engine
Cloud: the updater and the pre-sleep tidy keep zeron-engine
2026-11-14 20:35:46 -07:00
Wing
9f43edfee7 Cloud: the updater and the pre-sleep tidy keep zeron-engine
Since 0.3.0 the release's `zeron` is the zgx app, whose `zeron headless`
runs the `zeron-engine` beside it. The updater (staging a release) and the
tidy (pre-sleep, on installed versions) left it out on Cloud
(`CLOUD_UNUSED_FILES`, 451822be9), so a machine that updated stopped coming
online. Nothing is unused on Cloud now. (#1454's repair, before each start,
covers the releases out there until this one is.)

Tests: the updater's (74) and transaction tests (30), with the Cloud ones
now asserting it's kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 20:35:40 -07:00
Wing
a30749df6d
Merge pull request #1454 from zeronsh/zeron/cloud-keep-engine
Cloud: keep zeron-engine, and put it back before each start
2026-11-14 20:29:17 -07:00
Wing
7e1d53000a Cloud: keep zeron-engine, and put it back before each start
New Cloud machines never came online: since 0.3.0 the release's `zeron` is
the zgx app, whose `zeron headless` runs the `zeron-engine` beside it, and
the installer deleted that file (451822be9, when headless linked the
engine). The unit exited at once ("no engine beside …/zeron (zeron-engine)"),
restarted every second, never enrolled, and the chat said "Starting a Cloud
machine…" until the 10-minute limit. 0.3.5's own updater and pre-sleep tidy
leave it out on Cloud too, so a machine updating on a wake broke the same way.

- The installer keeps zeron-engine, and downloads again a version that's
  installed without it.
- A repair (`~/.zeron/repair-engine`) runs before every start of the unit
  (`ExecStartPre=-`, never failing it): with `current` missing zeron-engine,
  it fetches that version's release from the edge and puts the file back.
  The installer sets it up, and so does every wake's first command, so
  machines set up before this get it as they wake (reloading systemd once).

Tested: the install script's unit tier (keeps it, re-downloads a version
without it, the repair restores it and is a no-op once there, a failed
download never fails a start, the wake writes the repair once); the real
0.3.5 release on Linux (restored byte for byte; `zeron headless` then
starts and enrolls); edge unit (100) and Cloud workerd (77) tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 20:29:07 -07:00
Wing
93bed8f397
Merge pull request #1453 from zeronsh/zeron/plugin-draft-replace
Plugins: compose can replace a draft's words or write another chat's; draft_of reads any chat's
2026-11-14 19:58:22 -07:00
Wing
e1894e5522 Plugins: compose can replace a draft's words or write another chat's; draft_of reads any chat's
What #1446 asked for that #1445's draft API didn't cover:
- `zeron.compose(text, { replace = true, session? })` ("compose"): the
  words put in place of the draft's (its chips stay, so a rewrite keeps
  what it carries), and in another chat's draft (`session`). Words alone
  are added after what's there, as ever. Nothing is sent.
- `zeron.draft_of(session)` ("draft"): a promise of any chat's draft as it
  is, as `zeron.draft()` says it (text, chat, chips by kind and name,
  never a path), read once in the host where the app keeps it.

The composer's handling of a plugin's words is one path now (words alone
come as a string). Consent: "compose" says it may replace what you wrote;
"draft" says it sees your words in any chat. Docs, SDK (and its copies).

Tests: src/plugins `compose_takes_words_alone_or_with_replace_and_a_chat`,
`a_chats_draft_is_read_where_it_is_kept_without_paths`;
ui/tests/plugin_compose_replace.test.luau. Full UI suite (1422) and
plugins:: (248) pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:58:13 -07:00
Wing
c10b5ac3f4 Banners: no "finished" on your own send, and a click opens the chat
A finished banner (with its sound) rang as you sent. The engine's notifier
rings when a session's completion marker moves, and your own message
often moves it: a steer or a queued row taken as a turn ends publishes
that end with Working (your message carries the turn on), and a send that
replaces the runtime marks the old turn's end (a held wait's included) a
moment before your turn starts. The old app's chime kept quiet for a send
in flight; the engine, which now rings for the zgx app, never knew. Now a
finish published with the next turn running never rings, and the rest
wait two seconds to stand: a turn starting meanwhile takes the finish
with it. Questions and failures still ring at once.

Clicking a banner did nothing. The engine posts Zeron's banners, but
macOS hands a click to the app its bundle names (Zeron.app's interface),
never to the engine that posted it, so the engine's own route (`open -a
… zeron://notification/…`) never runs. Zeron.app's interface has always
taken the click itself (`notify::on_click`); the zgx app never did. It
does now: Zeron comes forward and opens the banner's chat (agent updates:
Settings → Providers), through the same route a link takes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:45:09 -07:00
Wing
38f21b5130 zgx: "Task completed" chime rings on a finished turn, not on your send
zgx's chimes rang done.wav whenever a chat's sidebar status turned
"done", but that status is only unseen activity, and your own message
makes it too, so every send played the completion chime (#1437).

Chat rows now carry the session's finished-turn mark (`turn`, from
lastCompletedTurn) and whether that row was fresh. The chime rings
"done" when the mark moves, as the shipping app and the engine's
banners decide it: never when the next turn is already running (a
steer, a queued message taken), never for an old row a sync brings
back or a session row returning, and only once a finish has stood for
two seconds, so a send that replaces the runtime (old turn's end, then
your turn a moment later) stays quiet. Questions and failures still
ring at once. Sends stay silent, as the sound design has it.

Fixes #1437

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:43:53 -07:00
Wing
32a512c79f
Merge pull request #1452 from zeronsh/zeron/plugin-draft-only-when-read
Plugins: the draft is written for plugins only while one may read it
2026-11-14 19:37:56 -07:00
Wing
d583532c28 Plugins: the draft is written for plugins only while one may read it
`zeron.draft` was written on every key typed, the whole draft copied each
time, whether or not any plugin may read it. It's written now only while a
plugin that's on has "draft", and cleared when none does.

ui/tests/plugin_draft_read.test.luau: none written with no such plugin (or
one off); written as typed with one on; cleared as it goes off. Both fail
without this.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 19:37:44 -07:00
Wing
ca729035b6
Merge pull request #1445 from hoangvu12/zgx/plugin-draft-api
Plugins: a plugin can read the composer's draft and set it aside
2026-11-14 19:37:35 -07:00
Wing
00b5182c77
Merge pull request #1431 from zeronsh/zeron/browser-load-error-dismiss
Browser: let a load error be dismissed to show what rendered
2026-11-14 19:16:52 -07:00
Wing
56e6886625 Transcript: a scroll away from the end stays where it was taken
Two ways the view was pulled back to the end after a person scrolled
away from it:
- A send's glide (the prompt rising to the view's top, or a steer's
  waiting up to 2 s for its prompt to land) went on to the end over a
  scroll taken meanwhile. A wheel now stops the glide where it is; the old
  reply keeps the room it held until it's out of view, so nothing shown
  moves.
- A scroll begun within 300 ms of the view's size changing left the end
  held, and the next resize, however much later (the sidebar, a panel,
  the window), went back to it. Resting away from the end now lets it go
  when a person scrolled since the last resize.

ui/tests/transcript_scroll_away.test.luau: both fail on main, pass here.
The full UI suite passes (1405).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 17:06:34 -07:00
Wing
777ba15493
Merge pull request #1449 from zeronsh/zeron/main-catches-up-0.3.5
main catches up with the release line (Zeron 0.3.5)
2026-11-14 17:06:19 -07:00
Wing
2d480e9fb7 Zeron 0.3.5: provider accounts, tool result pictures, steadier composer
0.3.4 plus main since (#1331–#1440):
- Per-provider accounts for Pi, OpenCode and Hermes, API keys and Claude
  for Pi; every model in the picker says its provider (#1425).
- A Codex chat's / lists Codex's commands and skills (#1403).
- A tool's result pictures show in its row (#1103, #1186).
- The composer's layout and focus hold steady through moves and resizes
  (#1420); Settings reopens on the page shown last (#1416).
- A prompt the opening tail brings shows once: no frozen transcript from
  the duplicate-key panic (#1433).
- Windows: messages have their time and Copy again (#1440); microphones
  listed by name (#1334).
- macOS: chimes no longer trigger a kernel deadlock that hangs the Mac
  (#1333).
- Edge: chat rooms can offer the relay layer (Wing's account only;
  #1331, #1335).

Version 0.3.5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 17:05:45 -07:00
hoangvu12
8a91a02dd2 Plugins: a plugin can read the composer's draft and set it aside
A new "draft" permission lets a plugin read what's being typed in the message box (zeron.draft) and take the whole draft out and put it back later (take_draft, put_draft, swap_draft, drop_draft). Zeron keeps a taken draft itself, so a plugin never sees file paths. This is what a prompt stash needs: write in the wrong chat, set it aside, restore it in the right one.
2026-11-15 04:59:16 +07:00
Wing
fbf5199a69
Merge pull request #1440 from zeronsh/zeron/windows-message-time
Windows: messages have their time again, and Copy shows without one
2026-11-14 09:25:28 -07:00
Wing
d77f671b90 Windows: messages have their time again, and Copy shows without one
On Windows every message's time was missing: the timestamp formatter had a
Unix implementation only (localtime_r) and returned nothing elsewhere. The
hover strip under a message showed only when it had a time, so Copy and the
plugins' message actions vanished with it there.

- stamp() on Windows: FileTimeToSystemTime + SystemTimeToTzSpecificLocalTime
  in the machine's time zone, formatted as on macOS and Linux (shared clock()).
- The strip shows for a settled message with a time or something to copy, so
  a missing time can never take Copy with it again.

Tests: clock()/stamp() on every platform; a settled reply with no time shows
Copy on hover (fixture command reply_without_time).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:07:13 -07:00
Wing
55c07931aa
Merge pull request #1433 from zeronsh/zeron/transcript-duplicate-key
zgx: a prompt the opening tail brings shows once
2026-11-14 01:04:09 -07:00
Wing
a4c015f7bf zgx: a prompt the opening tail brings shows once
A reopened chat's opening tail (historyPending) took the engine's copy of
a prompt sent from here into its entries without letting go of the copy
pending here, so the transcript published two rows with one id. Its
virtual list is keyed by id and panicked ("duplicate virtual list child
key", seen on Linux, 0.2.139-beta.6 and still in 0.3.4's zgx); the panic
was contained but the transcript stopped updating until reopened.

The tail now drops arrived prompts as every other frame does, and the
published list keeps one row per id (the first, so the engine's copy over
the pending one) whatever else might repeat one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 01:02:22 -07:00
Wing
ae99dcfcc1
Merge pull request #1420 from zeronsh/refactor/zgx-composer-layout
fix(zgx): stabilize composer layout and focus transitions
2026-11-13 23:15:17 -07:00
Wing
d0959e6132 zgx: pin zeronsh/zgx main d391ea727, which draws a fade band repainted alone as a whole repaint does (zgx#2177)
The zgx bump to 88f45fb16 left transcript_paint_tests::a_long_chat_come_back_to_mid_scroll
one pixel off a whole repaint: zgx-gpu decided how to draw a view's fade bands
from the bands a frame repainted, so a scroll repainting only the top band faded
a glyph's overlap twice. Fixed in zgx#2177; at this pin all transcript paint
tests pass (app suite 709 passed, zgx UI suite 1402 tests, 0 failed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 23:15:12 -07:00
Wing
0f3118dea5 Browser: let a load error be dismissed to show what rendered
A failure reported after the page's own document committed (WebView2
calls a page with an HTTP error status, such as Google's 429 "unusual
traffic" check, a failed navigation; WebKit's didFailNavigation) no longer
covers the page with "Couldn't load this page". A real failure (one that
never committed, or the page's process ending) still shows it, now with
Dismiss beside Try again (Escape too), for that navigation only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 05:41:51 +00:00
Wing
6df5169d49 fix(zgx): a sent pick is cleared by what it holds, not by table identity
After a send that carried a pick (model, effort, fast, options), the
composer cleared the chat's pick only if `shared.picks:peek()[id]` was
the very table read at send time. A state's snapshot read again needn't
be the same table: after the composer metrics change it wasn't (no write
to the picks in between; the effect's reads changed), and chat_actions
"a pick goes with the message, and the session takes it then" failed
with the pick left behind. Compare the drafted fields instead. (Main has
the same identity check; it happens to hold there.)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:26:07 -07:00
Wing
3de4a47be3 docs(zgx): composer doc follows the pin and the fixes; preview keeps settings
docs/composer.md: the API comes from zeronsh/zgx main (zgx#2148), not
the fork; long drafts are estimated, metrics follow width only while a
line wraps, targets publish only bound changes, side chats publish
through Dock.Dock, and a send eases the composer's size as it glides.

composer_transition_preview.luau wrote the persisted motion_reduce
setting (and the theme) at load, changing a dev build's own settings.
It no longer writes Reduce motion at load; its button still toggles it,
and leaving the preview (a reload, the preview unmounted) puts back the
setting and theme it found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:26:07 -07:00
Wing
944eabf4cb fix(zgx): a send from a new chat glides into the dock, its size eased
The send's move to its session bumped the composer's snap twice (the page
mode's effect and the routed chat's), so the pill dropped to its docked
size at once and only its place glided. The send now records the session
it opens (`slide_to`), kept until the route moves anywhere else, and both
effects read it, so neither depends on running first or on
session_id:peek() already being the new id: the place glides and the
form and size ease with it, no snap. Any other move still snaps.

(Main snapped both in the chat fixture: its routed-chat effect opened a
400 ms snap window on the send too, and the place effect re-ran inside it.)

Test: a_send_from_a_new_chat_slides_the_composer_down_and_eases_it_docked
samples y and height each frame against a reduced-motion shell. It fails
on main (both snap) and on the PR before this (height snaps).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:26:07 -07:00
Wing
da4e6d0342 perf(zgx): composer measures only what can change its layout
Typing in a long draft: the composer queried text_metrics on every edit,
which walks every line twice, past the editor's 4,096-line span cache, so
each keystroke re-ran every line's highlighting. A draft with enough hard
lines to fill the text box is open (it has a newline) and capped whatever
it wraps to, so Layout.estimate stands in for the measure there (it looks
for at most a dozen newlines); an equal estimate is the same request and
publishes nothing. Per key in the shell fixture (probe, 20 keys):

  5,000 lines   main 11.5 ms / 15 calls   PR 37 ms / 10,034   now 3.6 ms / 14
  30,000 lines  main 67 ms / 15 calls     PR 221 ms / 60,034  now 21 ms / 14

Resizing: every pill width change rebuilt the target geometry (its width
made a new destination), woke the motion, its frame and every binding,
and ran the metrics, settlement and on_sizes chain in each pane. Now the
target is published only when a field a view binds or the motion reads
changes (Layout.same_target); metrics follow the width only while the
widest line doesn't fit it; layout reads the sample's size alone, so a
new revision of an equal size wakes nothing; on_sizes is called only when
a field changes, its rest height no longer reads the draft; and side
chats no longer write dock_h through on_sizes as well as Dock.Dock's
on_resize. Script calls per frame of a dragged sidebar edge, one and four
chats: main 122/211, PR 121/251, now 121/217. Split resize, 1-4 chats:
main [120,444,600,756], PR [120,684,972,1260], now [120,480,660,840].

Tests: typing_in_a_long_draft_costs_what_a_short_one_does (10,034 calls
a key in 5,000 lines before, 14 now), geometry cases for the estimate
and same_target, and the width-only metrics test split into a draft
that fits (asks nothing) and one that wraps (follows at once).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:26:07 -07:00
Wing
3656b25d67 ci: install the zgx CLI from zeronsh/zgx only
Reverts reading the git URL out of apps/zgx/Cargo.toml: CI must never
cargo install code from whatever URL a PR writes there. The rev still
follows the pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 20:45:31 -07:00
Wing
9bc696cdae zgx: pin zeronsh/zgx main (88f45fb16), which has text_metrics
The composer's editor metrics came from a fork pin; zgx#2148 landed the
same Element:text_metrics API on zeronsh/zgx main, with the memory-floor
work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 20:45:31 -07:00
Wing
e616d20c04 Merge origin/main into refactor/zgx-composer-layout
Brings in #1425's provider accounts. The only conflict was zeron-v2's
.base.json; both sides already carry account_group into v2's copies, so
the record takes the merged default files' hashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 20:43:05 -07:00
Wing
722c700afe
Merge pull request #1425 from zeronsh/zeron/provider-accounts
Per-provider accounts for Pi, OpenCode and Hermes; providers in the model picker
2026-11-13 16:46:45 -07:00
José Gurruchaga
82d410d7e0 perf(zgx): avoid redundant composer updates while resizing
Keep width and measurement metadata out of view binding invalidations, and let geometry follow the complete measured sample independently of readiness. A width-only query of the same acknowledged editor revision publishes immediately; text, typography, mount and IME changes retain deferred validation. Avoid starting a motion run when only layout-owned width changes.

The unchanged sidebar resize gate now measures 121 calls/frame with one chat and 251 with four, down from 336 with four. The marginal cost is 130 against the existing limit of 135. Add coverage for width-only metrics, editor replacement and resizing during a height transition.

Validation: 692 Rust unit tests, composer tray and 11 dictation integration tests pass; 35 focused composer Rust tests and 89 composer Luau tests pass. Beta check and metric/layout type checks pass.
2026-11-13 20:25:34 -03:00
Wing
adc82e90a8 Provider accounts: review and security fixes
- A key's name is judged on its own: anything that looks like a key is
  refused whatever key it's for, so Rename can't be used to test guesses
- Previews can't add a key, rename an account or forget a GitHub login;
  a test checks every action the code refuses is blocked
- A Pi switch over a Claude login it can't identify is refused, and the
  live entry is compared before it's written
- Hermes key add: the child dies with the request; the name goes as --label
- Switching from the composer reloads the agent's models
- changed_logins dedups through a sorted set
- Hermes model names: plain files up to 64 MB, naming waits at most 5 s;
  Hermes .env read is bounded
- The API key dialog's Cancel waits while a key is checked
- stores.rs module docs match what each store does

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:22:37 -07:00
Wing
cc17d9ff47 Merge remote-tracking branch 'origin/main' into zeron/provider-accounts 2026-11-13 14:54:24 -07:00
Wing
0cfbabe016 zgx: an agent's models follow its logins; a menu with no action shown ends at its last row
Pi signed in to Claude kept listing only its ChatGPT models until the app
restarted: the catalog was looked up once, before the sign-in landed. When
an agent's logins on a device change (an account come or gone, another in
use; usage alone doesn't count), that agent's models are looked up again:
here, that agent's alone, forced; on another device, its catalog while the
composer runs on it.

The model picker's account menu drew its actions' rule and inset under
the last account even when every action was hidden (Claude Code, which
Zeron adds no account to from there): now only while one shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:49:36 -07:00
Wing
59b2f1c44a Claude for Pi: a rate-limited profile still signs in, as the token names the account
Anthropic's profile endpoint answered a real sign-in with nothing usable
(the engine was being rate limited on Claude's usage endpoint at the same
moment), so Pi's Claude sign-in failed with 'Could not identify the
signed-in Claude account' after the token exchange had succeeded. The
token response names the account (account.uuid, account.email_address,
organization.name), as Claude Code's own sign-in already falls back to;
Pi's now does too, keyed as the profile path keys it. A refused or failed
profile lookup logs its status, never the body or the token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:24:13 -07:00
Wing
4ec5b50c86 Providers: keys read once, by name or last four; provider marks; Hermes env keys
- A key row says its last four exactly once: named, "Work" over
  "OpenRouter · API key"; unnamed, "API key ···a1b2" over "OpenRouter".
  The name, when set, is kept apart (display_name); the title is derived
  otherwise. Rename opens empty for an unnamed key and says which key.
- Hermes keys read the same; one seeded from an environment variable is
  never titled by it ("API key ···a1b2" over "OpenRouter · from
  environment"), and Hermes' own "api-key-N" labels count as unnamed.
- A key row's face is its provider's mark in the add rows' round well;
  logins keep their avatars. The add dialog's name field: "Name
  (optional)".
- Test servers ignore the `HEAD /` probes a preview scan in the test
  process sends to every local listener: the cause of the occasional
  extra hit in the GHES, spent-Claude and Pi key tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:14:27 -07:00
Wing
5a18697ad8 Merge remote-tracking branch 'origin/zeron/model-source-hint' into zeron/provider-accounts 2026-11-13 14:00:11 -07:00
Wing
3d07f58d60 Providers: API keys, Claude for Pi, cards like Claude Code's, Hermes fixes
Per-provider agents (Pi, OpenCode, Hermes) now look and act like every
other agent's card, take API keys in the app, and behave across devices.

Card: the same rows, rules and "In use" as Claude Code's and Codex's — a
provider's accounts together, each provider with its own one in use, the
plan line saying whose ("ChatGPT Plus", "OpenRouter · API key ···a1b2") —
and every add row at the foot (Add ChatGPT / Claude / GitHub Copilot
account, Add API key). No section chrome, no CLI hints. "Switch to this
account" only on a switchable row not in use; a refused switch says why
in a toast instead of doing nothing.

API keys: "Add API key" opens a dialog (provider select with each
provider's mark, masked key field with its placeholder shape shown plain,
optional name, Save disabled until typed, spinner and locked inputs while
the provider checks the key, the provider's refusal under the field).
Stored as each agent's CLI stores it: Pi's auth.json api_key entry,
OpenCode 1.x's api entry (OpenCode 2.x keeps keys in its own database:
refused with what to do, and a warning on the list), Hermes through
`hermes auth add <provider> --type api-key` with the key on stdin in a
session without a terminal. Keys are named (default "<Provider>
···<last4>", renamable from the row's menu; a name holding any of the key
is refused). The key is never logged, never in an error or the snapshot,
never on argv or in a child's environment, files 0600, and
AddAgentApiKey is local IPC only (refused, never forwarded, when it names
another device; refused by the relay host if a peer sends one).

Claude for Pi: Pi's own Claude Pro/Max sign-in, saved as pi saves it, a
fresh grant, swapped under pi's lock; a switch keeps a refresh the agent
made since the last list (single-use refresh tokens). OpenCode has no
Claude sign-in (verified in 2.1.2): refused with the API-key alternative.

Hermes: lists only pool entries Hermes itself uses (its
_pool_entry_is_explicit: device_code, loopback_pkce, hermes_pkce,
manual[:*], env:<VAR> while the variable holds a key) — a borrowed
gh_cli Copilot token is no longer offered.

Also: provider marks (one mono set), Select options with marks, Dialog
confirm `disabled`, TextField draws a password's placeholder unmasked,
Groq/Mistral dropped from key providers (no marks in the set).

Tests: engine agent_accounts 118 (keys stored/refused/never shown or
logged/stdin-only/0600, OpenCode 2.x refusal, names and rename, two keys
one provider, Pi Claude local and for another device, rotation kept,
Hermes explicit-only); device_routing remote per-provider list/switch,
provider refusal routed, remote key refused with no relay frame and no
file holding it; rpc routing asserts; app Rust and UI tests updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 13:52:59 -07:00
Wing
24cae27850 Hermes: 900K variants are a Context Window choice; names read lean, off the runtime
Hermes lists '<model>-900k' after each Codex model with a large window (a
Hermes-side name: the base runs at Codex's 272K). They fold into their base
model as a Context Window option (272K default, 900K), and a run that picks
900K sends the variant's id; pick_model_value composes any chosen window
('[1m]'/'-1m' for Claude as before, '-900k' for Hermes). Saved chats on a
variant id still run it.

The name lookup streams models_dev_cache.json through a 64 KiB buffer and
keeps only the names asked for (keys compared in the parser's buffer, never
allocated unless kept): peak footprint 2.6 MB vs 10.5 MB for the full parse
on the real 5.8 MB file. It runs on a blocking thread while the Hermes child
shuts down, so no async worker waits on file reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 13:07:36 -07:00
Wing
6c7b1ac222 Hermes: name models as Hermes's own models.dev catalog does
Hermes's ACP adapter labels each model with its id; the catalog it keeps
beside its config ($HERMES_HOME/models_dev_cache.json) names them as their
makers do. Read-only; a model it doesn't list keeps its id. Catalog cache
schema 3 so saved id-labelled lists are rediscovered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 12:49:33 -07:00
Wing
623dabc3d0 Merge remote-tracking branch 'origin/zeron/model-source-hint' into zeron/provider-accounts 2026-11-13 12:26:41 -07:00
Wing
f224da9e0b Model picker: a long line fades at its edge and glides to its end; old catalogs refetched
- A model row's name and provider read as one line: where it runs past
  the row its right edge fades (as FadeText's), and while the row is
  highlighted (pointer or keys) it glides left until its end shows,
  rests and glides back. Reduce motion keeps it still; a row that fits
  never moves. Test: `a line past its row fades at its right edge, and
  glides to its end while highlighted`.
- The saved model catalog's schema is 2: models name their provider and a
  Hermes `<Provider> · <model>` label is split. A catalog an older engine
  saved has neither, so it is fetched again rather than served as it was
  (Hermes showed "Anthropic · claude-fable-5.1" from its old cache).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 12:25:12 -07:00
Wing
a26f5f4ce0 Providers: accounts per model provider for Pi, OpenCode and Hermes
Agents that keep a login per model provider now show and switch them per
provider, everywhere:

- Settings → Providers (and setup's Your agents): such an agent's accounts
  sit under a heading per provider ("ChatGPT", "Claude", "GitHub Copilot"),
  each group with its own "In use" and its own "Add <provider> account"; a
  provider with none yet is a "Connect <provider>" row at the card's foot,
  and a sign-in shows in its own provider's row. A provider Zeron can't
  sign in to (Pi's Claude) says how the agent adds one. Hermes' pool is
  grouped the same way, read-only (no actions), adding through
  `hermes auth add <provider>`. Single-login agents look as before.
- Model picker: the Account row is the chosen model's provider's
  ("ChatGPT account" / "Claude account"), listing and switching that
  provider's accounts alone, so a ChatGPT switch never touches the Claude
  login; a provider with none yet says None and offers "Add <provider>
  account" (Settings → Providers, its sign-in started on the composer's
  device); a provider with neither has no row.
- Engine: Pi gains GitHub Copilot sign-in (GitHub device code with pi's own
  Copilot app, exchanged for a Copilot session at copilot_internal/v2/token,
  unconfigured models enabled and availableModelIds recorded as pi's
  /login does; an account without Copilot is refused, nothing written).
  Hermes gains xAI (`hermes auth add xai-oauth`, device code). Hermes
  marks each provider's first pool entry in use (a model of that provider
  runs on it), the active provider's rows still first. Switching and new
  sign-ins already rewrite one provider's entry alone; tests now pin it.
- Proto: login_options adds Pi github-copilot and Hermes xai-oauth;
  groups_by_provider, login_option, account_group_label and
  account_group_hint name the groups for every app.

All serde-additive: no field renamed, older apps read the same snapshot.

Tests: proto providers (3 new); engine agent_accounts (5 new: Pi Copilot
sign-in, no-Copilot refusal, per-provider switch isolation, Hermes xAI,
Copilot session/model parsing; Hermes in-use updated); app Rust (2 new:
grouping, device rows + logins); UI (provider_groups 6, model_accounts
_providers 5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 12:21:17 -07:00
Wing
f5d0530e57 Model picker: every agent's model says its provider; Hermes' too
Merged main into the provider-hint branch, and:
- A model whose agent names its provider (Pi, OpenCode, Hermes) says it on
  every row, not only beside a namesake: where a model comes from is part
  of which it is, even with one provider signed in.
- Hermes labels a model `<Provider> · <model>` with id `<provider>:<model>`
  ("Anthropic · claude-fable-5.1"): its label is now the model, and the
  provider rides apart, named as Pi's are (openai-codex → Codex), else as
  Hermes wrote it. `provider_name` is shared from Pi's catalog.
- Tests: ACP `a_provider_glued_to_a_models_label_rides_apart`; the picker's
  provider tests updated for the rule (7 passed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 11:43:29 -07:00
Wing
94ae5b1081
Merge pull request #1416 from incpo/fix/settings-remember-last-section
Settings: reopen on the page shown last
2026-11-13 11:35:43 -07:00
Wing
0aaa69f1c8 Merge remote-tracking branch 'origin/main' into zeron/model-source-hint 2026-11-13 11:09:51 -07:00
José Gurruchaga
1bbbc68ede Merge main with coordinated composer layout and updated ZGX metrics
Keep the centralized composer geometry, transitions and size publication while integrating main's dictation bindings, native placeholder and focus fixes. Pass Dock's shared hero anchor into placement, update both v2 consumers and refresh their base hashes.

Pin the refreshed ZGX fork at 9a6b6754 and have CI install the CLI from the declared repository. Adapt main's motion tests to the existing frame-clock harness, and wait for the alert's visible enter frame before clicking it.

Validation: 32 composer Rust tests, 89 composer Luau tests, 5 v2 tests, 11 dictation tests, composer tray and beta check pass. The resize script-call gate still fails at 121/336 calls with one/four chats; the archived pre-merge interface also fails at 119/358 on the same host. Its threshold is unchanged.
2026-11-13 13:48:35 -03:00
incpo
4a7a0049e5 Settings: reopen on the page shown last
Opening Settings without naming a page (footer gear, Cmd+comma, /settings) always landed on General, so stepping out to try a change meant finding the page again. route.settings() now reopens the page shown last, kept under shell_settings_page. Account is never remembered; a page that's gone falls back to General.
2026-11-13 20:02:59 +04:00
Wing
2a9e2f9871
Merge pull request #1186 from zeronsh/zgx/tool-result-images
zgx: a tool's result pictures show in its row; Claude Code's image note is no message
2026-11-13 07:48:03 -07:00
Wing
23756a4ab5 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	apps/zgx/ui/templates/zeron-v2/.base.json
2026-11-13 07:37:09 -07:00
Wing
e3e5ff258c
Merge pull request #1403 from zeronsh/zgx/codex-slash-commands
zgx: a Codex chat's / lists Codex's commands and skills
2026-11-13 07:36:26 -07:00
Wing
26acab8786
Merge pull request #1401 from zeronsh/zeron/main-catches-up
main catches up with the release line (Zeron 0.3.4)
2026-11-13 07:35:04 -07:00
Wing
067b9e7d18 zeron-doc test: a tool part names its preview paths
#1103 gave MessagePart::Tool `preview_paths`; a transcript_delta test
from the release line built one without it, so zeron-doc's tests no
longer compiled once main and the release line met.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 05:34:11 -07:00
Wing
0e7c037a2b Zeron v2 in step with the default's composer and lane tab (#1403)
The default's screens/chat/composer.luau and lane_tab.luau ask
`Completions.agent_of` for the chat's agent; v2's copies already make the
same change in this PR, so it is recorded as brought over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 04:12:12 -07:00
Wing
b0beca93f9 Merge remote-tracking branch 'origin/zeron/main-catches-up' into HEAD 2026-11-13 04:01:26 -07:00
Wing
1e910d9159 Engine test: a stored tool picture's path is looked for as the journal writes it
`tool_result_images_are_stored_inside_uploads` (#1103) looked for the
stored path in the journal's JSON text as it is; on Windows the path's
`\` is escaped there, so main's Windows tests failed. It looks for the
path as JSON writes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 04:00:54 -07:00
Wing
f29c197e2d Merge remote-tracking branch 'origin/main' into zeron/main-catches-up 2026-11-13 03:59:31 -07:00
Wing
8065b0007e
Merge pull request #1103 from katulevskiy/fix/tool-image-previews
fix: preview images embedded in tool results
2026-11-13 02:35:48 -07:00
Daniel Katulevskiy
d92a7ce7ce
zgx: a Codex chat's / lists Codex's commands and skills
The composer found a chat's agent only by its model in the local catalog.
A Codex chat on its default model (none set) or hosted on another device
matched nothing, so `/` asked no agent and listed Zeron's commands alone.
Each session now carries the agent its config records, and every
composer falls back to it.

Codex reports its skills apart from its commands (Claude Code reports
them as slash commands), so with "Separate / commands" on by default they
showed only under `$`. Codex now lists them in `/` by default; the
per-agent setting still turns that off.
2026-11-13 01:25:47 -08:00
Wing
465aa5adfa Zeron v2 in step with the default's panel (c1539061b)
c1539061b changed the default's screens/panel/init.luau (a tab's wash read
its ref again once the tab's node mounted) without looking at v2's copy,
and the v2 guard has failed since. v2's panel needs nothing from it: it
draws each tab's wash inside the tab, not from the strip's refs, so the
change is recorded as looked at.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 02:11:37 -07:00
Daniel Katulevskiy
3510f868e7 Engine tests on Windows: a Linux sysfs fixture is Unix only; a worktree path git accepts
Now that zeron-engine's tests compile on Windows they run there, and two
failed for Windows reasons:
- device_stats' sysfs fixture names files 0000:01:00.0, which Windows
  refuses: the test is Unix only.
- spaces' worktree test passed git a canonicalized \?\ verbatim path,
  which `git worktree add` refuses: the prefix is dropped.

(cherry picked from commit 8fb608ad68)
2026-11-13 02:09:29 -07:00
Daniel Katulevskiy
952ec8a348 Engine tests compile on Windows: the getrusage measurements are Unix only
Two hand-run measurements read CPU time with libc::getrusage, which Windows
doesn't have, so zeron-engine's lib tests didn't compile there and the
Windows tests job stopped at its build. The measure module
(source_control.rs) and live_like_bytes_and_cpu_before_and_after
(chat_persistence.rs) now compile on Unix only.

(cherry picked from commit 02ca4e0362)
2026-11-13 02:09:29 -07:00
Wing
f6a1213353 Merge remote-tracking branch 'origin/zeron/stable-zgx' into zeron/main-catches-up 2026-11-13 02:09:29 -07:00
Wing
0f5bf22b49 Engine: PowerShell's name reads the same on every platform
`is_powershell` took the shell's name through std::path, which splits at
`\` only on Windows, so its test (`C:\Program Files\PowerShell\7\pwsh.exe`)
failed on the Linux and macOS runners and held 0.3.4's release back. The
name is now the last part at either slash, less its extension. Windows,
where it runs, reads the same as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 01:18:27 -07:00
Wing
2447c974ce Merge remote-tracking branch 'origin/zeron/stable-zgx' into zeron/main-catches-up 2026-11-12 23:59:01 -07:00
Daniel Katulevskiy
749ed74884 ui tests: name the entry type for empty transcript resets
TranscriptFrame::reset became generic over E: Borrow<SessionMessageEntry>,
so reset(&[]) no longer infers a type and zeron-ui's lib tests stopped
compiling (E0283). Spell out SessionMessageEntry at the two call sites.

(cherry picked from commit 6629b96ada)
2026-11-12 23:57:46 -07:00
Wing
b8eb0216ef Merge remote-tracking branch 'origin/main' into zeron/main-catches-up
# Conflicts:
#	edge/src/env.ts
#	edge/wrangler.jsonc
2026-11-12 23:57:45 -07:00
Wing
82502ace6c Zeron 0.3.4: Windows terminal tabs work; a switch stands right with motion reduced
0.3.3 plus:
- Windows terminal tabs (#1219's three from Daniel, and three more): the
  bridge gets a console (cmd.exe) and runs it raw (one echo, no `>>`,
  Ctrl+C reaches the program), follows the tab's size, opens PowerShell
  without its banner; `~` is the user's profile on Windows (zgx pinned
  at 0ca78b2cb, zeronsh/zgx zeron/pin-0.3.3); the engine lets Ctrl+C
  through to a terminal's shell.
- With Reduce motion on, a switch built on stands its knob on the right.

Version 0.3.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:53:06 -07:00
Wing
ec14dbd305 zgx: with motion reduced, a switch built on stands its knob on the right
With Reduce motion on, `motion.spring`/`motion.tween` handed back their
target as it was, so a part built after the setting changed landed at
once. A switch's target is its boolean, with `from`/`to` for the knob's
travel: reduced, the knob stood at `x = true`, the left, whatever the
switch said, while its tweened track showed it on. Leaving Settings and
coming back after turning Reduce motion on showed exactly that, and the
knob never moved until motion was allowed again and the page rebuilt.
Reduced, a boolean target with `from` and `to` now lands on the end it
says; every other target is as before.

The knob carries an id (`switch-knob`) so a test can see where it stands.
New test in ui/tests/reduce_motion.test.luau: it fails without the fix
(knob at 4, not 19) and passes with it. zgx test ui: 1359 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:53:06 -07:00
zeronsh[bot]
2718721ea5 Ctrl+C in a Windows terminal tab interrupts what the shell runs
The app starts the engine with CREATE_NEW_PROCESS_GROUP (crates/launch
`spawn_detached`), which makes it ignore Ctrl+C, and every process
inherits that from its creator: the shell the engine opens on a
pseudoconsole, and what it runs, ignored Ctrl+C too. PowerShell got the
key (char 3) but `ping -t` ran on. The engine puts normal handling back
before it creates a shell; a process started any other way has it
already, and the engine has no console for a Ctrl+C to come from.

The new test opens PowerShell from a process ignoring Ctrl+C, runs
`ping -t localhost`, sends Ctrl+C and waits for ping's summary. Like the
other ConPTY tests in windows_tests, it doesn't run on WING-PC (input
written to the shell never arrives there, with or without this change);
the fix was checked in the app: ping stopped, the tab went on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:53:05 -07:00
zeronsh[bot]
2ffbbb5ec2 Windows terminal tabs: the bridge's console is raw and follows the tab's size
The bridge read the console it attaches to (cmd.exe's, on the tab's
pseudoconsole) in cooked mode, as only Unix had raw mode: each typed line
was echoed by the console and again by PowerShell, its CR LF made
PowerShell show a continued line (`>>`), and Ctrl+C was a signal that
ended cmd.exe and the bridge, leaving the tab dead. Raw now, as
`cfmakeraw` puts a Unix one: no echo, no lines, no Ctrl+C signal, keys as
VT sequences; output VT and UTF-8; all put back as the bridge ends.

Its size wasn't read on Windows (`window_size` was None), so the shell
stayed 80x24 whatever the panel's width, and wrapped over itself. The
bridge now reads its console's visible window each turn and tells the
engine as it changes, as SIGWINCH does on Unix.

Win32_System_Console is now named among apps/zgx's windows-sys features
(`attach_console` used it already, through another crate's features).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:53:05 -07:00
zeronsh[bot]
08617e684c zgx pinned at 0ca78b2cb: a terminal asked to start in ~ starts on Windows
zeronsh/zgx zeron/pin-0.3.3: 0.3.2's pin (ac935c6f8) plus one commit.
`ui.term` expanded `~` from HOME alone, which Windows doesn't set for an
app started from Explorer, so every terminal tab failed: "The directory
name is invalid. (os error 267)". `~` is now USERPROFILE there.
(zeronsh/zgx#2114 carries the same commit to main.)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:53:05 -07:00
Daniel Katulevskiy
2e0147e068 Windows terminals: -NoLogo on the ConPTY launch Windows takes
Windows opens its terminals through terminals/windows.rs's own
CreateProcessW launch, not portable-pty's CommandBuilder, so -NoLogo given
there never reached PowerShell. It's on that command line now, after the
quoted executable.

(cherry picked from commit a3104d46e2)
2026-11-12 23:53:05 -07:00
Daniel Katulevskiy
d44bbc3026 Windows terminals open PowerShell, cmd only without it
A terminal tab on Windows ran %COMSPEC%, cmd.exe: a prompt with no space
after its `>` and nothing coloured as it's typed. It now runs PowerShell 7
(pwsh.exe on PATH), else the Windows PowerShell every Windows has, else
%COMSPEC% as before (cmd.exe when that's unset too). PowerShell starts
with -NoLogo: its prompt alone, no banner on every tab.

(cherry picked from commit 817182a5d6)
2026-11-12 23:53:05 -07:00
Daniel Katulevskiy
ed489bc5ca zgx Windows beta: terminal tabs get a console for their bridge
The Windows beta is a GUI program (windows_subsystem = "windows"), and
Windows attaches no GUI program to the pseudoconsole it's started on. A
terminal tab's bridge (this exe, `terminal-bridge`) had no console: it
opened the engine's shell, read EOF from its stdin and ended at once,
leaving the tab an empty screen with a cursor.

On the Windows beta the bridge's line now runs under cmd.exe (a console
program, which waits for it), and the bridge attaches to cmd's console
when it has none of its own. The open parameters go in base64, so every
word on cmd's line is quoted with no quote inside and cmd reads none of it
as its own syntax. Other builds and platforms run the line as before.

(cherry picked from commit df015114db)
2026-11-12 23:53:05 -07:00
Wing
715a1b4db4 Edge: production's relay setting lives in the config again
CHAT_RELAY_LAYER="1" (every room offers the relay layer) has been set
on the live production Worker since 2026-11-12 19:57 UTC, but this
branch's wrangler.jsonc, which production is deployed from, had no
CHAT_RELAY_LAYER at all. The next deploy from here would have dropped
it, and unset means nobody gets the relay layer. The config now says
what production runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:42:22 -07:00
Wing
e366c41987 zgx tool pictures: only the engine's own copies; the CLI's note exactly; v2 in step
Review follow-ups for #1186:
- A local chat's pictures are read straight from disk, so a tool row
  shows only the engine's stored copies (`tool-<chat>-<sha256>-image.<ext>`,
  #1103). One on this computer must also be a plain file inside the
  engine's data and no bigger than a picture can be: a doc naming
  `/dev/zero`, a picture elsewhere, a huge file or a link out of uploads is
  never opened. Another device's copy is still read there, through its
  engine's jail.
- The call's file names its one picture; several each keep their own name.
- A user entry is hidden only when it is exactly the CLI's image note (one
  line, `[Image: source: <path>]` or `[Image: original WxH, displayed at
  WxH…]`), the rule #1103's engine uses: `[Image: source: shot.png] why is
  button [x]` shows.
- Zeron v2 in step: its lane_tab reads a subagent lane's pictures through
  the parent chat, and its tokens carry the thumbnail size. Its panel copy
  needs nothing from c1539061b (v2 draws each tab's wash in the tab, not
  from the strip's refs), so it is recorded as looked at.

Tests: cargo test --locked --bin zeron-zgx 676 passed 0 failed (the v2
guard included); zgx test ui 1361 passed 0 failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:23:58 -07:00
Wing
204f9ca2ab Tool images: a tool part's preview paths are only the engine's own copies
Clients read a tool part's `previewPaths` as pictures as they are (zgx
reads a local chat's straight from disk, #1186), so a path an adapter put
on a result (`/dev/zero`, a picture elsewhere on the Mac) must never reach
the doc. Results with image bytes carry only the copies stored in uploads;
paths without stored pictures are dropped, with a warning. No adapter sets
them today; this keeps it that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:10:14 -07:00
Wing
3ef287e270 Tool images: engine only, one file per picture in a chat, the CLI's note exactly
Review follow-ups for #1103:
- crates/ui is back to main (the desktop is apps/zgx now), but for the
  `preview_paths: Vec::new()` its initializers need to compile. The engine
  still names stored copies on the tool part; zgx reads them (#1186).
- A stored picture is named `tool-<chat>-<sha256 of its bytes>`: the same
  picture again in a chat (another Read, another subagent) is one file
  rather than a copy per call, and a chat's pictures share a prefix for
  whatever clears a chat's away. Uploads keep them as before.
- Only the CLI's own image note is bookkeeping: one line, `[Image: source:
  <path>]` or `[Image: original WxH, displayed at WxH…]`. A steer that just
  starts with `[Image: ` and ends with `]` reaches the subagent.
- `is_meta` and `tool_use_result` also read as the live stream spells them.
- docs/image-preview.md says what the engine does and who reads it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:06:13 -07:00
Daniel Katulevskiy
c92b22b108
Merge zeron/zgx into zgx/tool-result-images
Conflicts: ds/activity's rows are now built in a virtualized list and open
to a lazily mounted Opened component, so a tool's pictures are passed to
row() and shown by Opened; lane_tab reads sessions.here; ds/transcript's
Activity uses keep pictures alongside the new window and thought props;
chat.rs keeps the image-note check beside the agent-message sender split.
2026-11-12 21:21:34 -08:00
Daniel Katulevskiy
a2115820ae
Tool results: fill the image preview fields in main's new ToolResult events
Main added ToolResult initializers (ReadToolOutput tests in tool_output.rs
and e2e, the mock harness's long-running commands, steer_now) after this
branch last merged it. They lacked preview_paths and image_payloads, so
zeron-engine's lib tests did not compile.
2026-11-12 21:14:19 -08:00
Daniel Katulevskiy
4e1efa5393
Merge remote-tracking branch 'upstream/main' into pr1103-fix 2026-11-12 20:37:23 -08:00
José Gurruchaga
eea1caf3ba Merge remote-tracking branch 'origin/main' into refactor/zgx-composer-layout 2026-11-12 20:28:23 -03:00
Wing
b9db1eaf1b Dropdown: a provider search's end is a number to the type checker
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 15:28:32 -07:00
Wing
b2dec39d96 Dropdown: keep every row's build as it was; a hint change rebuilds its row
The provider hint gave Dropdown's ui.each callback a third (row state)
argument, which makes ui.each keep a row when its item changes instead of
building it again. Every dropdown's rows then kept stale words: the
branch picker's main kept "Current" after moving to Cloud, where it is
"Default" (chat_where_cloud failed). Back to the one-argument callback;
a hinted row's key now holds its hint, so a hint that changes, comes or
goes rebuilds that row alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 15:28:10 -07:00
Wing
80b3d4168e Model picker: provider search from word starts; rows gain a hint in place
From review of the provider hint:
- A search finds a row by its provider from the start of one of its
  words ("code" finds OpenCode, "pen" or "ai" don't reach inside a word),
  or by name and provider read together across the gap ("gpt-5.5 codex").
- A row built without a hint (an older engine's catalog) is built again
  when its model gains a provider, so the hint shows in place.
- ACP effort grouping keeps a model's provider; Pi sends none for an
  empty provider id.
- Tests: the keys pick the exact next row; provider search from word
  starts; a row gains its hint in place (fails without the fix).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 15:18:26 -07:00
Wing
60d85b8502 Model picker: say a model's provider where two share a name
Pi signed in to both Codex and OpenCode lists GPT-5.5 twice, and the
picker gave no way to tell the rows apart.

Engine: Model gains `provider { id, name }` (serde-additive). Pi fills it
from its provider id with a name people say (openai-codex -> Codex,
opencode -> OpenCode, unknown ids in words); OpenCode from its provider
catalog. Single-source harnesses leave it None. zgx's catalog bridge
passes it to the picker.

Picker: a model with a provider carries its name as the row's hint
(Dropdown `hint`): quiet text in the name's size, on its line, the row's
gap after it; the name fades first when the row runs short. It shows
where it disambiguates (the agent lists the same name from another
provider), on every tab including Starred, and on rows a search found by
it ("codex", "gpt-5.5 codex"). Hints follow the catalog in place, and a
hinted row's accessible name reads what is drawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-11 15:11:53 -07:00
Jan Drlý
7437e3e989
Sound: macOS chimes stop triggering a kernel deadlock that hangs the Mac (#1333)
Chimes were played by an afplay child. While a game holds the foreground
macOS keeps other apps' process coalitions in the background, and the
child's CoreAudio assertion makes RunningBoard lift the app's coalition out
and drop it back when the sound ends. On macOS 27.2 a coalition change that
lands while a process of that coalition is in exec can deadlock in the
kernel; runningboardd never returns, the window server blocks behind it and
the watchdog panics the machine.

Play them through the System Sound server instead, which holds the
assertion itself.
2026-11-10 21:45:02 -07:00
Chance
80e7b1f983
voice: list microphones by friendly name on Windows (#1334)
cpal's WASAPI description().name() is the endpoint description
("Microphone", "Line"), shared by every device of that kind. The
friendly name with the hardware ("Microphone (NVIDIA Broadcast)") is the
first extended line; show it, and number any remaining duplicates.
2026-11-10 20:36:15 -07:00
Wing
35ec6632ce
Merge pull request #1335 from zeronsh/zeron/relay-wing-only
Edge: the relay layer for Wing's account only
2026-11-10 20:34:12 -07:00
Wing
be2730dfec Edge: the relay layer for Wing's account only
CHAT_RELAY_LAYER goes from "1" (everyone) to Wing's WorkOS user id, the
account this Mac, dev and work are signed in as. The list mode is already
in the room (relayEnabled checks each room's owner; rooms are owner-only),
and its workerd tests cover a listed and an unlisted owner and taking a
user off. Everyone else's rooms stop offering the layer; their hosts heal
and move chats back to stored rows as they next open them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-10 20:34:00 -07:00
Wing
7f9dd5888c
Merge pull request #1331 from zeronsh/zeron/edge-relay-layer
Edge: chat rooms offer the relay layer
2026-11-10 19:23:44 -07:00
Wing
7e87deb0b6 Edge: production's chat rooms offer the relay layer to everyone
CHAT_RELAY_LAYER=1 in production's vars. Separate from the code so the
code can ship switched off; this commit is the switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-10 12:45:17 -07:00
Wing
847cbe6e98 Edge: chat rooms that can offer the relay layer, switched off
The chat room code from zeron/zgx that the relay layer needs, and nothing
else: chat-room.ts, chat-relay.ts, chat-frames.ts and chat-log.ts as they
are there, chatRoute passing the caller's org, and three env entries
(CHAT_RELAY_LAYER, CHAT_ROOM_WRITE_THROUGH, AUTH_ORG_HEADER). No Durable
Object class, migration or binding changes.

With CHAT_RELAY_LAYER unset no room offers the layer. What still changes
for every room: a push writes only its row (the head comes from the rows,
and meta bookkeeping flushes every 5 minutes), and new rooms have no
UNIQUE index on rows.batch_id (dedupe looks back 4096 rows).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
2026-11-10 12:45:08 -07:00
José Gurruchaga
8802ab4d47 Merge origin/main into refactor/zgx-composer-layout
Resolve the ZGX dependency conflicts with a published framework merge that preserves both composer text metrics and the scene3d geometry support used by main. Composer (30), v2 (5), and plugin-link (2) checks pass.
2026-11-10 13:45:10 -03:00
José Gurruchaga
7a188dfef0 refactor(zgx): consolidate composer docs and remove cleanup leftovers
Document the current composer behavior and layout in one place, remove historical validation artifacts, and simplify metric requests while preserving their reactive dependencies. Composer behavior and layout remain unchanged; the 30 directed composer tests pass.
2026-11-09 11:29:31 -03:00
José Gurruchaga
acb46baa73 test(zgx): validate composer rendering and frame stability
Add repeatable normal and damage-comparison frame recordings, commit the reports and contact sheets, and cover dictation plus theme/resize/zoom layout with retained editor state. Remove the retired deadline clock fixture and document baseline suite failures and remaining native-platform evidence.
2026-11-08 19:51:56 -03:00
José Gurruchaga
231cff9347 refactor(zgx): use editor metrics for composer sizing
Pin the published framework API, replace the two invisible measurement nodes with the textarea provider, and invalidate persisted plain-text samples. Keep the existing coherent metrics contract and cover displayed IME content without remounting the editor.
2026-11-08 19:40:19 -03:00
José Gurruchaga
3421c9c9a3 docs(zgx): record editor metrics API and framework validation 2026-11-08 19:36:52 -03:00
José Gurruchaga
5659dde855 refactor(zgx): replace composer settle timers with explicit state 2026-11-08 19:21:09 -03:00
José Gurruchaga
6bb272fdcb refactor(zgx): separate composer placement from sizing 2026-11-08 19:15:35 -03:00
José Gurruchaga
7b1ca7a435 refactor(zgx): coordinate composer geometry transitions 2026-11-08 19:09:25 -03:00
José Gurruchaga
59f475e3c8 refactor(zgx): compute composer geometry in one place 2026-11-08 18:43:39 -03:00
José Gurruchaga
d22ecffc6f refactor(zgx): centralize composer text metrics 2026-11-08 18:32:10 -03:00
José Gurruchaga
cd7694028f test(zgx): characterize composer focus and layout transitions 2026-11-08 18:18:09 -03:00
Daniel Katulevskiy
bce5f05886
Tool images: a compact thumbnail that opens the lightbox
A Read of a screenshot filled the open chip with a 220 pt tall picture
up to 560 wide. Each picture is now a thumbnail of its own shape within
THUMB_FRAME (240 by 160), never scaled up, rounded and edged as reply
pictures, in a row; the decode bound follows at 2x (480 by 320). A click
opens the full file in the lightbox, read from the chat's host as a sent
picture is (once it has loaded, if it was still coming).
2026-11-03 18:03:07 -08:00
Daniel Katulevskiy
5455ba4d58
zgx: a tool's result pictures are small thumbnails that open the lightbox
At the reading column's width a Read of a screenshot pushed the work
far apart. ds/reply_picture gains Thumbs: each picture its own shape
within the theme's zeron.prose.picture.thumb (240 by 160), never larger
than it is, rounded and edged as reply pictures, no hover controls
(its menu and the lightbox have them); several sit in a row, wrapping.
ds/activity's tool rows use it, so the subagent lane does too.
2026-11-03 17:46:33 -08:00
Daniel Katulevskiy
72ee31fb61
zgx: a subagent lane's tool pictures are read from its parent chat's host
A subagent's doc has no chat row, so its lane's session is missing and
the pictures its tools kept had nowhere to be read from ("couldn't be
shown"). They are files on the parent's host: read them as the parent
chat's are.
2026-11-03 15:04:12 -08:00
Daniel Katulevskiy
d313d810ab
zgx: a tool's result pictures show in its opened row; Claude Code's image note is no message
A Read of a picture whose result carried its pixels now opens to that
picture, as Zeron's chip preview does: the engine keeps a copy in the
profile's uploads (the tool part's previewPaths), and the row reads it
where the transcript reads an agent's shown pictures. One alone or
several on a tray, opening in the lightbox; the name is the file the
call named. A tool that only named a path shows none.

A user entry that is only Claude Code's note on such a picture
("[Image: original WxH, displayed at WxH. ...]", "[Image: source: ...]"),
which subagent transcripts kept as a steer before the engine stopped
folding it, no longer shows as a bubble.
2026-11-03 14:44:28 -08:00
Daniel Katulevskiy
94cfb67d7b
Merge upstream/main into fix/tool-image-previews
Conflicts were the new tool-result fields meeting main's: every
ToolResult and Tool part now carries preview_paths (and image_payloads)
beside exit_code and output_truncated.

Claude normalize: tool_result_events builds each result through main's
tool_result, so a Bash result keeps its output tail and exit code while
image bytes still ride image_payloads. note_commands runs on the typed
fork's replay as on the live feed. subagent_results went: both callers
use tool_result_events.

Engine: prepare_generated_image keeps the tool-image store and passes a
result's exit_code through.
2026-11-03 14:39:12 -08:00
Daniel Katulevskiy
c17262cffc
fix: preview images embedded in tool results
Tool chips named a scratch path outside the attachment jail, so the
preview read failed and the chip showed Image unavailable. Image
bytes already present on the tool result are now stored in the
profile uploads directory and the chip previews that copy.

A subagent image note about the displayed size was folded as a steer
and the pixels were dropped. That note is ignored, and the same
stored preview is used on the subagent transcript.
2026-10-29 06:15:25 -07:00
467 changed files with 16474 additions and 82796 deletions

68
Cargo.lock generated

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 559 B

After

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 282 B

Before

Width:  |  Height:  |  Size: 350 B

Before

Width:  |  Height:  |  Size: 269 B

Before

Width:  |  Height:  |  Size: 241 B

Before

Width:  |  Height:  |  Size: 250 B

Before

Width:  |  Height:  |  Size: 230 B

Before

Width:  |  Height:  |  Size: 267 B

Some files were not shown because too many files have changed in this diff Show more