Commit Graph
1890 Commits
Author SHA1 Message Date
Kelvin Amoaba 1bec35aa3a fix(chat): keep pending workspace composers ready (#37954)
* fix(chat): keep pending workspace composers ready

* test(chat): cover refusal after immediate chat opening
2026-11-04 22:52:01 +00:00
Jinjing 0b73edc6e7 Add Chat UI choice to onboarding (#36204)
* Add Chat UI choice to onboarding and tailor agent tours

* Add setup guide controls for Chat UI and Yolo permissions

* Refresh native chat agents and improve surface radio controls

- Re-read the host inventory alongside workspace refreshes, including WSL
- Recognize downloaded, ready chat runtimes without a CLI on PATH
- Standardize onboarding and checklist surface choices on accessible radio variants

* Show full-access agent overrides in Yolo mode settings

* Polish Chat UI onboarding and clarify terminal fallbacks

- Group agents by launch surface and refresh selection previews
- Add scroll-edge fades to reveal clipped onboarding content

* Recognize ready custom Chat commands and nested scroll changes

* Advance agent tour after selecting a new tab type

* Install onboarding skills for selected chat providers

- Route Chat UI setup to local provider-specific skill roots
- Improve tour focus, Escape handling, and delayed target transitions

* Keep split lesson while a new pane mounts; update renamed skill in test

* Assert agentDefaultSurface in Chat UI onboarding e2e

* Open the chosen Chat UI agent when a new project's default checkout opens

* Make the onboarding chat preview match native chat

- Soften the selected preview tile styling.
- Accept a leading separator in dev:fresh arguments.

* Fix scrolling in the onboarding agent step

* Preserve initial working directory when opening empty workspaces

Also check only remaining tour steps for unfinished actions.

* Fix tour resumption after completed split steps
2026-11-04 21:47:28 +00:00
Brennan Benson 812a23a729 fix(sidebar): keep discovered worktrees hidden when adding a project (#38208)
* fix(sidebar): keep discovered worktrees hidden when adding a project

Adding a project no longer switches it to show worktrees Orca didn't create
(Conductor workspaces and other tools' worktrees). They stay behind the
sidebar's "Hiding N discovered worktrees" line, the same as every other
way a project is added.

* fix(sidebar): open a picked linked worktree instead of revealing its siblings

When the folder added as a project is itself a linked worktree, its main
checkout is hidden. Open the picked worktree instead of switching the whole
project to show worktrees Orca didn't create.

* fix(repos): register clone and create paths with symlinks resolved

Git reports checkout paths with symlinks resolved. Clone and create saved the
typed path, so a project cloned under a symlinked folder (e.g. /tmp on macOS)
did not recognise its own checkout and hid it as a discovered worktree. Resolve
the existing part of the destination before registering, as adding an existing
folder already does.

* fix(repos): keep finding projects saved under a symlinked clone or create path

Projects cloned or created before paths were resolved keep the typed
spelling. Match both spellings so retrying the same clone or create reuses
the saved project instead of failing on its non-empty folder.

* fix(repos): keep Windows clone and create paths as typed

Windows Git reports the typed spelling, and resolving would turn mapped
drives into UNC paths. Runtime clone/create tests now use resolved temp
roots, matching what registration saves.

* fix(repos): register Git's checkout path for clone and create

Replace the parent-symlink resolution with the path Git reports after clone
or git init, as adding an existing folder already does. This also covers a
symlink at the target folder itself and WSL paths, leaves plain folders and
Windows spellings unchanged, and matches saved projects by both the typed and
the resolved spelling.

* fix(sidebar): keep opening projects whose own checkout isn't recognised

Projects saved through a symlinked path by older builds or paired hosts don't
recognise their own checkout. Keep main's behaviour for that case: show the
project so the add still opens it.

* fix(repos): match resolved paths when importing a folder of repos

Clone and create now save Git's resolved checkout path, so a nested import
through a symlinked folder must also match that spelling instead of
registering a duplicate project.

* fix(repos): find saved projects through a symlink before the clone target exists

Resolve a missing clone target through its existing ancestors, reusing the
worktree-create alias resolver, and read the lookup keys inside the clone
lock. Queued clones through a symlinked folder reuse the first clone, and a
different repository at a saved project whose folder is gone is refused
before cloning, as on main.

* fix(repos): match a folder import's resolved path only to local projects

The resolved spelling names this machine's folder, so a remote (SSH) project
at the same path string must not be treated as the import.

* fix(repos): limit a desktop folder import's resolved-path match to this machine

Runtime-owned and SSH projects can share the path string; only projects on
this machine may match the import's resolved folder.

* fix(repos): read a nested import row's connection through the host helper

* fix(repos): match only this machine's projects when creating a local project
2026-11-04 13:21:06 -08:00
8de79e7ba0 Use the shared agent picker for Automations (#37941)
* Use the shared agent picker for Automations

Preserve sparse authored launch settings and full Arguments through the existing Automation owner, copies, and host launch compiler. Keep legacy writers and supported mixed-version launch routes intact.

Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
Co-authored-by: Courtenay <1909814+hdsheena@users.noreply.github.com>
Co-authored-by: Andy Zhang <hiandyzhang@gmail.com>

* Align the new launch-settings translations with the catalog

* Preserve automation launch choices through editor changes

* Use supported legacy arguments in the editor regression

* Keep automation edits controlled until Save

* Compose automation launch edits by their authored sources

Preserve controlled raw input, cumulative source retirements and agent reset intent through destination changes and Save. Merge only the authored extent into the latest automation.

Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
Co-authored-by: Courtenay <1909814+hdsheena@users.noreply.github.com>
Co-authored-by: Andy Zhang <hiandyzhang@gmail.com>

* Preserve pending automation arguments across agent changes

Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
Co-authored-by: Courtenay <1909814+hdsheena@users.noreply.github.com>
Co-authored-by: Andy Zhang <hiandyzhang@gmail.com>

* Preserve automation source order and unchanged picker rows

Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
Co-authored-by: Courtenay <1909814+hdsheena@users.noreply.github.com>
Co-authored-by: Andy Zhang <hiandyzhang@gmail.com>

* Keep picker Arguments stable until acceptance

* Preserve Chat import and capability regression inputs

* Exercise explicit picker acceptance in retained form tests

* fix: preserve legacy-only automation copies across host changes

* Use canonical automation validation and one host capability observation

---------

Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
Co-authored-by: Courtenay <1909814+hdsheena@users.noreply.github.com>
Co-authored-by: Andy Zhang <hiandyzhang@gmail.com>
2026-11-04 10:27:59 -08:00
OrcaWinandOrcaWin 25cd81665e test: remove 675 low-value test declarations (#38129)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-04 04:51:57 -08:00
Neil 2536c1d569 refactor(renderer): organize right sidebar modules by feature ownership (#38101) 2026-11-04 04:07:39 -08:00
Brennan Benson 974bb4a7ca Preserve chat inputs through uncertain delivery and Stop (#32267)
* Give unconfirmed chat messages explicit recovery actions

* Resolve receipt settlement code quality findings

* Complete recovery copy localization and callback types

* Align send lifecycle contracts with explicit recovery actions

* Include the unconfirmed opener in the restart fixture type

* fix(chat): preserve recovery ownership across lifecycle boundaries

* Preserve send ownership across context replacement and recovery

* Separate history ingestion from live send settlement

* Preserve original send truth and reconcile acquired history

* Use summary-shaped history responses in acquisition coverage

* Preserve queued image recovery for released readers

* Prove independent late receipt recovery across reopen

* Preserve queued image sources in bounded catch-up projection

* Keep queued input and explicit chat retries in their original domains

* Preserve reader lifetime across main session interfaces

* Fix static checks after main integration

* Migrate retained recovery Stop contracts to current lifecycle

* test: use typed access for journal population counters

* fix: consolidate history page bounds type imports

* test: exercise legacy snapshot reuse through selected handoff

* Fix attachment draft typing and document test boundary casts

* Repair current journal integration types and contract fixtures

* Keep uncertain send recovery in queue reorder reopen contract

* Repair mobile contract boundaries and exact queue lookup

* Align input finalization contracts with current Stop ordering

* Keep recovery copies independent of queued message barriers

* Reconcile Stop and replay contracts with current lifecycle

* Update recovery tests for current module and draft APIs

* Align Stop recovery contracts with independent queue policy

* Expose independent recoveries to current queue controls

* Cover sending-only queue Resume visibility

* Adapt recovery contracts to shared queue projection

* Use current history and failure-word contracts in recovery tests

* test: retain released reader source contracts through queue settlement

* Keep uncertain sends in ordinary history and preserve saved queue choices

* test: prove mobile draft leaf subscription isolation

* Use typed operation instrumentation in mobile recovery test

* Align lifecycle test boundary typing with static rules

* Repair test module typing and retained runtime copy catalog

* Remove unused chat delivery notice translations

* test(chat): retain legacy handback without uncertainty notice

* fix(chat): omit saved uncertainty card captions

* test: bind released readers to exact queue wire and proof

* Replace archived reader evaluator with exact recorded contracts

* Mark queued edit test hook import as type-only

* Isolate queued card tests from native inline composer imports

* Complete structured mobile resolution in queued edit test

* Align mobile attachment cleanup lifetime test with send outcomes

* fix: restore journal prototype delegation methods

* Keep uncertain sends as ordinary messages in memory

* Release notes admission after uncertain opening completes

* fix: end opening selection operations at uncertain completion

* fix: derive selection admission from live requests and repair integration tests

* test: consolidate send imports and use a supported locale

* Fix CI test types and synchronize retired delivery catalogs

* Type exported test fixture mocks through the public Vitest API

* test: align selection and journal verification contracts

* Reconcile acquired history before journal projection

* Preserve saved invocation facts during history catch-up

* Repair journal recovery consumers and CI contracts

* Keep failed legacy import displays serializable and bounded

* Preserve journal owner boundaries in CI import cleanup

* Fix typed test fixtures for session recovery contracts

* fix: align history and recovery contract types

* test: verify logical rewind across released chats

* Bound retained queue and status reads

* Bound Stop and delivery reads to relevant journal inputs

* Bound subscriber catch-up and stopped-history reads

* test: align journal read fixtures and operation counts

* Bound automatic chat reads to current input evidence

* fix: align journal reader contracts and test fixtures

* test: type historical dispatch rejection fixtures

* fix: restore merged session projection and fixture types

* fix: preserve resumed queues across logical fork rewind

* Preserve queue pause chronology across logical rewinds

Keep original Stop and Resume coordinates while retaining matching warm failure evidence in the journal owner. Keep historical fixture authoring separate from current production writes.

* End historical fixture authoring before current queue actions

* Keep answer operations separate from retained messages

* Fix resting chat attention context

* Fix attention regression fixture provenance

* Validate retained RPC test frame reads

* Fix retained attention and RPC contract fixtures

* Keep send observations on canonical delivery evidence
2026-11-04 02:40:10 -08:00
Neil a82f279f77 refactor: organize workspace card and action owners (#38081) 2026-11-04 00:49:38 -08:00
Neil 1d5466b43c refactor: group sidebar admission and workspace creation owners (#38068)
* refactor: group sidebar admission and workspace creation owners

* refactor: consolidate defining-owner imports at first evaluation
2026-11-03 23:29:05 -08:00
Neil 7bf0377072 refactor: place terminal and workspace contracts with concrete owners (#38061) 2026-11-03 22:49:34 -08:00
OrcaWinandOrcaWin e98c6a439a test: remove 2816 low-value test declarations (#38030)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-03 21:45:29 -08:00
Neil 4451166b9d refactor: organize notebook, diff and check detail owners (#38033) 2026-11-03 21:04:34 -08:00
Neil f33197523d refactor: group Codex transport trust and journal owners (#38023) 2026-11-03 20:45:04 -08:00
Neil d09519f0f1 refactor: group workspace and runtime contracts by defining owner (#38018) 2026-11-03 20:19:21 -08:00
Kelvin AmoabaandPr1p 2e3c8fb530 fix(notifications): clear acknowledged desktop alerts (#37974)
Explicit worktree reads and session acknowledgements share the existing desktop dismissal authority. Desktop and phone copies preserve transport, physical workspace and session/cursor identity; Linux retains dismissible notification handles after banners expire.

Mailbox consumption keeps its existing semantics.

Fixes #37328
STA-13409

Co-authored-by: Pr1p <zwq19980411@gmail.com>
2026-11-04 04:03:39 +00:00
Neil 926f8bad13 refactor: organize terminal and runtime contract owners (#38011) 2026-11-03 19:56:34 -08:00
OrcaWinandOrcaWin d5f2d9269f test: remove 454 low-value test declarations and copied benchmarks (#38014)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-03 19:32:19 -08:00
Neil da96fadec3 refactor: organize source-control contract owners (#37990) 2026-11-03 19:12:25 -08:00
OrcaWinandOrcaWin c3c24a5784 test: reconcile low-value test removals with current main (#37991)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-03 17:04:15 -08:00
Neil 2c03c4b989 refactor: organize agent status and lifecycle owners (#37961) 2026-11-03 16:36:54 -08:00
OrcaWinandOrcaWin f22231dc29 test: remove 28 low-value test declarations (#37972)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-03 16:01:49 -08:00
Brennan Benson c46e84bcc4 test: fix historical compatibility setup reliability (#37905)
Prepare requested immutable historical snapshots before timed extraction and direct reads, using the existing acquisition/process helpers and local-only consumers. Move four suites' historical module setup into per-pin hooks without changing pins, compatibility assertions, workers, extraction/assertion deadlines or publication ownership.

Independent reviews and the binding design settlement passed. The cold comparison and normal uninstrumented final-head CI each passed49files197tests; normal Checkout62s/job276s. All temporary probes removed; brennan-ready READY.

Tracked in STA-13683. Outer-hook failure attribution limitation tracked in STA-13703. No application, saved-data or wire behavior change.
2026-11-03 15:39:06 -08:00
Jinwoo Hong 7b45308ee8 fix(mobile): type desktop replies from shared contracts and keep phone list facts beside the desktop row (#37917)
* refactor(mobile): keep phone list facts beside the desktop's worktree row

The phone wrote its own list facts (lineage depth, host labels, list keys
and so on) onto the worktree.ps row object it got from the desktop, so a
desktop field with one of those names would be read as the phone's own.

List items are now { row, view }: the row is the desktop's, typed from the
shared RuntimeWorktreePsSummary contract, and view holds what the phone
works out. Host labels are a lookup beside the rows instead of fields on
them. A type test fails if the desktop row gains a view field's name or a
type the phone row would not accept, and a contract test feeds rows from
the desktop's own worktree.ps builder through the phone list.

* fix(mobile): type desktop replies from shared contracts and reject unchecked rows (#37923)

* wip: contract guards

* fix(mobile): type desktop replies from the shared contracts and ban unchecked z.custom

Session tabs, the createSupport reply and native-chat frames were typed by
hand on the phone, so a desktop change could leave the phone compiling
against a stale shape. They are now Pick/Partial of shared types; the
createSupport reply and native-chat transcript frames gain shared types the
desktop uses too, which also gives the phone the 'chat-program' reason it
was missing. Type tests fail when a desktop tab gains a phone-only name or
a field type the phone would not accept.

Catalog rows were admitted with z.custom<Worktree>() and no check. They now
need a string worktreeId, and an ast-grep rule rejects a z.custom with no
check anywhere in mobile/src.

* test(mobile): the desktop contract check also catches a null the phone would not accept
2026-11-03 18:33:05 -05:00
Neil 612909ada1 fix(terminal): a local file link opens in the workspace it was clicked in (#37953)
* fix(terminal): a local file link opens in the workspace it was clicked in

Clicking a terminal link to a file inside another local workspace switched to
that workspace: the editor loader moved the absolute-path tab to the workspace
containing the path (#11369), and link routing jumped to a sibling tab already
showing the file (#16544). This computer reads absolute paths directly, so
local tabs now stay where they were opened, editable. SSH and server hosts,
which read only workspace-relative paths, keep moving to the owner.

Refs #32158, #25838

* fix: merge duplicate editor store import
2026-11-03 23:01:27 +00:00
Neil d5f2a17cd2 refactor: group agent launch contracts under concrete owners (#37915) 2026-11-03 14:45:49 -08:00
OrcaWinandOrcaWin b10e0bde3b test: remove 11 low-value declarations and batch historical checkout fetches (#37894)
* test: remove 11 low-value test declarations

* ci: serialize historical compatibility checkouts

* test: batch missing historical blobs before checkout extraction

* test: keep release checkout extraction modules within file limits

* test: keep release checkout extraction modules within file limits

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-03 14:20:08 -08:00
Brennan Benson b029fb61ab Keep GitHub Tasks source changes consistent (#37387)
Keep the GitHub Tasks source picker, rows, totals, searches and issue creation tied to the selected project, host and source. Ignore outdated replies and wait for source preference saves before creating an issue. Preserve support for older paired servers.

Tracked in #8726. Tracked in STA-1815.
2026-11-03 13:26:23 -08:00
Neil f758771364 refactor: group browser lifecycle and extension implementation owners (#37910) 2026-11-03 13:04:11 -08:00
Neil ec3a707868 refactor(browser): group routing and client-host owners (#37872) 2026-11-03 12:28:16 -08:00
Neil 865b9544ae refactor(ipc): group feature handlers and resource owners (#37823) 2026-11-03 10:24:48 -08:00
Kelvin Amoaba fadc93c794 fix(mobile): stream desktop-hosted server browser tabs (#37705)
* fix(mobile): stream desktop-hosted server browser tabs

* test(mobile): record paired desktop browser interactions

* fix(mobile): type browser relay settings and test adapters

* fix(browser): avoid redundant retained paint mutations

* fix(browser): keep retained viewer state free of React
2026-11-03 18:01:42 +00:00
OrcaWinandNeil c0cb95d62e test: remove 131 low-value harness, main, and renderer tests (#37825)
* test: remove 20 low-value harness and client tests

* test: retire fake-agent and layout-oracle self-tests

* test: retire source route for removed usage smoke

* test: include 21 further low-value tests and remove unused fixture helper

---------

Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
2026-11-03 06:29:47 -08:00
OrcaWin 747acba743 test: remove 46 low-value client and benchmark tests (#37818)
* test: remove 16 low-value behavior and UI tests

* test: remove 30 low-value client and benchmark tests

* test: prune timeout ratchet after test removal

* test: correct remaining split benchmark coverage claims
2026-11-03 06:07:13 -08:00
Neil 11baf7a82e refactor(settings): group agent, account and repository owners (#37817) 2026-11-03 05:11:02 -08:00
OrcaWin 6c1a82bbd8 test: remove 30 low-value web and compatibility tests (#37814)
* test: remove 30 low-value web and compatibility tests

* test: retire obsolete browser schema evidence from active gate
2026-11-03 04:47:31 -08:00
Neil 76472f27ce refactor(settings): group runtime and host owners (#37804) 2026-11-03 04:19:35 -08:00
Neil 2169b791b7 refactor(git): group worktree operations and ref owners (#37783)
* refactor(git): group worktree operations and ref owners

* test(git): retarget remaining concrete executor mocks
2026-11-03 02:52:13 -08:00
Kelvin Amoaba debbb5b496 fix(chat): keep streaming replies after their prompts (#37773)
* fix(chat): keep streaming replies after their prompts

* fix(chat): retain queued placement through turn transitions

* fix(chat): preserve queued sends through read errors

* test(chat): keep act callbacks void

* test(chat): align transcript tiers with prompt order
2026-11-03 10:15:37 +00:00
Kelvin Amoaba ee532e571c fix(chat): show device names on answer receipts (#37776)
* fix(chat): show device names on answer receipts

* fix(chat): resolve receipt names across local and remote hosts

* test(chat): type receipt boundary test dependencies

* fix(chat): keep receipt labels within history frame budgets

* test(chat): return complete compatibility attach replies
2026-11-03 10:09:26 +00:00
Neil c6b829ecf1 refactor(main): group WSL host and orcad lifecycle owners (#37728) 2026-11-02 23:58:18 -08:00
Neil 6d5edf8c33 refactor(main): organize WSL discovery filesystem and execution owners (#37722)
* refactor(main): organize WSL discovery filesystem and execution owners

* refactor(main): consolidate defining-owner path imports
2026-11-02 23:36:23 -08:00
NeilandCopilot af6cb2cf8c Make settings theme pickers searchable (#37692)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 22:30:09 -08:00
Brennan Benson 86a2fe9684 Load Linear drawer fields in one issue query (#37663)
* Read Linear drawer details in one issue query

* Keep readable Linear details after optional field errors

* Select only Linear fields needed by each issue reader

* Explain the typed Linear partial response boundary

* Typecheck Linear integration in the mixed-process project

* Update Linear integration fixtures for raw issue reads
2026-11-02 22:25:42 -08:00
Neil f3088d53c9 refactor(main): group terminal support by lifecycle owner (#37660) 2026-11-02 22:13:39 -08:00
Neil 18f674e69f refactor: group workspace catalog and execution-host owners (#37641)
* refactor: group workspace catalog and execution-host owners

* test: annotate catalog fixtures with portable public mock types

* test(workspaces): preserve filesystem worktree mocks at concrete owners
2026-11-02 20:22:21 -08:00
Brennan Benson 8eba2a0bdc Agent message cards find their sender's agent and status in the same store as the sidebar (#36660)
* Agent message cards keep their sender's agent icon when the agent can't be found

A card names its sender by a snapshot written with the message, but drew the
icon only from a live lookup, so a sender the lookup missed (a worker on
another host, a terminal after restart, a closed agent) showed "?". Every
writer (worker start, mail, task, federated start) now saves the sender's
agent kind beside its name, and the card draws it when no live row names
the agent. Live rows stay the source of icon and status whenever they match.

* Preserve known worker agents on federated cards and mail

* Resolve agent message senders through shared host identity

* Retain acquired worker launch identity for later sender snapshots

* Prune repeated worker sender contract checks

* Combine worker command contract projection imports

* Keep sender identity bounded and scoped per worktree

- A worktree removal frame drops only its own scope; a host stays
  publishing once any frame carried the field.
- Identity history rebuilds follow writes to the facts it reads
  (connection-local triggers), not heartbeats, read marks or receipts;
  new mail is read incrementally.
- One principal per paired peer replaces every federated route ever made.
- Unchanged worktrees keep their scope object; a refresh republishes only
  worktrees whose scope changed. Chat records key on the store's state
  generation instead of serialising every record.
- The publication rides client frames only, and phone frames drop it.
- A failed history read keeps the last good publication and is not
  marked indexed; malformed rows are skipped; opening the database for
  display never throws.
- A located chat keeps its tab's agent icon for cards saved without one.

* Save each agent card's sender identity and open the pane it names

Orca now records who sent each agent message and created each task when it accepts them, and the chat card resolves that saved identity against what each host says runs now. The avatar dot, label and click all read that one answer: a located terminal opens through the sidebar's own activation path, a closed chat reopens through its lineage, and a sender no host can prove shows its saved icon and says it is no longer available instead of opening whichever agent now holds the old pane.

Publication now has the host's pairing key from the RPC server, so it no longer fails on every build.

* Resolve agent card senders by the terminal handle every card saves

A card's sender is now the terminal its saved handle names, the worker lineage its Dispatch continued into, or its chat session. That survives a normal restart, works with hooks off, from a plain shell and for replies, and needs no newly saved sender data, so the hook-conversation records, their table and the saved identity key are gone.

The avatar, link and click read one answer. A terminal that now runs a different kind of agent than the card saved, or a sender two places claim, shows the saved icon as a plain name. A terminal that exited or was respawned keeps the host's own lookup on click without a status dot, behind one switch.

Chat senders rebuild only when a chat appears, moves, clears or closes, and each live pane's worker reads go through the existing partial indexes.

* Send sender identity once per revision and judge every host by one rule

The host's sender publication now carries an in-memory epoch and content revision that move only when what clients read changes. A window's graph sync sends the revision it applied and gets "unchanged" instead of the rows; each session-tab stream sends a worktree's scope once per revision. The window keeps the whole-host publication as its baseline and a newer worktree scope over it, by revision, so a delayed reply never undoes a newer scope and repeated deliveries cost nothing.

An older paired host's cards now go through the same resolution as everyone else's: a terminal that runs a known different agent shows the saved icon as a plain name, and what the host's lookup returns is judged by the same row. Pi and OMP, and Claude and its teams wrapper, count as one agent. Failure text names the agent and says what to do.

WSL chats are published, closed chat history no longer counts as open before the tab table exists, and paired principals are read again only after a pairing changes.

* CI: keep the sender delivery contract test out of the web project and fix its types

The cross-process delivery test moves to tests/e2e, where tests that span main and renderer live, so the web typecheck no longer pulls main files in. It now drives the stream encoder main uses. The worker lineage walk takes a reader type without a this binding, the stream delta composes with the proof delta's own frame type, alias buckets accept terminal and chat tab arrays, and the publication test builds fully typed fixtures.

* CI: share the dispatch-address link rule and align the merged view test with saved-kind icons

The base's worker command contract test reads the shared rule that a
dispatch: address is never a link; the card's link check now calls that
shared rule instead of repeating it. The base's sender view test expected a
different agent's live row to replace the saved icon; this branch shows the
saved kind without that row's status, so the test asserts that.

* Use the sender snapshot resolver in main's new receiving-account tests

* Read a saved "unknown" agent kind as no kind for the card's icon and its replaced check

A hooks-off agent whose last status came from a terminal report without an app id saves the kind
"unknown". That kind proved nothing, yet it vetoed the live agent in its own terminal: the card
showed "?" with no dot as a plain name, and a raced click said another agent was running there.
One shared read now treats it as no saved kind for the veto and the icon, on every path.

* Apply a frame's sender scopes when the window receives it, ordered by each scope's own revision

A stream counts a sender scope as sent once a frame carries it, but the window applied it only
inside the tab apply, behind the tab version, resume census, receipt recovery and frames-draw
checks. A frame those checks dropped could hold the only copy, so a paired host's cards stayed
on stale rows (no dot while the sidebar showed the agent) until that worktree's senders changed
again. Each receipt path now folds the frame's sender scopes in right after its connection,
pairing and runtime checks; the tab apply keeps only a worktree's removal.

A scope now also yields to that scope's own newer delivery, not only to a newer whole-host
baseline, so a delayed list reply can't put back older rows. Every publishing host stamps a
revision, so the content-comparison path for unrevisioned publications is gone.

* Read chat senders from open chats and their /clear predecessors, not every saved chat

Each chat tab opened or closed, chat created or moved, or /clear committed rebuilt the chat
senders by listing every saved chat (42 ms at 10,000 on the main thread) only to keep the open
ones. The record store now keeps an in-memory reverse of the saved /clear pointer, built at
load and updated for the rows each commit writes; nothing new is saved. The sender read starts
from the open chats and follows that index to their predecessors, so its work no longer grows
with closed history.

* Walk live terminals once per session-tab inventory or broadcast, not once per worktree

A one-shot inventory or a broadcast built every worktree's frame through its own sender
refresh, and each refresh walks every live terminal: 20,000 visits for 1,000 terminals over 20
worktrees. Both passes now build their frames from one refresh. The publisher counts its leaf
and terminal visits, and a test drives the real inventory and broadcast methods at 100 and
1,000 terminals.

* Re-read a tab bucket's sender aliases only when a host it read changes

The window's sender aliases were recomputed for every open tab whenever any workspace-owner input
changed, such as switching workspaces or writing a setting, though a bucket reads those inputs
only through one host per worktree. Each bucket now keeps the host values it read and, when
owner inputs move, checks just those before reusing its aliases. The delivery contract test
counts alias work through workspace switches, settings writes and a title-only change.

* CI: restore the single-frame builder declaration and compare sender content without its revision

R4 swapped the inventory's abstract single-frame declaration for the batch one, but the
headless browser-tab emit and the runtime-owned terminal create still build one worktree's
frame through it; both keep the per-frame sender scope. The publisher's content comparison now
takes publications without their revision stamp, which R4 made required.

* CI: give the sender no-op test's heartbeat a fixed timestamp instead of the wall clock

The heartbeat only has to be a write that changes no sender identity, so a fixed time keeps the
assertion and satisfies the flaky-test gate.

* CI: assert one terminal walk per orchestration RPC and no identity reads in the sender refresh test

R4 added leaf and terminal visit counts to the publisher's work counters, and each orchestration
RPC's refresh walks the live terminals once, so the whole-counter comparison failed. The test now
compares history, chat and lineage reads, unchanged, and asserts exactly one walk per RPC.

* CI: reach the sender pass methods through a typed view of their prototypes

The test read the runtime's protected inventory and broadcast methods with Reflect.get and an
object-typed owner. It now names the three methods it drives in narrow types over their real
prototypes and calls them on the same stand-in; the assertions are unchanged.

* CI: list every sender target kind in the link switch and merge the duplicate sender-type import

The link check's switch now names the ambiguous and replaced kinds, which return false as the
default did; the publisher imports its sender types from one statement.

* Skip a paired host's floating-terminal sender scope at receipt, as the tab apply does

Applying sender data on receipt took a paired host's floating-terminal scope that the window
never mirrors, so its sender drew as a link whose click activated a pane this window lacks and
did nothing. The receipt now uses the tab apply's own floating rule for paired hosts: that sender
opens by asking its host, as before. This machine's own floating terminal still publishes.

* Read /clear predecessors through the record store's existing successor index

The sender's chat read reached each open chat's /clear predecessors through an in-memory reverse
index the record store built at load and kept per commit. The store already has an indexed query
for that link, which its lineage read uses; the sender now shares that query and checks each
candidate on its conversation, so branching, unreadable and cyclic predecessors resolve as
before, and the second index and its commit bookkeeping are gone.

* Keep live workers' sender history between builds and re-read only what a write reaches

Any write to a Dispatch, worker terminal or remote attachment re-read the history of every live
terminal (three queries and the lineage reads per pane) on the main process: about 20 ms at 100
live workers and 150 ms at 1,000, for a write none of them read. The connection's triggers now
also record the panes and Dispatch ids a write's old and new rows name. The history keeps each
live pane's reads and each Dispatch's verdict with every key it read, lookups that found nothing
included, so a write re-reads only the panes and lineages it reaches. Federated Dispatches move
their own counter, so worker writes no longer re-read paired principals. A commit from another
connection, which no trigger sees, still rebuilds everything.

* CI: build each sender trigger from a typed event list so its SQL parts are plain strings

* CI: give startup runtime fakes the sender peer-key setter and drop new test type assertions for typed fixtures

* Ask the host to reveal a located sender this window holds no tab for, as the lookup did before

* Keep no worker history read inside an open transaction, and forget workers and keys no live pane reaches

* Test that sender names render only when what they show changes

* CI: pass the sender target's dispatch id explicitly and write a real sidebar body in the delivery test

* Read terminals' existing handles for sender rows instead of issuing them

The sender publication walked every live terminal through the runtime's handle-issuing functions,
so each display build could mint, adopt or rebind terminal handles. During a renderer reload or a
split close that changed which handle a terminal held and what retirement frames published. Sender
rows now read only the handles terminals already hold; a terminal with no issued handle has no row,
and no card can name it.

* Open a located sender's own pane through its host when this window has no tab for it

When a card's sender was found in a pane this window had not loaded yet, the click asked the host
about the card's saved terminal instead. For a worker reopened by a follow-up, that opened its first
terminal, or said the pane was gone, while the card showed the reopened worker running. The click
now opens that same pane: by the handle its status row holds on that host, else by asking the host
for that pane in the host's own coordinates. It checks the card again after the host answers, and a
closed pane says the agent is no longer running. The saved-address lookup stays only for senders no
host has located.

* Read a terminal's start-time handle for its sender row while no window graph exists

When the window graph went away, the host cleared its handle records but kept each terminal's
start-time handle, which its agent's mail cards save as the sender. The read-only handle lookup
required a record, so the running terminal lost its sender row and its cards showed no dot until a
window came back. It now returns the handle issuing would reuse, record or not, and still changes
nothing.

* CI: type the open helper's target as any runtime target so the paired-host case typechecks

* Lease the sidebar rows a sender name's link check reads, as its avatar does

A sender name drawn without an avatar (queued mail, a card's later senders) checked for a different
agent through a source nothing leased, so every store write rebuilt that worktree's sidebar rows.
The name's link now holds the same lease the avatar does, and a card with no saved agent kind
skips the row read entirely.

* Index a build's terminal handle records once instead of scanning them per terminal

The read-only handle lookup fell back to a scan of every handle record for each leafless terminal
holding no handle, on every sender build. A build now gets one reader that indexes the records on
its first miss and answers each terminal from that index, with the same handles issuing reuses.

* Lease a replaced card's sidebar rows from where its sender runs before the kind check

A card whose terminal now runs a different agent resolved no location, so it leased no row
source and rebuilt its worktree's rows on every store write. Both the avatar and the link now
lease from the candidate location the kind check reads; their answers are unchanged.

* Show a paired host's worker status dot on its card when this window mirrors the whole tab

A paired host names a pane <tab>:<leaf>; this window mirrors that tab whole as web-terminal-<tab>
with the leaf ids kept, and its status rows use that key. The alias projection mapped only
per-pane mirrors, so the card located the host's key and found no row to draw a dot from. The
terminal bucket now also maps a whole-tab mirror's host tab, and a host pane takes this window's
name from either form; two names for one pane still locate neither.

* Publish a chat sender change even when the terminal read in the same refresh fails

The chat rows and their key were stored before the terminal read; when that read threw, nothing
was published, and the next build saw both keys as handled, so the chat change waited for an
unrelated identity change. The refresh now publishes whatever changed beside the last good
terminal rows, and the read's error still reaches the build's warning.

* Bound sender projection work to current consumers and lineage facts

* Update runtime call assertions for sender demand options

* Preserve mobile sender navigation availability
2026-11-02 20:09:00 -08:00
Brennan Benson ba5613d5e5 Honor selected chat permissions before accepting input (#37543)
* Honor saved chat permissions at input admission

* Cover fallback and autonomous turns in permission transitions

* Preserve host dispatch refusals and verify saved permission publication
2026-11-02 19:09:32 -08:00
Brennan Benson 40820c4c5c Open pasted text in structured chats (#35636)
* Open large pasted text and attached text in structured chats

* Read pending pasted text before its host route resolves

* Pass structured attachment eligibility from the owning chat

* Preserve composer and Markdown state when inspecting text attachments

* fix: preserve attachment identity and cancel deferred reads

* test: consolidate phone attachment rendering contracts

* Scope attachment previews to visible chats and share route indexes

* test: consolidate duplicate attachment preview coverage

* perf: share remaining workspace catalog derivations

* feat(chat): open text attachments from structured goal objectives

* fix(chat): reuse preview owner and bind app hooks

* refactor(chat): trim duplicate tests and unused capability initialization

* test(chat): share routing scope mount fixture

* Fix routing performance attribution and folder row imports

* Share attachment capability through its domain module

* Align attachment fixtures and warm routing contracts with current gates

* Preserve relay connection timeout default for ordinary requests

* Share image classification ownership and repair integration fixtures

* Repair real attachment integration fixture boundaries

* Expose e2e compiler diagnostics and prune stale read allowance

* Type the recall fixture row ref as a div

* Keep text attachment capability in its existing capability owner

* Keep image MIME bindings in the media type owner

* Own private bridge response completion at the request boundary

* Complete bridge fixture return and retention types

* Localize native chat text attachment preview controls

* Complete attachment preview localization at presentation boundaries

* Preserve legacy preview locale identity and complete localization controls

* Fix typed mobile host witness lookup

* Commit attachment page edits and reset mobile page scroll

* test(chat): remove duplicate preview localization coverage

* fix(mobile): apply page input font and footer safe area

* fix(chat): commit edited page before admitted navigation

* fix(chat): retain field readiness on pending commit

* fix: preserve attachment field focus until control activation

* fix: restore attachment preview styles and canonical close

* Bind mobile input font role to the central theme

* Type font source fixture cases as tuples

* Attribute inherited owner filter work and qualify folder fixtures

* Keep owner filter fixture input types source-derived

* test: retain attachment capability assertion import

* test: focus attachment coverage on important regressions

* Replace text attachment paging with bounded scrolling and trim tests

* Preserve literal phone attachment whitespace and trim unused test meter

* Keep scroll view refs and measurements out of render

* Keep preview collection independent of native clipboard initialization

* Give the phone scroll fixture coherent measured DOM geometry

* Commit attachment scroll extent before restoring its anchor

* Preserve text viewport geometry across bounded reads

* Unify bounded text scrolling around the viewport

* Preserve the live text anchor across viewport resizing

* Measure committed text viewport bounds from the host

* Preserve live attachment position across native client extent changes

* Use the actual first source block in the resize regression fixture

* Reuse subscription handle type

* Keep attachment effects keyed to their existing triggers

* Keep attachment rows within the committed track

* Allow the full attachment renderer contract to settle

* Open text attachment previews in a large modal

* Preserve attachment modal header layout with primitive-owned styles
2026-11-02 18:36:29 -08:00
Kelvin Amoaba eb55a5a6d3 feat(browser): --expect-url refuses a browser command when the page is at another URL (#37575)
* feat(browser): guard page commands with an expected URL

* fix(browser): refuse an empty --expect-url and check it on dialogs and the forwarding desktop

* fix(browser): recheck the expected URL right before keys go out

* refactor(browser): drop duplicate session type, dialog alias and per-capability sidecar fields

* chore(browser): satisfy the changed-code gates for the expected URL guard
2026-11-03 02:11:23 +00:00
Neil 7983d5064c refactor: group agent launch and workspace hook owners (#37612)
* refactor: group agent launch and workspace hook owners

* refactor: align trust CI scope and reliability paths
2026-11-02 17:51:53 -08:00