Skip to content

[upstream #15560] fix(serve): keep headless runtime alive on desktop Cmd+Q - #185

Open
innocarpe wants to merge 8646 commits into
mainfrom
fix/serve-cmdq-keep-headless
Open

innocarpe wants to merge 8646 commits into
mainfrom
fix/serve-cmdq-keep-headless

Conversation

@innocarpe

Copy link
Copy Markdown
Owner

Portfolio mirror of my contribution to upstream stablyai/orca.
Exhibition only — the real review/merge target is upstream.

Upstream

Summary

Description On macOS, ⌘Q on a desktop window hosted by orca serve no longer tears down the headless runtime or drops paired remotes. shouldQuitWhenAllWindowsClosed already keeps serve mode alive for window close. before-quit now uses the same contract: desktop Quit beco

Note

  • Do not merge this into innocarpe/orca main until the upstream PR is merged.
  • After upstream merges: sync fork from upstream, then close this mirror PR.
  • This open PR exists so visitors see in-flight work on this fork's Pull requests tab.

@innocarpe innocarpe added the bug Something isn't working label Aug 20, 2026
@innocarpe
innocarpe force-pushed the fix/serve-cmdq-keep-headless branch from 5842711 to af4f2ba Compare August 23, 2026 02:20
@innocarpe

Copy link
Copy Markdown
Owner Author

Sync update (af4f2ba313)

Rebased onto current main (063b804). Scope unchanged: desktop Cmd+Q in serve mode does not terminate the headless runtime. SIGINT/SIGTERM remains out of scope. Evidence: window-all-closed-quit-policy tests 8 passed.

innocarpe pushed a commit that referenced this pull request Aug 29, 2026
…lyai#16730)

* feat(diagnostics): name the code driving a React commit cascade

React #185 reports blame whichever component dispatched after the
root-global counter tripped. react-update-depth-attribution already tells
the report that boundary_id names a bystander; nothing recorded what the
real driver was.

Count commits through react-dom's devtools commit hook — the only
per-commit seam that survives minification. Profiler's onRender is
compiled out of the production bundle, and a dependency-less root layout
effect fires per render of its own component, not per commit (measured: a
root effect saw 1 of 11 commits a leaf drove).

Mirror React's own reset rule rather than a time window: a commit that
leaves no sync lanes pending ends the cascade, and a different root
restarts it. The steady-state cost is a mask, a compare and an increment,
with no clock read and no allocation. Stack sampling arms only once a
cascade is already deep, so ordinary work never pays for it.

* fix(diagnostics): remove the install-order trap and guard the write path

Adversarial and perf review of the cascade diagnostic:

The install-order ratchet guarded the wrong thing. The observer self-installs
at the bottom of its own module, so it only ran after its transitive graph
evaluated — one new import reaching react-dom would have killed the
diagnostic in production with every test green. The entries now import the
import-free shim instead, which only has to make the global exist; wrapping
the callback is timing-independent because react-dom re-reads it per commit.

The store write probe called the sampler unguarded, so a throw there dropped
the write on the app's universal write path. Guarded; the try/catch measured
free at +0.005ns.

Report the frames that name the driver instead of capturing eight and
reporting one, arm the self-check on the paths where install fails, bind the
sample cap to the write count rather than a V8-only API, and stop defining
the devtools global for every test file to serve one.

The cascadeRoot comment claimed a strong reference cannot retain; a WeakRef
probe disproved it. It is still not a leak — the next non-cascading commit
clears the slot — so the comment now says that instead.

* test(diagnostics): close the ratchet holes guarding the cascade hook

Adversarial review loop 2:

The install-order ratchet only saw imports whose `from` shared a line with
the keyword, so a multi-line `import { createRoot } from 'react-dom/client'`
in the shim passed it — and that is the one edit that kills the diagnostic in
production. 43% of files in this directory use the multi-line form. Scan the
shim source directly as well as walking the graph.

The 4000-char budget for the driver frames is bought by the key ending in
`stack`, but the only test asserting that emitted its own literal key, so
renaming the real one truncated the frames with the suite green. Assert the
name the renderer actually emits.

Also correct the comment on the `installed` placement: the self-check never
reads that flag, it arms because it sits outside the try.

* test(diagnostics): stop the shim ratchet firing on prose

Adversarial review loop 3 caught two flaws in the guards added last commit.

The source-scan regex used an unbounded `[\s\S]*?` after an anchor that also
matched the shim's own `export type`, so it degenerated to "does the word
`from` appear later in the file" — rewriting a doc comment to say "reads the
hook from the global" failed the ratchet. A guard that fails on prose is a
guard someone deletes, and this one is what stands between a reshuffled
import and a silently dead diagnostic. Require a quote after `from`, tolerate
comment obfuscation, and catch `await import(...)`, which makes the shim
async so react-dom evaluates before the hook is installed.

The 4000-char budget assertion matched `/stack$/i` against the raw key, but
the real rule camel-splits first — so `driverstack` would pass while shipping
truncated frames. Assert through sanitizeCrashReportDetails, resolving the
key from the payload rather than hard-coding it.
nwparker pushed a commit that referenced this pull request Oct 2, 2026
#185 during worktree removal (stablyai#23636)

* fix(terminal): stop parking pass queueing no-op renders during pane-close bursts

Removing an active worktree with many terminal panes closed each pane in its
own commit. Every commit re-ran the parking pass, whose functional setters
queued a render even when the sets were unchanged, so each commit left work
pending and React's nested-update counter climbed past 50 (#185), taking down
the terminal workbench boundary. Dispatch only when a set actually changes.

* fix: initialize parking state mirror lazily and verify transitions

---------

Co-authored-by: m4air <[email protected]>
Co-authored-by: m4air <[email protected]>
nwparker pushed a commit that referenced this pull request Oct 5, 2026
…stablyai#25313)

* fix(sidebar): stop Manual sort from mirroring sortEpoch into state

In Manual mode the sort hook copied every sortEpoch bump into state from an
effect, adding a nested React update per bump. A burst of store bumps at
startup stacked those into 'Maximum update depth exceeded' (React #185).
Manual now reads the live epoch directly; debounced modes are unchanged.

* feat(sidebar): tell people when a drop switches sort to Manual

Reordering by drag still switches the sidebar to Manual so the drop sticks,
but it used to happen silently. Show a toast with a 'Back to <previous sort>'
action; it retires itself on any later sort change so it can't override a
newer choice. Drops while already in Manual stay silent.

* feat(store): settle sortEpoch in the store instead of in React state

Add settledSortEpoch plus a 3 s settle timer owned by a store listener
installed in the state creator. Every write path (slice actions, the web
session sync patch) goes through it, so the settled value stays correct
with no sidebar mounted. Manual, a sort-mode switch, and a bump that
changes the non-archived row count settle in the same notify; other bumps
restart the window. A reset that lands settled clears the timer, and the
disposer runs on HMR teardown.

* fix(sidebar): read the settled sort epoch instead of mirroring it into state

The sort hook no longer copies sortEpoch into React state from an effect in
any mode; it reads the store's settledSortEpoch directly. That pattern added
a nested update per bump and stacked into "Maximum update depth exceeded"
(React #185) under flushSync bursts. Tests cover Manual, add/remove, burst
reset, no-bump row changes, mode switch, and 80 flushSync bumps in Recent
while worktrees are added.

* cleaning up

* fix(store): settle bumps when rows update during pending window

Detect structural changes on worktreesByRepo updates in addition to sort
epoch changes. When a row arrives without its own bump during a pending
settlement window, the changed composition must still trigger settlement.
innocarpe pushed a commit that referenced this pull request Oct 13, 2026
…ai#26873)

The "+N" overflow chip in the status bar changed width whenever its count changed, so the density probe that decides how many usage chips fit kept re-measuring. Reserve the width of the provider-count label with an invisible sizer span, so the chip keeps the same size across counts.

- Pass the total provider count into UsageOverflowChip and render it in an invisible, grid-stacked sizer span.
- Overlay the visible "+N" label on the same grid cell so the chip width tracks the total, not the hidden subset.
- Add an e2e test that loads ten usage providers, shrinks the viewport to collapse them, and checks the chip width stays stable and no "Maximum update depth" or React #185 errors occur.
nwparker and others added 21 commits October 20, 2026 15:32
…tablyai#30937)

* feat(native-chat): Codex chats list and run the skills Codex loaded

A Codex chat's skill list now comes from Codex itself (`skills/list`), live
while the chat runs and refreshed when Codex says its skills changed, and
from a short-lived Codex check while the chat is at rest. Plugin skills keep
Codex's `plugin:skill` names, disabled skills drop out, and each skill file
is its own row. A skill picked from the list reaches Codex as that exact
skill, beside the unchanged `$name` text, on hosts that take it.

* test(native-chat): account for Codex's skill list call; send without a trailing argument

* fix: align skill probes with chat launches and preserve picked mentions

* fix: distinguish skill choices in phone accessibility labels

* fix: clear picked skill files when queued text changes

* fix(native-chat): refresh resting commands when launch settings change

* fix: keep WSL agent refresh on its execution host

* fix: preserve skill selection at read and send boundaries

* fix: narrow agent identity for selected skill notice

* fix: use checked agent predicate for skill notice label

* test: retain locale in composer translation mocks
…afterwards (phase 1a) (stablyai#31251)

* refactor(editor): make the editor buffer record the source of truth for tab buffer state

Writers of the six buffer fields read and write the record, with the OpenFile
fields written as a mirror in the same store update. The store middleware no
longer copies tab values into the record; it only keeps records keyed by open
tabs (seeded from the tab on create, dropped on close) and, in dev and test
builds, asserts every mirror field equals its record. Host-mirrored web tabs
adopt the host's published values explicitly in the session sync patch.

Co-Authored-By: Claude <[email protected]>

* refactor(editor): check the buffer invariant in e2e builds and tidy the record helpers

Co-Authored-By: Claude <[email protected]>

* test(e2e): give session-sync fixtures the now-required editorBuffers

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
…ost that returned the item (stablyai#31252)

* fix(github): a twin project's PR cards, rows and dialogs act on the host that returned the item

* fix(github): key twin rows by host so cache sync keeps each copy; a lone row ignores the stamp
…scan budget (stablyai#31139) (stablyai#31226)

All hosts gave every Orca server a 3 s scan, including the managed servers
Orca reaches through an SSH tunnel, which now serve every SSH host. A healthy
SSH host walking a large home timed out and showed up empty. The saved
environment's connectionDependency now picks the 15 s budget for tunnelled
servers; direct LAN/Tailscale servers keep 3 s.

Reported, with the proposed approach, by @quzard in stablyai#31139.
… test-only editor-state guard (stablyai#31250)

* refactor(editor): drop isWholeEditorState and the diff-signature re-export; bound superseded restore re-reads

- Remove isWholeEditorState; its callers take the real AppState. Tests that
  mocked partial stores now build full states from createTestStore.
- Import getDiskBaselineSignature from shared/disk-baseline-signature
  directly and delete the re-export from diff-content-signature.ts.
- Restored-tab conflict scan: count superseded re-reads toward
  MAX_VERIFY_ATTEMPTS, so a read slower than the re-verify interval gives up
  with the conflict banner instead of looping forever. Adds a regression test.

Co-Authored-By: Claude <[email protected]>

* fix(editor): keep the last read at the superseded re-read cap instead of giving up

A matching read at the cap cleared nothing and showed a false changed-on-disk
banner; it now resolves like any read. Only read failures give up.

Co-Authored-By: Claude <[email protected]>

* fix(editor): back off on superseded restore re-reads instead of capping them

A superseded read may predate the newer check, so it never resolves the
verification, even at the attempt cap. Overlapping checks now delay the next
fresh read (bounded, one timer per tab) and keep verification pending; only
failed reads count toward giving up.

Co-Authored-By: Claude <[email protected]>

* test(editor): address the restored tab by its owned id in the overlapping-check tests

After stablyai#31196 a server's tab is no longer keyed by its path, so these tests
flagged a tab that does not exist and no read was ever issued.

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
…ading all of them every 30s (stablyai#31253)

* perf(worktrees): gate the 30s git-common reconciliation sweep on each entry's dir signature

The native-watch reconciliation forced an ungated stat of every leaf of every
worktree admin entry each tick (~7 stats/entry). It now uses the entry-dir
signature gate plus the two leaves git writes in place (gitdir, logs/HEAD),
runs the ungated sweep every 10 ticks (~5 min), and falls back to sweeping
every tick if a sweep ever finds a change the dir signature missed.

Co-Authored-By: Claude <[email protected]>

* fix(worktrees): only distrust the reconciliation dir gate on a confirmed, repeated miss

Detect a missed change on any entry rescan, including ones the in-place leaf
probes trigger, not just full sweeps. Re-stat the admin dir after the leaf
rescan so a rename racing the scan isn't counted, ignore transient missing
leaves, and require misses on two separate ticks before sweeping every tick.

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
…eal path in Workspace scope (stablyai#31244)

* fix(ai-vault): keep sessions recorded under a symlinked workspace's real path in Workspace scope (stablyai#31139)

A workspace registered through a symlink (~/work/api -> /data/src/api, or
macOS /var -> /private/var) lost every session whose agent recorded the
resolved cwd: scope matching compared strings, and those rows also counted
against the out-of-scope depth cap.

The host that owns the files (the desktop for local scans, orcad for SSH and
server hosts) now resolves each scope path's real path, scans both spellings,
and gives matching sessions optional matching-only cwdAliases in the
registered spelling. Workspace scope, the depth cap and project attribution
read cwd plus aliases; resume still uses the recorded cwd. Older hosts send
no aliases and older clients strip the field.

Reported, with the proposed approach, by @quzard in stablyai#31139.

* fix(ai-vault): rank aliased attribution by closest root; never resolve recorded cwds

Review feedback: a longer-spelled parent link could take a nested project's
session, and resolving every out-of-scope cwd could stall a listing on a hung
network mount or raise macOS privacy prompts.
…n several hosts (stablyai#31261)

* feat(ai-vault): name the host each search hit came from when hits span several hosts (stablyai#31139)

An All hosts full-text search returned one flat list, and the same title or
path often came up on two machines, so you could resume the wrong copy. When
hits come from two or more hosts, each row now carries the same host chip the
sidebar uses, labelled the way the host menu names that host. Hit order is
unchanged; a single-host result shows no chip.

Reported, with the proposed approach, by @quzard in stablyai#31139.

* fix(ai-vault): let the search-hit host chip shrink in a narrow sidebar
…and the CLI gets --surface chat|terminal (stablyai#31191)

* feat(agent.launch): a launch can name chat or terminal, and the CLI gets --surface chat|terminal

agent.launch gains an optional `surface` field, read by hosts advertising
agent.launch.surface.v1. `terminal` always runs the agent's CLI; `chat` runs a
chat even when the user's default is a terminal, and one the host can prove it
cannot open is refused with a typed no-effects error before anything is
created, so a retry answers with the same refusal. The pick is part of the
replay fingerprint. `orca agent launch` and `orca worktree create --agent`
accept --surface chat|terminal and refuse it on a host that would drop it,
including the legacy worktree.create fallback.

* test(agent.launch): pin the surface pick beside the other pre-start failures

* fix(agent.launch): settle requested surfaces from resolved workspace facts

* fix(agent.launch): describe fallback boundaries and correct test types
…t that returned them (stablyai#31271)

GitLab task items now carry the host of the repo row that fetched them, and the
project-view dialog stamps the row its slug matched. Both resolve through one
provider-neutral helper (getWorkItemRepo, generalized from stablyai#31252's GitHub-only
getGitHubWorkItemRepo), so a repo id published by two hosts never routes an
action to the other host's row.
… paired desktop shows (switch-on builds only) (stablyai#31264)

* feat(layout-owner): a CLI or phone file on a layout-owner server opens in the group a paired desktop shows

Each paired desktop reports, through a new layout.reportView (served only by layout.intents.v1
servers, never to phones), the group it shows in each workspace the server's frames draw. The
server keeps reports per connection beside the window's, opens files in the latest one's group,
and drops a connection's reports when it closes, falling back to the saved view.

* test(e2e): a CLI file open on a switch-on server lands in the group a paired desktop shows

* fix(layout-owner): layout.reportView refuses a caller with no connection, as sidebarInputs.reportView does

* feat(layout-owner): a desktop's re-sent view after a reconnect never outranks another desktop's live report

layout.reportView takes an optional refresh flag. The desktop's first report of each workspace
after a stream snapshot carries it; the server ranks such entries below every live report, while
they still replace the connection's own earlier entries and beat the saved view.

* feat(layout-owner): a paired desktop re-sends its view, as a refresh, when its control connection to the server comes up on a new socket

The server drops a connection's view reports when it closes, and the layout stream can stay up
across that, so the desktop watches the shared control diagnostics for a new socket.

* fix(layout-owner): a desktop's refresh keeps its own live rank; stop reporting to a server without layout.reportView

A same-connection resubscribe re-sends its view as a refresh, which demoted the connection's
own live report below an older desktop's. Ranks are now an explicit live/refresh tier. A pre-PR
switch-on server answers method_not_found; the desktop then stops sending for that stream.

* fix(layout-owner): a group the server's own frames move is re-sent as a refresh, never a live report

The snapshot resend read the store before the sync applied the snapshot, so the flush's group
change reached the store subscription as the user's. Writes made by the frame sync now report as
refreshes, and the snapshot resend runs after the flush.

* test(layout-owner): a change frame's group move goes out as a refresh; the frame-write mark survives nested writes
…cket, not TCP loopback (stablyai#31256)

* test(daemon): run the stalled-reader backpressure test over a Unix socket, not TCP loopback

Linux autotunes TCP loopback buffers to several MiB, so the kernel absorbed
most of the 8 MiB flood, write callbacks completed, and the producer never
reached the 4 MiB high-water mark on some CI runners. The daemon stream runs
over a Unix socket or named pipe, whose small fixed kernel buffers keep the
backlog in the daemon's own accounting.

* test(daemon): bound Unix socket fixture paths
…30419)

* fix(native-chat): a chat's visuals folder lives as long as the chat

A chat's scratch folder was deleted once the chat had gone 30 days
unused, so an old chat's inline visuals turned into "Visualization
unavailable" while the chat and its history stayed. The common pattern
keeps a chat's files for as long as the chat and never deletes them on
an "unused for N days" timer.

The sweep now removes only folders no chat record maps to, plus
leftover .expired folders older builds parked. Everything that existed
only to make the age rule safe goes with it: the per-folder save lock
and its expiry candidates, the session-lane idle check, the journal
last-activity query, and the migration's fresh-window timestamp. The
visuals skill no longer tells agents the folder is temporary.

* fix(native-chat): an image sent in a local chat lives as long as the chat

A local chat's pasted images lived in one paste folder that deleted
every file older than 30 days, sent or not, so an old chat's images
turned into label chips. Paired-server chats already keep pastes in the
host's attachment store, where the send that names a file claims it for
its chat and only unclaimed files are ever swept: the common pattern.

A local composer paste now goes into this machine's own attachment
store (starting the local chat host first), so its send claims it the
same way. The old paste folder is no longer written or swept: messages
sent before this change may name its files. Restored drafts still read
it.

An unclaimed upload now waits 30 days instead of one before the sweep
takes it. A draft names its image by this path, so the window is how
long an unsent draft keeps its image; 30 days is what local drafts had,
and it outlasts the host's send-id window so a resent draft still finds
its image.

A chat folder an older build set aside as unused (<hash>.expired) goes
back to its chat instead of being deleted.

* fix(native-chat): a terminal-backed chat's pastes are never swept

A terminal-backed chat has no journal, so no send claims its pastes and
nothing can tell a sent one from an abandoned one. Its pastes therefore
stay in the paste folder, which is no longer swept, rather than in the
attachment store, whose sweep would take them after 30 days unclaimed.
Only a local structured chat's paste (forStructuredChat) goes to the
store, where its send claims it.

* fix(native-chat): keep the attachment owner's literal kind for structured local chats

* fix(native-chat): a screenshot dragged into a chat lives as long as the chat

On macOS a screenshot dragged from its thumbnail is copied into
$TMPDIR/orca-drops, and that copy was deleted 7 days after the drop, so a
sent dropped screenshot turned into a label chip after a week. The common
pattern keeps a file sent in a chat as long as the chat.

A local structured chat's composer now moves each such copy into this
machine's chat attachment store, where the send that names it claims it
for the chat. Every other copy (terminal panes, terminal-backed chats,
editors, startup prompts) has no owner Orca can tell, so copies are no
longer swept at all. The copy budget now bounds one drop instead of every
copy still on disk: without a sweep, counting earlier copies would refuse
every later drop.

* style: wrap the drop-copy call

* test: drop an unused import

* test(ipc): expect the local chat store option on the clipboard registrar

* test(ipc): mock the drop-copy registrar in the core handler test

* Store fresh chat drops before publishing their paths

* Type the drop preparation fixture with its request contract

* Capture immutable drop batches before attachment publication

* Set explicit buffers for cross-volume attachment imports

* Control the deadline in the drop abandonment test

* Return void from the drop test timer cleanup

* Use the captured attachment destination for queued drops

* Register the paired runtime in the queued drop test
…ist (stablyai#30641)

* refactor(protocol): each area owns its published runtime capability list

RUNTIME_CAPABILITIES now spreads one array per area instead of a flat
hand-appended list, and runtime-capability-constants.ts is split into
the areas that own each constant. The published set is unchanged and
pinned by an exact sorted test.

* test: preserve capability baseline while allowing additions
…nd (stablyai#30645)

* refactor(native-chat): remove three chat mechanisms nothing drives

- The adapter's optional startAnswered hook lost its only implementer in
  stablyai#27925; it was still forwarded through four layers and always read as
  answered. A start that never answered is read from the child's phase, as
  the exit already does.
- The saved lease's journalCheckpoint is only ever written as null and read
  only by validation. Records an older build saved with it still load: it
  joins the retired lease fields dropped at load, so the next write sheds it.
- The record store's setConversationCommand had no production caller. The
  tests that stood in for an older build with it now seed the saved row and
  reopen the store; three that only re-pinned another test are removed.

* test(native-chat): an older build's null journal checkpoint also loads

* Keep startAnswered cleanup in its owning PR

* Keep historical chat fixtures aligned with their readers
…ontroller (stablyai#30654)

* fix(github): PR conflict previews fetch the base branch through the fetch controller

The conflict summary on a PR card spawned its own `git fetch origin <base>`,
outside RuntimeRemoteFetchController: it refetched a base a worktree create
had just refreshed (and vice versa), ran git's auto-maintenance in the
background, and never armed the idle loose-ref sweep.

It now asks the runtime's controller for the exact-base refresh creates
already use (same argv, per-remote queue, dedupe and freshness), waiting at
most the old 10 s before falling back to the local ref. The runtime registers
its controller at construction, since the IPC and poller paths have no
runtime handle.

Also corrects the controller comment that claimed every fetch skips
auto-maintenance: full fetches keep it on purpose (stablyai#8039).

* test(github): read the mocked fetch's WSL option without a type assertion

* test(github): give the conflicting fallback-lookup test a git mock for its conflict summary

* test(github): check WSL routing without duplicating fetch policy

* fix(git): bound preview fetch ownership without cancelling create

* Preserve repository identity after preview cancellation
nwparker and others added 27 commits October 21, 2026 17:06
…ablyai#31687)

* fix(security): update Node runtimes for October security releases

* fix(ci): compare normalized web file inventory without ordering artifacts
…lyai#31702)

* fix(mobile): invalidate chat file search on authority migration

Modern search caches and late replies survive authority migration on the same client object. Own cache, capability decision and inventory by logical generation.

* test(mobile): record retired file-search requests after reset

* refactor(browser): simplify address bar callbacks within lint limit

* style(browser): keep client-hosted pane within line limit

* fix(i18n): retire obsolete Portuguese default zoom entries
* fix(mobile): show commit comparison failures with retry

Comparison refusals, transport errors and malformed payloads appear as No file changes. Decode accepted data, preserve loaded files on failed refresh, and offer Retry.

* test(mobile): record commit comparison errors and retry affordance

* refactor(browser): simplify address bar callbacks within lint limit

* style(browser): keep client-hosted pane within line limit

* fix(i18n): retire obsolete Portuguese default zoom entries
* Extract image clipboard copying into shared utility

* Await image reads before reporting clipboard copy success
Pass the selected repository to New Workspace agent detection through the host-authoritative runtime resolver, including WSL paths and Windows project preferences. Preserve old-client request shape, SSH routing, and strict ownership/refusal behavior.

This merge credits @welldoingk’s original WSL agent-detection investigation and community PR stablyai#20101, adapted to the current host-resolved contract.

Co-authored-by: welldoingk <[email protected]>

Fixes stablyai#20060
…yai#31709)

* fix(mobile): own commit generation by workspace and admit once

AI commit generation crosses workspace transitions and admits duplicate calls before a render. Retire the active run on scope changes and use synchronous admission.

* fix(mobile): retire commit generations only after scope commits
… state (stablyai#31711)

Concurrent close replies filter captured terminal arrays and resurrect an already closed terminal. Reconcile the current collection synchronously and respect newer selection and metadata.
…lyai#31620)

* fix(native-chat): open inline images directly in preview dialog

* fix(i18n): add inline image preview translation keys
* fix(terminal): resolve URLs across padded hard-wrapped rows

* Reject oversized wrapped URL prefixes and isolate reconstruction

* Handle preceding links and uppercase schemes in wrapped URLs

* Restore full lint by extracting props and ask dismissal identity

* Keep wrapped URL clicks consistent and require padding evidence

* Preserve soft-wrapped sibling URLs in cold click fallback
)

Switching desktops retains another host history and can scan its filesystem path on the new host. Reset content by host while preserving same-host reconnect identity.
…leases keep working (stablyai#30393)

* fix(native-chat): agents need only a minimum version for chat; newer releases and prereleases run

OpenCode chats accepted only the 1.x and 2.x lines and Pi only 0.x and 1.x,
every prerelease was refused, and a slow or failed --version run counted as
unsupported. A new major would open as a terminal and existing chats said
"Orca can't run this agent in a chat here."

Each agent now lists ascending minimum versions; a version must reach the
latest one on or below its own major line, compared by semver. The check
answers ready, too old, unknown (slow, failed or wordless run) or missing
(did not start). Only too old refuses a launch, as Codex already did, with
"<Agent> X is too old for chats. Update to Y or newer." carried in a new
optional refusal fact agentInstallation; Codex keeps sending
codexInstallation for older clients. Codex's reader and error fold into the
same check.

* refactor(native-chat): a launch check declares its minimum versions; create support and the agent health snapshot run the one shared check

* fix(native-chat): read an agent's version from stderr too, so Pi 0.73 is known too old instead of unreadable
Capture Android terminal keyboard controls in the OTA live input before native web input edits or moves focus. Preserve composition handling, send ordering, and stale-target protection.

Fixes stablyai#25496

Co-authored-by: Sangrak Choi <[email protected]>
Co-authored-by: zenghaolun02 <[email protected]>
)

* fix(browser): bring the client-hosted page pane back under the 400-line limit

Move the client-hosted guest's six event-listener add/remove calls into
bindBrowserClientPageGuestEvents beside the guest load-failure handler,
so ClientHostedBrowserPagePane.tsx drops from 404 to 395 counted lines.
No behavior change.

* test(browser): pin the client page guest event binder's bind and unbind contract

* fix(native-chat): bring the question module back under the 300-line limit

Move answer encoding (pasted answer text and the Claude and Codex selector
keystrokes) into native-chat-ask-answer.ts and re-export it, so importers are
unchanged.
…i#31744)

* fix(sidebar): omit host badges beneath host section headers

* fix(mobile): keep host health without repeating section labels

* test: align host section goldens and preserve chat translation exports

* fix(i18n): retire obsolete Portuguese Codex version key
Classify substantially delayed connect/handshake deadlines as interrupted
instead of blaming endpoint reachability, retaining the existing close/retry
path and ordinary timeout errors. Limit sleep-clock compensation to observed
background segments and let fresh failures replace delayed evidence.

Remove the stale host-version fallback and discard captured versions when
report hydration crosses an observed reconnect. Independently reviewed;
128 focused tests, adjacent transport contracts and changed quality pass.

Adapted from community PR stablyai#24425.
Fixes stablyai#18829.

Co-authored-by: Wooseong Kim <[email protected]>
Co-authored-by: Cursor <[email protected]>
…stablyai#31738)

* fix(editor): list unsaved editor files before a workspace removal closes them

Removing a workspace closed its editor tabs and threw away unsaved text
without a word, including with "Don't ask again" on.

Removal confirms now list the files whose unsaved edits the removal
discards: the tabs the purge itself would close (host twins included),
kept only when no view sharing their model or record stays open. Editable
unstaged diff tabs count; delayed rich Markdown, CSV and notebook text is
flushed first.
- Delete Workspace dialog: the list sits with the git-change warnings.
  While it is non-empty the dialog no longer starts focus on Delete, and
  "Don't ask again" no longer skips the dialog.
- The same list in Remove Project, SSH workspace forget/reconnect-and-
  delete, SSH host removal with its workspaces, nested-worktree deletion
  (rows matched by path containment under the parent) and project-group
  deletion with its contained projects.
- Removals with no dialog whose files stay on disk refuse instead, with
  "Save or close N unsaved files in <name> first": folder-workspace
  delete (card action, context menu, hovered shortcut, through one shared
  helper) and Settings > Remove Project.

Force retries with no list of their own (the failure toast's Force
Delete / Delete Anyway, Space's Force button) re-check at that moment and
refuse the same way. A folder-workspace delete that leaves a same-id
folder on another host closes no tabs, so it is not refused. Removal
confirms touched here render on the security surface.

Removals with no prompt (CLI, automations, paired clients) behave as
before; a follow-up offers their text back.

Known limitation: the list is decided by the tabs a removal closes, not
by paths; a symlink into a deleted folder is not resolved on the host.

Co-Authored-By: Claude <[email protected]>

* fix(editor): offer back unsaved text a removal with no prompt closed

A workspace removed with no dialog (CLI, automations, paired clients,
removal outside Orca, listing and runtime-host purges) still closed its
editor tabs and dropped their unsaved text.

Those removals now flush delayed rich Markdown, CSV and notebook text,
then show one toast, "Closed N files with unsaved edits from <workspace>",
whose Reopen action reopens each file as an unsaved tab: in its own
workspace if it is still open, else the active one, only when that
resolves to the same host. The next save is guarded against the disk
version the edits came from. Dismissing the toast drops the text and
logs it. The captured entries belong to that removal alone.

Removals confirmed in a dialog that listed their unsaved files pass
unsavedEditsConfirmed through removeWorktree, deleteFolderWorkspace,
removeProject, project-group deletion and the purge builders, so they
discard without a toast. Folder-workspace and Settings project removals
refuse while files are unsaved, so they never reach the toast.

Co-Authored-By: Claude <[email protected]>

* fix(editor): keep reopened drafts editable when their file is missing

Preserve recovered text through a missing-file read, retaining previous content and rename state. Cover empty drafts and keep unrelated failures on the existing error path.

Co-Authored-By: Claude <[email protected]>

* fix(editor): recover removed workspace edits into new files

Create collision-safe recovered files in the active workspace using the existing untitled flow. Capture delayed edits across host twins as one removal, match stale-host flushes to purge selection, honor host-qualified confirmations during announcements, and release retained toast text.

Co-Authored-By: Claude <[email protected]>

* fix(editor): snapshot confirmed discards and simplify removed-workspace recovery

A removal dialog now records the exact text it listed when the user
confirms. Every purge path (worktrees:changed, announcements, removal
teardown, runtime host retirement, repo removal, nested children) skips a
closed file only while its text still equals that snapshot, so edits made
after confirming are offered back instead of dropped.

- One flushAllPendingEditorBuffers() before each purge replaces per-id
  flushing and the getState threading; idle CSV cells stay open.
- Captures merge into one toast per microtask, deduped by file id; the
  per-call options, scope ref-counting and announcement wrapper are gone.
- Capture reads a shared model's live text, else any sharing tab's draft.
- Recovery writes through a guarded write that only fills the empty file
  it created, moves to the next name on conflict, and never deletes it.
- Reopen resolves the destination path from the provenance owner host.

Co-Authored-By: Claude <[email protected]>

* fix(editor): scope removal discards to the confirmed teardown and flush only closing panes

- No lingering allowlist: a dialog's confirm returns a snapshot that rides
  the confirmed removal (removeWorktree, removeProject, project groups, SSH
  host clear) to its own teardown capture. Every other purge path offers
  unsaved text back, even if it races a confirmed delete.
- The pre-purge flush covers only the closing files and views sharing their
  records, and flushes every pane registered for them, so split rich and
  notebook panes all commit while other workspaces' CSV cells keep editing.
- Listing announcements flush the files they will remove before the purge.
- Capture reads a model's text only while it is attached to an editor;
  otherwise it prefers the drafts.

Co-Authored-By: Claude <[email protected]>

* fix(editor): keep a CSV cell that can't commit as draft text when its tab closes

A pending cell over the table size limit fails commit(), so the closing
flush now falls back to the view's preserve hook, which writes the cell
through the same limit-free serialization the unmount path uses. Recovery
then captures the typed text instead of an older draft.

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
* ci: propose downloads badge updates through pull requests

* fix(i18n): align Portuguese CLI version message with current catalog

* test: provide locale in queued editor translation mock
…rwrite newer text (stablyai#31760)

* fix(editor): reject stale delayed rich/notebook view edits instead of overwriting

A rich Markdown or notebook view commits its typing into the tab's shared text
after a short delay. If another pane of the same tab (or a disk reload) replaced
that text in the meantime, the delayed commit either overwrote the newer text
(notebook) or was silently dropped (rich Markdown). Each pending commit now
carries the text it was based on; a commit onto newer text is refused, the view
re-syncs, and a toast says the last edit in that view couldn't be applied.
Notebooks also commit pending drafts when focus leaves them, so ordinary
alternation between panes never goes stale. CSV already refuses stale cell edits.

Co-Authored-By: Claude <[email protected]>

* fix(editor): keep unrelated notebook drafts and silence discards when rejecting stale view edits

- Notebook drafts record each cell's source when typing began; a flush merges
  drafts whose cell is unchanged onto the latest notebook and drops only drafts
  whose cell changed or no longer resolves (position keys also require the same
  cell layout). The toast fires only when typing was actually lost.
- An acknowledgement that empties the draft map clears the flush timer and bases.
- Rich markdown flushes its pending edit when focus leaves the view; the
  debounce/flush logic moves into useRichMarkdownPendingSerialization.
- Dropped or cancelled edits republish the shared text so the tab's dirty flag
  is recomputed.
- Discard bumps its epoch before flushing, so pending edits it cancels never toast.
- Clearer toast copy in every locale.

Co-Authored-By: Claude <[email protected]>

* fix(editor): keep stale view flushes from overwriting newer text or saving rejected edits

- A notebook flush republishes only after its own typing, a dropped draft, or
  a real change, so stale text never lands over another view's newer text.
- The rich flush reports whether it rejected the pending edit; Cmd/Ctrl+S skips
  the save when it did.
- The rich discard epoch is captured where the serialize timer starts, replacing
  the dirty-hint wrapper; the redundant shared-text comparison is removed.

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
…g (no behaviour change) (stablyai#31757)

* feat(connectors): off-by-default experimentalConnectors flag and seam lifecycle (B2a)

Adds the experimentalConnectors setting (no UI, telemetry whitelist) and a
runtime-owned reconciler that builds the connector seam while the flag is
on and disposes it with connectors_disabled when it is turned off. The
seam is empty; later connector PRs land behind it.

* fix(connectors): partial runtime stores read as connectors off

* refactor(connectors): B2a is the setting only; the lifecycle lands with its first consumer
…ugh (stablyai#21816)

* fix(terminal): link a framed multi-row URL when an overlay shows through

A TUI that draws a box-framed modal over existing output leaves the screen
underneath visible beside the frame, so the text left of the URL differs from
row to row. The hard-wrap detector required that text to be byte-identical
across rows, so the join stopped at the first row whose gutter differed and
the candidate collapsed back to a single row, opening a truncated URL.

Anchor continuation rows on the frame's cell column and the run between the
frame and the URL instead, which is the part that is actually shared.

* refactor(terminal): drop the redundant scheme column guard

The start row's fragment start column is re-derived per row, so guard that
value where it is used instead of asserting it non-null.

* fix(terminal): reject shared-table URL joins

* test(terminal): isolate shifted URL frame guard

* fix(terminal): keep joining framed URLs whose row prefix is unchanged

Rows whose text left of the URL matches the start row are joined as
before; only a changed prefix uses the overlay frame anchor and its
table-cell guard. Restores nested-frame and overlay-over-frame wraps.

* Verify framed overlay URL hover and cold clicks with real terminal buffers

* Remove retired Portuguese agent-version translation

* Preserve translation exports in queued-message editor tests

* Run CI after resolving the upstream merge conflict

---------

Co-authored-by: Neil <[email protected]>
Co-authored-by: Neil <[email protected]>
…, and the window only attaches and paints the host's history (stablyai#31567)

* feat(terminal): the window's store shows main's pane start status (layout-owner build)

A status-only frame changes one store entry and no pane tree, so the pane's view stays mounted.

* refactor(terminal): keep the frame sync within its line budget

* feat(terminal): every pane main starts shows 'starting' from before it is written (layout-owner build)

* feat(terminal): a pane main is starting waits and attaches; a failed start shows why (layout-owner build)

Fixes owner-visible row 15: a failed agent or setup start no longer opens a plain shell.

* test(terminal): iterate store listeners directly

* fix(terminal): an exit that reports no code keeps its pane, as lost contact (layout-owner build)

* test(terminal): a pane main started attaches to main's terminal at its own grid

* test(terminal): detach census tests assert main's move and frame with the switch on

* fix(terminal): a restored pane paints history only from its terminal's host, never the window's copy (layout-owner build only)

* fix(terminal): main releases a painted cold restore only for the pane's current terminal (layout-owner build only)

* test(terminal): typed ack args in the painted cold-restore test

* test(terminal): exited-pane tests assert main's close with the switch on

These 8 have failed switch-on since stablyai#31130 moved the exit close to main.

* feat(layout): main starts the panes a client's startPane or wake names, through its one restored-pane starter (layout-owner build only)

The model's start and stop effects reach the runtime once the command is written, never the
reply. startPane starts a pane whose binding has a start status, and a slept pane from its record.
A wake keeps a pane's resume record until its start binds; a failed start keeps it and shows why.
With the switch on, main owns a running agent's wake even with a window open.

* fix(layout): a window's wake of a pane it resumed itself is record-only, so main does not start it again (layout-owner build only)

* test(layout): a client's startPane starts the pane before any other trigger

* Revert "fix(terminal): a restored pane paints history only from its terminal's host, never the window's copy (layout-owner build only)"

This reverts commit a646d89.

* test(terminal): the cold-restore repaint ack names its pane in the layout-owner build

* fix(layout): a wake keeps the pane's resume record in the pane-owned form, so a host crash resumes the agent again (layout-owner build only)

* test(layout): a failing start in the pane-start runner test throws

* feat(terminal): main writes and starts every split of a pane it holds; the window attaches (layout-owner build)

The window's split, a startup split with its command, and a CLI split all go through main's
terminal.split; main's frame mounts the pane, with or without a window intent. Deletes the
window's split wait and withdraw, the split appear intents, and the queued-split skip and cancel.
The e2e helper uses the real split. A startup split leaves focus on its source pane.

* fix(terminal): the attach-only wait leaves sleeping, resuming and held panes to their restore path

* fix(terminal): a split pane attaches to the terminal main bound it to; a taken pane id is refused

Also restores the proof that a split closed while it starts gets one answer and leaves no
pane or start status behind.

* Reapply "fix(terminal): a restored pane paints history only from its terminal's host, never the window's copy (layout-owner build only)"

This reverts commit 420e605.

* fix(layout): a trigger between a restored pane's start and its bind write joins that start, not a second one (layout-owner build only)

* fix(terminal): a window split main cannot start still shows its pane, failed, with why

* fix(terminal): keep the switch import the D1b-1 merge dropped from the layout restore

* feat(layout): main's starter shows a restored pane starting before any await, and a failed start with its reason; startPane starts a pane whose bound terminal ended (layout-owner build only)

* feat(terminal): a window's attach-only view of a pane attaches to its terminal or starts nothing, keeping the binding for main's start (layout-owner build only)

* feat(terminal): a restored pane with no live terminal asks main to start it and attaches once main binds it; the window's wake, hibernated wake, restart-on-show and gone-terminal fallbacks route through main (layout-owner build only)

* fix(terminal): check a taken pane id first, keep the start's own error, clear a gone pane's status

Three test stores gain the pane-start field the window's store always has.

* test(terminal): the admission stub answers whether its pane is still written; a closed pane's failed start clears

* test(terminal): with the switch on, the window's restores, wakes and restart replacements ask main to start the pane and attach to the terminal main binds, starting and resuming nothing themselves

* refactor(terminal): the rebound workspaces' bindings show through one call in the bindings module

* fix(terminal): a held pane connects as today so main's refusal holds it; main's start follows output; a capacity death after main's resume keeps the resume (layout-owner build only)

* fix(layout): main passes its start options only for commands that start panes; a windowed open resumes the agent under main (layout-owner build only)

* refactor(terminal): break the pane start module cycle; typed test fixtures

* test(terminal): a pane main wrote and the user closed mid-start drops its failed status

* fix(terminal): every waiter on main's start runs, a failed or refused start settles and is asked again on the next view, a hidden gone pane waits for its view, a twin main hands back stays on today's path, and lost contact never starts a pane (layout-owner build only)

* test(terminal): iterate the store listeners directly

* test(terminal): a cold-restore paint applies no window resume with the switch on

* fix(terminal): a split main starts is listed to phones and session.tabs without a window's report

* test(terminal): name the main pane start test helper as a fixture

* fix(terminal): a reconnect shows its pane starting and why it failed; a lost owner race shows no failure; a split no one asked to see keeps the phones' tab

* fix(terminal): a kept create another owner won shows no failure; the window attaches to the winner

* fix(terminal): a pane main starts at relaunch keeps its full history and starts before the window's graph lists its tab (layout-owner build only)

* feat(terminal): main replaces the empty shell a hibernated agent left and resumes the agent when a view asks; a start main could not attach shows main's own terminal_not_started (layout-owner build only)

* test(terminal): main seeds its copy of a restored pane even when a window declared one, with the switch on

* fix(terminal): a pane main started hidden paints once when its view attaches (switch-on builds only)

The view's attach snapshot, taken after main unmarks the hidden gate, already holds the bytes main
dropped, so the reveal no longer asks a second restore from main's buffer.

* refactor(terminal): main's pane start reads the pane from its own layout, not the client projection (switch-on builds only)

* fix(terminal): a pane restart stops its terminal before writing the pane unbound, so a stop that fails keeps the pane (switch-on builds only)

* test(terminal): a start main could not bind shows terminal_not_started through the window's wait, from one copy site (switch-on builds only)

* fix(terminal): main's pane start resumes an agent recorded under the pane's number, as the window did; stale switch-on tests show main's start and the known banner loss (switch-on builds only)

* fix(terminal): review round: a visible view alone retires main's hidden-start drops, by episode; main reads a split pane's numbered record by its number; the window keeps a shell main kept (switch-on builds only)

* fix(terminal): main's start of a pane a window view is attaching to leaves it visible, so the view paints once (switch-on builds only)

* fix(terminal): a window view that attaches while main starts its pane takes main's start, with no second provider attach (switch-on builds only)

* fix(terminal): review round: a view takes main's start only when it carries a payload and still owns its terminal; attaching views are counted, keep main's pre-spawn mark off, and a failed attach hides only what it kept visible (switch-on builds only)

* test(terminal): checked test doubles in the view-join and numbered-record tests; reattach options fit the file budget

* test(e2e): with the switch on, the mount-authority spec keeps the window's bindings, which only main's frames write

Claude-Session: W5b

* test(e2e): the mount-authority spec fits its line budget; the layout-owner build check is one helper

Claude-Session: W5b

* test(layout): an unbound pane holding a resume record starts and keeps the record, since main's start resumes from it

Claude-Session: W5b

* fix(terminal): a pane main resumed holds a running agent's record, so it reads awake, not sleeping (switch-on builds only)

Claude-Session: W5b

* fix(terminal): in a split where no pane owns a numbered record, main resumes the tab's one conversation in pane 1 only (switch-on builds only)

Claude-Session: W5b

* fix(terminal): main marks only the record a resume started from live, never a sleep captured after it (switch-on builds only)

Claude-Session: W5b

* test(terminal): with the switch on, a windowless resume leaves the pane's record a running agent's

Claude-Session: W5b

* test(terminal): the resumed-record test double typechecks

Claude-Session: W5b

* refactor(terminal): with the switch off, main's pane start reads no resume record for the live mark

Claude-Session: W5b

* refactor(terminal): the merged files fit their line budget: the folder-fallback notice and a hidden pane's wait for its first view are helpers, and the answering-transport lookup moves to its one test caller

Claude-Session: W5b

* refactor(runtime): the window's layout apply fits the runtime's line budget after the main merge

Claude-Session: W5b
…opting it (stablyai#31685)

* fix(wsl-host): prove an unrecorded orcad by kernel identity before adopting it

A WSL connect adopted the orcad named by a leftover instance lock whenever a
bare kill -0 found its PID. After a distro restart PIDs are reused, and a stale
lock plus a stale readiness file that name the same PID passed every other
check, so the record was repointed at a dead build. The holder is now live only
when the lock's boot id and start ticks match the PID's; an unanswered guest or
an older lock without them is unverifiable and is never adopted.

* fix(wsl-host): compare a lock's boot id case-insensitively
… saves don't rewrite; non-UTF-8 files aren't autosaved (stablyai#31768)

* Autosave relies on the guarded write instead of pausing restored or moved tabs

Delete the pendingDiskBaselineVerification and pendingLiveDiskVerification
pause flags. Every editor save is already a guarded write; a refusal raises
the changed-on-disk banner, which is what stops autosave until an explicit
save.

A guarded write now succeeds when disk changed but already holds exactly the
text being saved (local/host compare is byte-exact; client-side fallbacks
compare decoded text and refuse when it holds U+FFFD), so a restored draft
that matches disk goes clean instead of showing a banner.

The restore scan only raises the banner early for tabs that arrive dirty; a
watch resync no longer re-checks dirty tabs.

Co-Authored-By: Claude <[email protected]>

* fix(editor): skip guarded saves when disk is already identical

Return a compatible optional no-op result from hosts and client fallbacks, clean the tab, and clear its provisional self-write stamp without rewriting identical bytes.

Co-Authored-By: Claude <[email protected]>

* fix(editor): refuse lossy automatic saves, keep identical-skip on older hosts, flag dirty tabs on resync

- Autosave and pre-restart saves refuse when disk text can't be decoded losslessly, so a
  baseline that decoded to U+FFFD can't authorize overwriting different bytes.
- New files.write.identical-noop.v1 capability; for hosts with only the v1 guarded write the
  client compares first, skips identical saves, then delegates to the host's guarded write.
- Watch resync compares dirty tabs against disk and shows the changed-on-disk banner.
- Local guarded writes check for identical content before the write-only regular-file probe.

Co-Authored-By: Claude <[email protected]>

* fix(editor): tell non-UTF-8 files apart from disk changes, and quiet false resync banners

- Local guarded writes judge losslessness by bytes, so a valid UTF-8 file containing U+FFFD
  autosaves again. A file that really isn't UTF-8 is refused with its own reason, 'not-utf8'
  (older clients read it as 'changed'), which pauses autosave for that file with one notice
  until an explicit save converts it.
- A watch resync whose disk read fails leaves dirty tabs alone; the guarded save still catches
  a real conflict.
- Resync and restored-tab checks treat disk holding the tab's own just-written save as an echo.
- On hosts with only the v1 guarded write, only automatic saves read the file first; explicit
  saves go straight to the host's guard.

Co-Authored-By: Claude <[email protected]>

* fix(editor): lift the non-UTF-8 autosave pause when its edits end, and report disk changes first

- The pause is released once no dirty tab of the file remains (close, reload from disk,
  discard), so a reopened or reloaded file's next autosave asks the host again and notifies.
- Client-side precondition checks compare the signature before looking for U+FFFD, so an
  external rewrite shows the changed-on-disk banner rather than the non-UTF-8 notice.

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
@innocarpe
innocarpe force-pushed the fix/serve-cmdq-keep-headless branch from af4f2ba to 7a912a3 Compare October 22, 2026 02:26
innocarpe pushed a commit that referenced this pull request Nov 8, 2026
… list can't loop into React #185 (stablyai#31552)

The image viewer chunk is lazy. Its first load suspended to the editor panel's
boundary, which hid the whole virtualized combined diff. Hidden, the list
dropped the overscan image row, stopped suspending and re-showed; shown, it
rendered the row again and re-suspended. Each flip re-attached ref callbacks
(the toolbar's 'Show file tree' tooltip trigger first), so the synchronous
commits ran past React's nested-update limit (or tore down Monaco mid-mount).

A row-local Suspense keeps the chunk load inside the image section.

Co-authored-by: m4air <[email protected]>
nwparker pushed a commit that referenced this pull request Nov 20, 2026
…t still reads working (stablyai#45817)

* fix(native-chat): stop a quiet turn's fade from looping while the chat still reads working

A quiet turn that settled while the chat still showed it working was watched
again on every rebuild, so the fade's layout effect re-marked it leaving
forever and hit React's update-depth limit (#185). Never watch a turn that is
already quiet, and make the leaving write idempotent.

Co-Authored-By: Claude <[email protected]>

* fix(native-chat): restart the quiet-turn fade when a turn settles again mid-fade

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants