Commit Graph
2134 Commits
Author SHA1 Message Date
Jinwoo Hong 5e02b47d11 Reopen a closed terminal worker from its orchestration card (#37210)
* Open a closed terminal worker's conversation as a chat

* Open closed workers through a separate partyOpen call

Keep partyLocation a pure lookup; clients call partyOpen for a sender and fall
back to partyLocation on older hosts. Adopt from the closed pane's recorded
transcript, test terminal liveness by its PTY, keep follow-ups free of chat-host
installation, and report a possibly-created chat as retryable.

* Bring back a closed chat for a follow-up and match recorded sources by identity only

A follow-up to a worker whose conversation a chat holds reveals that chat in
the background when its tab was closed, so the follow-up is delivered there
instead of being refused. Recorded-source adoption passes only the pane identity
and conversation fields source matching reads.

* Reopen a closed terminal worker as a terminal, not a chat

partyOpen now resumes the closed worker's saved conversation in a new terminal
through the follow-up resume path, reusing a terminal that already holds it, and
answers with the terminal location. Removes the chat conversion and everything
only it needed; follow-up placement is as on main.

* Retry an uncertain worker reopen as the same request

* Resume again when the agent left the reopened worker terminal

* Type the hook row in the closed-worker follow-up test

* Find a closed worker's reopened terminal through the resume claim and hook rows

* Retry an uncertain closed-worker resume as the same request; reuse only a terminal whose hook row names the conversation

* Forget an uncertain closed-worker resume once its conversation reports

* Drop the closed-worker open map; overlapping opens share one resume request
2026-11-02 17:02:05 -05:00
Kelvin Amoaba b8080dfa00 fix(mobile): show a chat's last options at once when returning to it (#37554) 2026-11-02 21:46:21 +00:00
Max Hsu 8084c3ab7e fix(hooks): keep the approved script hash when Always trust is ticked (#37520)
A repo id on two hosts makes canUseRepoWideTrust refuse the repo-wide entry, and ticking Always trust saved nothing else, so the prompt came back on every create. Save the shown script's hash too, on desktop and mobile. A changed script still prompts on such repos.

Fixes #37484
2026-11-02 21:05:42 +00:00
Brennan Benson 34fa209fe1 fix(orchestration): native chats get each orchestration message whole instead of a check pointer (#28567)
* fix(orchestration): steer mail notices into a busy native chat's running turn

A native-chat coordinator's mail notice always queued as a card until the whole turn ended, so a
coordinator busy in a long command never saw its workers' reports. Agents that take a message
mid-turn (Claude, Codex, Pi) now get the notice at once; agents that would cancel their turn for
it (ACP) still queue it.

* fix(orchestration): drain mail that arrives while a notice is pending

* fix(orchestration): native chats get each orchestration message whole instead of a check pointer

Each mail message is sent to a native-chat agent as its own chat message,
with the sender, type, subject, body, payload and exact reply command, and
is marked read once the chat accepts it. Heartbeats are marked read, never
sent. Mail an unacknowledged check batch holds stays with that batch.

* fix(orchestration): keep the at-most-once gate's mail-lane assertions, exhaustive sender switch

* Preserve native mail compatibility and drain delivery backlogs

* Drain native mail with a finite ordered pass and scoped operation ownership

* Bound mail formatting and honor accepted queue handoffs

* Run the native mail tests that open SQLite in the Node runtime project

* Preserve live mailbox ownership and recover full reports by id

* Use a typed runtime client in inbox compatibility test

* Preserve historical mail evidence and scope the test clock

* Map historical structured-send evidence to the current test command

* fix(orchestration): settle mail handoffs per message and recover interrupted consumers

* Hold native chat mail until the chat is idle, as terminal mail waits

A mail send admitted into a running turn cancels that turn for agents that
cannot take a message mid-turn (ACP: Grok, OpenCode, OMP, Antigravity): the
second of two reports cancelled the first before the agent saw it, and the
first report cut off the turn carrying the person's answer. Mail now waits
while the chat is working or a prompt waits on the person, for every agent,
and goes out at the idle edge, one message per turn, oldest first.

* test: cover idle orchestration report turns

* fix: preserve independent mail authorization through grouped delivery

* fix: preserve routed mail identity and private inbox state

* test: bound mailbox query work on repeated delivery

* fix(orchestration): consolidate terminal mail imports

* Validate mailbox query rows and type delivery fixtures

* Keep host forwarders typed and inline single-use mail evidence reader

* Declare the mail handoff store method boundary

* Preserve mailbox contracts across typed boundaries

* Retain existing main cleanup row boundaries

* Fix mailbox handoff fixtures and helper mail transfer

* Name the mailbox fixture constructor type

* test: complete mailbox dialog pane identity

* Keep structured mail ordering and ownership current at claim

* Bound mailbox preparation and immutable cohort selection

* Consolidate structured mail contract fixtures

* Consolidate duplicate mailbox imports

* Fix mail handoff type contracts and deterministic test fixtures

* Repair journal forwarding and align mail contract fixtures

* Fix mailbox corpus message type inference

* Correct personal provenance in ACP backlog fixtures

* Correct ACP mail contract measurement and epoch wake fixtures

* Retain full ACP contract diagnostic arguments

* Restore reliability gate coverage and consolidate mail fixtures

* Preserve unknown alias release coverage

* Route native reports through the durable chat queue

* Preserve exact legacy mail holds in queue lineage proof

* Use ordinary queued messages for worker reports

* Use semantic queue and check completion for report delivery

* Record bounded queue recovery work and request cleanup proofs

* Preserve report creation evidence and bounded source wakes

* Preserve report source work and check ownership

* Use ordinary report acceptance and incremental original history

* Retire completed mail opportunities with their current owner

* Retire routed source debt and complete joined mail contracts

* Exercise Run typed peek through the command transport

* Require the queued report submission in creator coverage

* Restore database callback API and align queue contract fixtures

* Fix empty legacy tab selection in restart fixtures

* Keep relation heading assertions scoped to each report

* Native chats receive each orchestration message whole, through the chat's own queue

Each orchestration message to a chat session becomes one ordinary chat message carrying the whole
message, sent with the chat's queue like a person's message: it waits behind running work or a
question and the agent is handed one per turn. A per-message record keeps the send's operation id,
so a restart finds the card instead of sending twice; the message is marked read once the agent is
handed it, and a check that takes it first deletes the waiting card. A message too large for one
chat message keeps today's pointer to check. Terminals are unchanged.

* Test that chats get each message whole, queued like a person's message

* Repeat a report the agent may not have taken only after a later turn or /clear

A send the agent rejected or left unanswered stays unread for check and is handed over again only once
a later turn ran or a /clear replaced its context, so edges alone never restart an agent that fails on
every start. A send whose record a rewind dropped is sent again, and a send that throws is retried on
the session's next journal edge. Tests follow chats getting each message whole.

* Hand a chat orchestration mail only while it is still owed

A queued mail card now runs only while its message is unread in its mailbox and that mailbox still belongs to
the chat: the queue asks at handover and drops a stale card without a turn (abandoned or settled Dispatch,
Run taken over by another chat, mail a check or reset took). Cleanup after check, moves, run-use, abandon,
reset and worker release deletes those cards visibly and never holds the action up; mail still owed goes to
the mailbox's current owner, and Orca's own deletion is never read as the person's.

A send that may have reached the agent is never sent again; check keeps it. A send the agent proved it never
got is sent once more, under a new id, only after a later turn or /clear ordered after that failure. A send
recorded but never admitted is admitted under its own id. Each outstanding send is read by key, never by
scanning the chat's history.

A refusal no longer loses its retry when an edge arrives mid-send, and a coordinator refused for queue room
gets its mail when the queue frees room. A chat worker's follow-up now takes its short Task first and then
each moved message whole, with no check needed. The guide says a working worker gets mail when its turn ends.

* Let the chat's host answer what became of each mail send, and let the person's cards pass mail Orca cannot decide on

The chat's host now answers for each send by its id: the card first, then the send itself, then a gone card's handoff found by key, and only then the admission receipt, which alone can prove nothing was admitted. A receipt whose journal detail is gone is in doubt however old its id, so a renewed id can no longer send the same message twice. A rejected send is repeated once only after a different turn was actually handed over and accepted, or a /clear was made, after the rejection; the queue's admission cursor no longer stands in for that. No answer walks the conversation's history.

The mailbox reserves each send and stamps the message delivered in one write before the host call, so a crash after admission never leaves it selectable again. A refusal before admission releases that exact reservation; every retirement and release is checked against the current attempt, and a record an older build saved without a stamp is repaired as it retires. A person's Delete consumes an oversized pointer's mail too.

Who holds a mailbox is read from durable facts: a Run moved to a terminal, a released worker, another host or an ended chat makes a waiting card stale, so it is withdrawn without a turn and its mail released for the real owner. Only a fact that cannot be read holds a card; the person's own cards behind it go on, later mail stays behind it, and selection and the handover check use the same rule. When the owner can be read again the queue is woken. A Task or a person's edited card never opens the mail database. An explicit Send of such a card now says what happened.

Parked mail is indexed by chat, wakes only that chat's mail, ignores streamed tokens, and drops the chat's journal watch with its last mailbox. Canonical session identity is reused per session store revision instead of rebuilt from every record on each check. Main's account-switch worker test now reads "unread and still owed".

* Let the queue alone decide which card goes next, and wake a terminal given back its mail

The queue now owns one rule for what can be handed over next, installed once on each chat's queue and read by the drain, the final handover check, queue publication and scheduling alike. Mail whose owner cannot be read keeps its place; the first of the person's own cards behind it goes instead. Held cards stay held, a returned, paused or edited card behind it still stops the queue, and later mail, from any mailbox, stays behind it. The rule walks only the queue's live cards, never its history. When nothing can be handed over nothing is published as next, so the chat reads as idle and /clear works; when the owner becomes readable again the queue is published and looked at again. Choosing and publishing the next card only reads custody; settling a stale card stays with the handover.

Mail a chat gives back after its Run or worker moved goes through the runtime's own delivery, so a terminal owner is pointed at it. A chat's journal watch now lasts as long as it has mail parked, through its own redrives, so a publication that changes nothing the mail waits on starts no pass. Session identity is cached until a record joins, leaves or is cleared, not rebuilt after every admission. An explicit Send of mail whose owner cannot be read says Orca couldn't read the chat's saved state rather than that it restarted.

* Find the person's next card past undecidable mail by walking only as far as it must, and ask mail authority only once nothing else stops a send

* Say plainly when Orca can't confirm queued mail is still this chat's, and that the person can try again

* Let parked mail's own watch be the only journal subscription for mail, and stop saving a send fence nothing reads

* Count the queue's order reads with plain index getters instead of a reflected proxy

* Read saved mail sends column by column, and build test fixtures as the types they stand for

* Keep main's words for every other refused queued Send; only undecidable mail says its message wasn't sent

* Let replay read the queue's handoff links, keep the host's last mail answer where the type can see it, and drop the removed test from the send gate

* Keep the queue's possible next cards in order as each one changes, reuse the last pick until the queue moves, and look up a send by its id

* Ask whether one chat's tab closed instead of listing every open tab to find it

* Settle a mailbox's earlier mail only when something it waits on moved, republish a chat once per pass, clean up only the mail a check, abandon or move touched, and act on a chat's status only when it changes

* Date the scaling test's extra tabs by the coordinator's recorded lease instead of the wall clock

* Keep nothing in memory for a mailbox a cleanup finds with no owner and no send left, unless a pass on it is still running

* Ask about a report whose send threw before handing over newer mail, under the id it was reserved with
2026-11-02 12:08:01 -08:00
Brennan Benson 59fc7ae165 Refresh Checks after failed review actions (#37156)
* fix(review): reconcile hosted reviews after failed writes

* fix(review): reconcile PR page, phone and Checks after failed writes

- PR page: merge, auto-merge, close/reopen and reviewer changes reread details after every attempted write, and the page's displayed state follows a freshly read details state so buttons reflect what landed.
- Phone: the PR actions engine and title save reread once per attempted write after busy clears; a failed reread never replaces the write's outcome or turns a successful write into an error.
- Checks: a failed merge's error stays visible when the reread shows the review merged; a GitLab reread that settles after the panel switched reviews no longer commits details for the other context.

* fix(review): reconcile GitHub and GitLab item dialogs after failed writes

- GitHub item dialog: merge, auto-merge, close/reopen and reviewer changes reread details after every attempted write, after pending clears and after the close/reopen revert. Success toasts and patches stay success-only.
- GitLab MR dialog: merge, close, reopen, details save and reviewer changes run the dialog's existing refresh after every attempted write. The write's error toast and the user's drafts stay.

* fix(review): keep shown review data and ownership across write rereads

- Phone: a write's follow-up read that fails keeps the PR already shown and the write's own error instead of replacing the panel with a load error. Manual Recheck, Retry and HEAD refreshes still show a failed read.
- Phone: a load started for an earlier branch can no longer claim the current one, and a title write that settles after the view moved to another PR stays silent and skips its reread.
- Phone: an older title Save that finishes late no longer closes a newer edit or hides its failure.
- Checks: the GitLab details read after a write lands only on the review the panel currently shows; an old or fallback MR can no longer take over a replacement MR's checks and comments.

* fix(review): keep loaded item details on screen through rereads

- GitHub item dialog and PR page: when a write's reread (or any other invalidation) drops the cached details, the same item keeps showing its last loaded details while exactly one fresh read runs and if it fails, so the comment composer and its unsent draft stay mounted. A cold first load, a retry with no data and switching items still show loading and errors.
- GitLab MR dialog: the state badge and Merge/Close/Reopen follow the item's freshly read details, falling back to the list row; the Reviewers section stays visible while a reread runs; the load-error banner shows only when there is nothing loaded; switching items drops the previous MR's details before paint.

* fix(review): keep loaded details at their cache and scope GitLab details to the full target

- GitHub item dialog and PR page: invalidation keeps the loaded details in the cache entry, retires its pending read and owes exactly one fresh read, so Viewed, description, reviewer and checks updates keep landing on what is shown, even while that read runs or after it fails. A failed read, an empty result or an optimistic comment does not start another read. Removes the separate retained-details hook.
- GitLab MR dialog: details, reviewer/label options and drafts belong to the full target (task source, GitLab project, item and repo); switching source or instance with the same item id drops the previous target's reviewers and state, and a late result for the old target is ignored.

* fix(review): keep owed and running detail rereads through local field updates

Each GitHub details cache (item dialog and PR page) gets one payload-only patch operation that copies the entry's read ownership (an owed reread and the running read) by construction. Viewed, description, reviewer, checks and the optimistic comment all go through it; read start, settlement and invalidation stay separate. A comment that lands with a write's invalidation no longer cancels the owed reread, and a comment during a running reread no longer lets an unrelated invalidation discard that read. A comment alone still starts no read.

* fix(mobile): reread the PR after every attempted write on main's PR tab

Rebuilds this PR's mobile behavior on main's restructured PR tab:
- Engine and title/description edits reread after every attempted
  write once busy/saving clears; the write's outcome is the only
  feedback and a failed reread is contained.
- The controller gives writes a dedicated reread entry that a poll
  can't skip, keeps the shown PR when the read fails, and retires a
  details read started before the write.
- A reread whose checks read failed still shows the PR's new state
  (merged/closed), keeping prior checks only for the same review.
- Details carry, dedup and completion key on repo + number, so the
  same PR number in another repo doesn't inherit details.
- An older Save can't close a newer edit; a write that settles after
  the view moved to another PR shows no error and rereads nothing.

* test: repair CI for the reread tests

- Use a fixed fetchedAt for the unrelated cache entry in the details
  hook tests instead of reading the wall clock.
- Mock platform haptics in the mobile controller probe and text action
  tests so they don't load react-native, and give the act callbacks
  that awaited a load result a Promise<void> body.

* fix(mobile): publish PR details against the latest queued state

Phase-two details spread the last rendered PR data, so when they settled
before phase one rendered (a fast read, or a closed client failing at
once) they restored the PR state the reread had just replaced: a Close
or Merge the host applied still showed open. Details now patch only
their field through a functional update whose identity, sequence and
same-review checks run against the state React applies them to.

* fix: type the reread test fixtures and commit identity refs after render

- Replace type assertions in this PR's tests with typed fixtures; the
  GitLab primary-actions test keeps one partial dialog-state cast with a
  SAFETY note, as neighbouring hook tests do.
- Assign the mobile controller and text-action identity refs and the
  GitLab dialog owner ref in a layout effect, so a render React discards
  can't leave an identity that never committed for a late result to
  check against.

* fix(github): route the saved-body patch through the details payload helper

Main's issue-body rule (a saved description supersedes a read already
running) now goes through the one field-patch helper, which keeps an
owed reread and copies the running read for every other patch.

* fix(github): replace a read retired by a saved issue description

A saved issue description drops the details read already running so it
can't restore the older body. When that read was an ordinary one (such
as the reread after a write), the dialog now owes one replacement read,
so the new conversation still arrives with the saved body. A Refresh
read keeps relying on its own loop, which already retries a superseded
attempt. Starting the replacement consumes the obligation, and a failed
replacement owes no retry.

* test: fix typecheck errors in the dialog and checks-panel reread tests

* fix(gitlab): keep a late write on the previous MR from touching the next one

A save, reviewer change, close/reopen/merge or comment that settled after
the dialog moved to another MR still reread and cleared busy state for
whatever was shown, restarting the new MR's first read and discarding its
answer. Those finalizers now reread and clear busy only while their own
MR is still shown, as pipeline retry already did, and switching MRs
resets the save, action and comment busy flags so the next MR is never
left busy.

* test(gitlab): give the pipeline tab test a details owner after the main merge
2026-11-02 10:25:38 -08:00
Neil 1b15d45a5e refactor: finish direct owner imports and audit cleanup (#37461)
* fix: close module organization audit references

* refactor: import moved bindings from concrete owners
2026-11-02 04:06:56 -08:00
Kelvin Amoaba d967d53fa9 fix(mobile): open each agent row's own tab from the workspace list (#37458)
Top-level agent rows had no press, so a tap opened the workspace's active
tab; and a session the host list opens in-page read the pane only from
the shell route, which never has it.

Fixes #34235
2026-11-02 11:40:45 +00:00
Neil 51cb2f189c refactor: organize native chat input and transcript owners (#37334) 2026-11-02 03:14:58 -08:00
Kelvin Amoaba a8ccf3bc68 fix(mobile): paint the chat transcript and tab strip scrollers opaque (#36905)
On a Nothing A065 (Adreno 730) the transparent pixels of these two
scroll layers turn black while a selection handle is dragged. Fill each
with the colour already behind it so the layer has nothing to drop.

Refs #36553
2026-11-02 10:02:47 +00:00
Kelvin Amoaba 016530156c fix(mobile): back from a session lands on its host's session list (#36956)
* fix(mobile): back from a session lands on its host's session list

A session opened from Home's "Jump back in" or a notification replaced the
host list it had just mounted, so Back went to Home. It is now pushed over
that list.

A session opened from the host list lives inside the list's own page, and
the stack holding it has one screen, so the iOS edge swipe belonged to the
parent screen and popped the whole host to Home. While the page claims Back
the parent's swipe is turned off too, and a left-edge pan on the shell view
sends Back to the page.

* fix(mobile): keep the host swipe off until its last page claim ends

Count claims per parent screen instead of guessing whether a shell is its
stack's root, and measure the back edge from the shell's own left edge so
a landscape safe area does not hide it.

* refactor(mobile): share the session route name and write the host swipe once per claim run

* test(mobile): give the catch-all screen mock a parent navigator
2026-11-02 10:01:47 +00:00
Brennan Benson 4343dc212a fix(native-chat): report missing saved conversations once (#37189)
* fix(native-chat): report missing saved conversations once

* fix(native-chat): keep failures of answered Claude sends and translate the missing-conversation row

A Claude result settles its own send before the journal sees it, so a
failed send with no echo yet lost its owner and its failure row. The
result now carries the send it answered. Desktop and phone rows also
show the missing saved conversation sentence in the reader's language.

* fix(native-chat): keep failures of Claude results that name a user message

A root failure result that names a user message answered accepted input, so it keeps its row even when that send's waiter was retired, in doubt or ambiguously written. Only a result with no turn, no started send and no named user message (the pre-init missing-resume capture) is left to the host's final startup row. This replaces the per-frame settlement carry, so the acquisition and sign-in tests return to main.

Also ship the new missing-conversation sentence in the runtime English catalog.

* fix(native-chat): leave only a starting Claude session's failure to the startup row

A Claude failure result with no turn now writes no row only while its own
session is still opening (initialize and resume catch-up). Once open
succeeds, every failure result is reported as before, whatever send
evidence it carries, so per-send ownership checks are removed.

* fix(native-chat): fail a starting Claude session with the startup failure it reports

A turnless failure result that names no user input or resumed turn, arriving
while its own acquisition is still starting, now fails that acquisition's open
(initialize and resume catch-up) with Claude's own diagnostic; only then is its
provider row left to the host's final startup row. Results naming input, and
every result once open succeeds, keep main's reporting. The missing-conversation
classifier is shared by stderr and the result's errors, so the typed refusal
ends in one attempt whichever arrives first; other reported startup failures
stay retryable through the existing provider-request error.

* fix(native-chat): keep a Claude startup result's row once another failure ended the start

A Claude startup failure result was still taken by its acquisition's startup
outcome after initialize, a transport fault or an unexpected exit had already
failed that start, so its diagnostic was neither shown nor kept in the final
failure. The outcome now declines once the open fails by another route or the
exit is observed (synchronously, before buffered frames drain), so such a
result keeps its row as on main. It still takes a repeated result it already
accepted, and a result whose refusal the ending exit already carries; a Stop
still owns its start.

* fix(native-chat): report a Claude start's first ending cause from its open

The startup outcome now records the first cause that ends a start: an
accepted startup result, the raced initialize or catch-up rejecting, a
transport fault or unexpected exit, or any other open failure. That cause
rejects the pending race, open() refuses success after it, and the open
rejects with it, so a hidden result is always the open's error and any
other result keeps its row.

* test(native-chat): check the startup rejection with a type guard instead of an assertion
2026-11-01 22:46:57 -08:00
Brennan Benson f9a4ba6225 Make phone Send follow the paired desktop setting (#37315)
* Make phone follow-up delivery follow paired desktop

* Keep the paired desktop's follow-up setting live through a server outage

The phone now keeps listening to the paired desktop's Queue follow-ups
setting while a chat is open, even when the workspace's server relay
drops, so a desktop toggle during the outage is used by the next Send.
The chat reuses the route's existing paired-host connection instead of
acquiring it again per chat, and the follow-up tests load and typecheck.

* Keep the chat lock-reason helper out of modules the desktop tests import

The overlay lock-reason helper moves to its own file so the shared
eligibility module no longer reaches the chat view, which pulled the
phone's UI types into the desktop end-to-end typecheck. The reconnect
test now drops and restores the client's own connection, and checks the
preference stream closes with it and reopens with one fresh read.
2026-11-01 21:40:47 -08:00
Brennan Benson 0bf96e0d7a Show a GitLab MR's pipeline result even when it has no jobs (#37177)
* Show failed pipelines and check suites without jobs

* Use the parent pipeline as the GitLab checks verdict

The MR's own pipeline status now leads the Source Control Checks panel,
the MR dialog and the phone checks badge whenever the details reply
carries it, even when the returned jobs are empty, partial or all
passing. Job rows and counts stay a separate breakdown. The parent
follows pipeline-level policy (required manual is pending, canceled and
skipped are not failures, mergeable manual is neutral) from one shared
rule, and it is a provider link rather than an expandable job, so it
never shows a details error with Retry. A failed parent leads the
triage strip and joins the Fix prompt by name and link.

Drops the GitHub zero-run failed check-suite rows from this change;
existing approval-required suite rows are unchanged.

* Name the GitLab pipeline outcome and keep its verdict in one rule

The host now settles the parent pipeline's verdict with the same rule
and reply that produce the MR status, so a manual pipeline on older
GitLab reads pending everywhere. The phone checks badge names the
pipeline outcome (Pipeline passed/failed/pending) instead of an
unlabeled one-item count; job wording without a parent is unchanged.
The desktop parent row's status is localized, and a failed MR-details
read still shows its error beside a kept parent with no jobs.

* Keep Fix for failed GitLab jobs and treat waiting_for_callback as pending

The triage strip shows again when a returned job failed under a passing
parent pipeline, so its Fix stays available; a failed parent still
leads. A waiting_for_callback pipeline now reads pending instead of
neutral, in the MR status and the parent pipeline alike.

* Mark the checks-panel action test fixture cast as safe

* Pause the pipeline row spinner offscreen and under reduced motion
2026-11-01 21:39:18 -08:00
Neil 9b39188021 refactor: organize session option and conversation owners (#37289) 2026-11-01 21:33:42 -08:00
Brennan Benson a08ac11607 Show draft and restricted GitHub Project items (#37224)
* Preserve repositoryless GitHub Project items

* Keep only draft and restricted Project items without a repository

Key the repository-scope exemption on item kind on desktop and phone so
an older host's content-less Issue/PR rows stay hidden as before. Draft
titles, cards and bars stay non-interactive with no row browser icon;
the toolbar's Open view in GitHub is the Project-level action. Phone
labels restricted items "Restricted" to match desktop. Normalization
assertions move to a main-process test so renderer tests no longer
import main code.

* Cover draft Status normalization and phone restricted-item copy

Restore the check that a draft's single-select Status survives
normalization, and render the phone Project list and detail drawer with
a draft and a restricted item using the real status labels.
2026-11-01 20:05:48 -08:00
Brennan Benson 8cbd822e4c Keep readable conversations out of Session History warnings (#37211)
* Keep recovered conversations out of history warnings

* Name the agent when a History conversation is too large to load

A conversation whose only records exceed the transcript record limit now reports its own coded reason naming the agent and suggesting resuming it in that agent, instead of the generic session-metadata message. Adds a rendered banner test and a non-user Codex case.

* Build History banner test values without type assertions

* Name the conversation's writer in the too-large History reason

Labels the reason with the parsed agent so an OMP transcript found under Pi's folder names OMP, ships the new key in the English runtime catalog, and renders the reason in the phone's History panel test.

* Cover the phone History notice for readable results and Spanish

Test-only: a ready result without issues shows no skipped notice, and the too-large case keeps its English reason after switching the phone to Spanish while the count is translated.
2026-11-01 19:48:40 -08:00
Brennan Benson 5020bfead6 Keep Session History open when a chat workspace was deleted (#37200)
* Keep deleted-workspace chat Resume in History

* Address review: keep notification bounce, announce History toast, tidy refusal outcome

* Fix mobile type narrowing in History open failure

* Re-measure mobile web bundle sweep after History notice import removal
2026-11-01 19:31:05 -08:00
Brennan Benson 347e9ca5d3 Phone Automations keeps every automation it can read when a newer desktop sends unknown values (#37169)
* fix(mobile): keep readable automations when a newer host sends unknown values

The phone read the host's automation list, run history and editor inventories all-or-nothing, so one row with a value this build doesn't know (a newer agent, surface or host kind) blanked the whole Automations screen. Read each list row by row with the shared salvage reader and the desktop reader's ownership rules, keep automations whose agent this build doesn't know (labelled by id, validated by the host), and read an unknown default agent as unset.

Tracked in STA-13196.

* fix(mobile): keep automations with a newer surface, summary or run host

Plan check follow-up: the phone never writes the surface, so an unknown one keeps its row and skips the phone-side argument pre-check like an unknown agent; an unreadable last-run summary reads as none, as on desktop; a run's host id is display-only, so a newer host kind keeps its run.

Tracked in STA-13196.

* fix(mobile): keep an unknown saved agent out of writes and never read an unreadable run or pane as gone
2026-11-01 19:23:07 -08:00
Brennan Benson a1d30fbd77 fix(mobile): keep the keyboard open when a tab tap opens its details card (#36866)
* fix(mobile): keep the keyboard open when a tab tap opens its details card

Tracked in STA-13199.

* fix(mobile): keep the keyboard open when the session title opens its details card

The session title opens the same details card as a tab, but sat outside every
keep-focus container, so its tap moved focus off a focused composer or terminal
input and closed the soft keyboard. Attach the existing keep-focus helper to the
title button so the tap leaves the field focused, as tab taps already do.

* fix(mobile): keep the keep-focus helper safe where there is no DOM

The session title now attaches the keep-focus helper, and the title renders in
renderers without a DOM, where checking against HTMLElement throws. Check that
HTMLElement exists first, as other mobile code already does.

* test(mobile): use a type-only namespace import for the react-native mock type
2026-11-01 19:22:42 -08:00
Brennan Benson f037753ee3 Keep chat pickers usable while options recover (#37168)
* Keep chat pickers usable while options recover

* Show only the current process's reported permission and effort after a restart

When a native chat's agent restarted, the first frame at the new process could still show the old process's reported permission (for example "Full access" on an Own chat) as pickable, then flip to unknown a moment later. A reported value now counts only while the options answer that carried it belongs to the current process, on desktop and phone.

Also updates the restart tests: a pick made while the new process's options read is pending or failing goes to the new process on both desktop and phone.
2026-11-01 19:19:11 -08:00
Neil 1df33f7b96 refactor(mobile): group bottom drawer ownership and tests (#37272) 2026-11-01 18:40:34 -08:00
Neil b69963356d chore(terminal): bump xterm to 6.1.0-beta.336 and regenerate patches (#37266)
Port the xterm, webgl, search, serialize and image source patches to upstream
08829c7. Where upstream fixed the same bug (#6204 mouse NaN guard, #6226 warm-up
cancel on dispose, #6235/#6237 serialize width clamp) take upstream and keep only
Orca's remaining delta (domContainer warm-up gate, clipped wide-cell blanking).
Bump mobile's webgl subset patch alongside. Drop serialize fuzz seed normal:5,
which now round-trips.
2026-11-01 18:05:58 -08:00
Kelvin Amoaba 156cf8fc9a chore(mobile): bump to 0.0.62 and Android versionCode 26 (#37253) 2026-11-02 00:54:19 +00:00
Brennan Benson 11336da831 feat(mobile): give Tasks and Automations their own sections on Home (#37218)
* feat(mobile): give Tasks and Automations their own sections on Home

Home's bottom bar squeezed Tasks, Automations and New workspace into
three equal buttons whose labels cut off on phones. Tasks and
Automations now each get a section under Desktops, matching the old
Tasks card, and the bar keeps New workspace at full width. The
desktop's phone preview is redrawn to match.

* fix(mobile): neutral Tasks subtitle and a preview that shows both sections

The Tasks row said "Issues and pull requests", GitHub's wording, to GitLab,
Linear and Jira users too; it now reads "Browse your issues and reviews".
Section subtitles wrap to two lines so translations and large text aren't
cut. Each section now owns its desktop picker.

The desktop phone preview cut off the new sections in its narrow frame and
in shorter windows. It now shows two Jump back in rows, and drops the extra
rows when the frame is narrow so Tasks and Automations stay in view.

* chore: drop unrelated pnpm-lock.yaml churn from the main merge
2026-11-01 16:12:16 -08:00
Kelvin Amoaba 2e6d66077f fix(mobile): keep Resolve and its feedback after the PR tab's conflicts box went away (#37234)
The diff-review dock has no next-step bar, so its bottom action now offers
Resolve with <agent> for a conflicting pull request, with the launch notice.
In the hub the bar shows its agent launch notice on the Pull request tab
too, since the removed box was the one that showed it there, and an Unlink
failure reaches the bar's notice now that the PR tab has no footer.
2026-11-01 23:55:20 +00:00
Brennan Benson 9b15222da6 Keep OpenCode's default effort visible after a reply (#37159)
* Show the native default effort for OpenCode models

* Show the effort OpenCode 1.x actually runs when none is picked

OpenCode 1.x ACP runs a listed default variant, else the first listed
one, so declare that same variant instead of a no-override Default. The
draft and launch default stay as on main; the resting fallback now shows
it too. Shared declared-effort consumers expect no effort for a readback
without that model's menu.

* Name the recorded OpenCode listing test for what it checks
2026-11-01 15:51:59 -08:00
Kelvin Amoaba 03abca65dc feat(mobile): outline every text field at 3:1 with a focus ring, and drop the composer shadow (#37221) 2026-11-01 23:39:33 +00:00
Kelvin Amoaba 56e83655b0 fix(mobile): one bottom action on the PR tab, and conflicts said once (#37231)
The Source Control hub's next-step bar is now the only bottom action on the
PR tab: the tab body takes its footer from the caller, and only the
diff-review dock passes the old bottom action. The legacy Conflicts box is
gone, since the gate row and the bar's Resolve already cover it, so a
conflicting PR no longer says so four times. The bar keeps its reason line
only where its button does not name the blocker.
2026-11-01 23:36:51 +00:00
Kelvin Amoaba f7047a8fc7 feat(mobile): redesigned Changes tab with file-first rows and swipe to discard (#37214)
Rows lead with the file name and put its folder under it, so names stop
truncating. The whole row opens the diff, one quiet button stages or
unstages, and discard moves to a left swipe that still asks first. A
status line, a Commits row and a conflict banner with Abort sit above
Uncommitted and Staged sections that carry Stage all and Unstage all.
The rarer git actions move into the header's grouped menu.
2026-11-01 23:17:10 +00:00
Kelvin Amoaba f41f72a4f3 fix(mobile): keep the image viewer's close button out of the iPhone Duo status column (#37203)
The close button sat at a fixed 16pt from the right edge and ignored the
window's right safe-area inset, which on the iPhone Duo is the status
column holding the clock and the camera. Offset it by that inset, and size
it to 44pt itself because page Pressables ignore hitSlop.
2026-11-01 22:49:46 +00:00
Kelvin Amoaba 7f9940e937 fix(mobile): show the folder icon when a project image fails to load (#37202) 2026-11-01 22:43:03 +00:00
Kelvin Amoaba ac99f1cb39 fix(emulator): list only the worktree's attached emulators, iOS and Android (#37127)
* fix(emulator): scope emulator list to the worktree's sessions

emulator list ignored --worktree and returned serve-sim's global iOS helper list. It now lists the session registry's attached sessions (iOS and Android) for the selected worktree, or every worktree's for --worktree all.

* fix(emulator): drop stopped devices before listing sessions

* fix(emulator): point the no-active hint at emulator devices

* test(emulator): assert list results, not serve-sim calls

* refactor(emulator): prune stopped devices inside the registry listing
2026-11-01 21:34:03 +00:00
Kelvin Amoaba dc5cfd945d feat(mobile): keep the PR tab live, show each thread's code and ask the agent to fix bot findings (#37023)
The PR tab and the Checks and Comments screens refresh by themselves while
they are open and the app is in the foreground, on desktop's checks-panel
cadence (policy moved to src/shared). A failed background read keeps the
PR on screen and backs off instead of replacing it with an error.

Review threads show the lines they are about: the host forwards the tail
of each thread root's diff hunk, and mobile numbers it back from the
thread's line. Bot findings get "Ask <agent> to fix", which launches
desktop's Resolve comments prompt (moved to src/shared) for that thread.
Fix and Ask buttons name the agent that would start.
2026-11-01 21:23:53 +00:00
Kelvin Amoaba ebe94bc32e feat(mobile): rebuild the PR tab around what is blocking the merge (#36999)
The PR tab now leads with the PR's identity, one row per merge gate
(checks, unresolved threads, approvals, conflicts) that opens the screen or
sheet that resolves it, a changes card and a collapsed description. Close,
Unlink, Auto-merge, Edit title and Copy link move into the ⋯ menu.

Checks and Comments become pushed screens: failures open with their
annotation and Fix / Rerun / Open / Log on the failure, running checks
next, passed folded; comments filter by Unresolved / All / Hide bots with
Resolve and Reply on each thread and a comment box at the bottom.

Merge opens a sheet that lists only the methods the repo allows, starting
on its default. Reviewers move into a sheet with search to add and remove.

Every Create PR entry point opens one sheet: title and description seeded
from the branch's commits (shared seed rule in src/shared, GitHub's own
default), Write with AI, base picker and draft. It pushes first when
needed, works for all five providers and lands on the PR tab for GitHub.
2026-11-01 21:08:49 +00:00
Brennan Benson 42bdeffbe4 Move chat readers to the newest saved step after a no-op save (#37118)
* fix(chat): move forward readers to the covered tip after a no-op save

A write whose fold changes nothing stores no outcome record, so its
sequence never appears in a forward read. Readers placed themselves at
the last returned row and stayed behind the live cursor, so open chats
re-read an empty page and recomputed the prompt projection on every
later delivery until the next real save.

Forward journal reads now report the highest sequence they covered.
History pages move there when the read was complete, prompt reuse and
native responses compare against it, and a read cut short by its limit,
byte budget or damage still stops at the last returned row.

* fix(chat): append unlimited outcome reads without spreading, and report coverage from the mobile journal fake

* fix(chat): skip the retention scan for batches that change no journal items
2026-11-01 12:48:36 -08:00
Kelvin Amoaba 78484aac31 feat(mobile): one next-step bar under both Source Control tabs (#37104)
* feat(mobile): one next-step bar under both Source Control tabs

Changes and Pull request are the only segments. A bar at the foot of both
shows the branch's one next action: the commit box, push or pull, create
the review, resolve or fix with the workspace's agent, merge when ready,
merge, or why it can't. Commits opens as a pushed screen.

* fix(mobile): keep Merge reachable and show bar failures on both tabs

* test(mobile): expect the two Source Control segments in the page render test
2026-11-01 20:17:11 +00:00
Brennan BensonandClaude Opus 5.5 ad864a6ec7 Show a card in the chat when its agent hands work to another agent (#36848)
* Show a card in the chat when its agent hands work to another agent

An agent that hands work off with 'orca agent launch' from a native chat
now leaves a 'Handed off to agent' card there, linking to the new chat or
terminal, the way a supervised worker-start leaves 'Started worker'.

The CLI names its chat on agent launches (same-host only); the host records
a display-only agent-handoff item after a successful launch with a submitted
prompt, once per launch operation. Nothing about the card can refuse or delay
the launch.

Tracked in STA-13209.

* Keep orca commands working in a native chat that has no terminal handle

The launch-caller evidence read the host stamp off an absent evidence object, so every orca command from an ordinary native chat threw before sending. Adds CLI tests for which requests name the launching chat, restores the lockfile to the base, and fixes the Korean heading.

* Read a card's heading from its creation flags together

A caller passing only the started flag drew a handoff as Started worker; the heading now takes the message's flags as one argument.

* Show the handoff card for every agent a chat launches

A launch without a delivered task now records the card too, with no task text, as the common pattern records every agent a chat creates. The handoff tests now run the real chat host and journal: one card per launch operation, none on replay, a removed card stays removed across a restart, and the clock is fixed.

* Head a launch card Started agent when no task reached the new agent

Handed off to agent now appears only when the card carries a task; a card for an agent started with no task (no prompt, a draft, or a prompt that wasn't delivered) reads Started agent. The heading is derived from the card's text, so nothing new is saved. Also drops a self-launch check the launch path already refuses first.

* Show the handoff headings on the phone's agent cards

The phone card passed only the started flag, so with the new heading rules it would draw every creation card as a plain message. It now passes the message and has a heading for every case, so a missing one fails the build. The heading function now requires the message's creation facts, so no caller can leave them out. Adds the phone strings in every language, and the Japanese "Started agent" now uses the catalog's term for agent.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-01 12:08:34 -08:00
Neil 5228bff55c refactor(mobile): group web bundle transfer owners (#37124) 2026-11-01 11:43:21 -08:00
Kelvin Amoaba bf48d6665f feat(mobile): a commit's files open in the diff screen (#37113)
Tapping a file on the commit page now opens the shared diff screen for
that file in that commit (openDiffForFile kind 'commit'), in today's
Commits tab and inside the hub's Commits page.
2026-11-01 19:41:06 +00:00
Kelvin Amoaba a3efdcb21b feat(mobile): GitHub review threads, viewed sync and line comments on the diff screen (#37073)
* feat(mobile): GitHub threads, viewed sync and line comments on the diff screen

Committed files of a GitHub pull request now show its review threads under
their lines with Reply and Resolve, take their viewed state from GitHub and
sync the checkbox and Viewed · next file back through setPRFileViewed. A tap
or a long-press drag picks lines and opens a sheet that sends the note to
the workspace's agent through the existing send path, or posts it as a
review comment. Threads and GitHub comments appear only while the local
branch is at the PR head, the same contents desktop shows them on;
otherwise the file says to push. openDiffForFile takes an optional line for
a thread's Open in diff.

* test(mobile): use a type import for the line-mutations recording adapter

* fix(mobile): name the staged or unstaged side in the jump sheet's file labels
2026-11-01 18:38:23 +00:00
Kelvin Amoaba 24e7a0ba69 feat(mobile): list only this branch's commits, with a page per commit (#37050)
The Commits list now stops where the branch left its base. It groups
commits into Not pushed (hollow dots, with Push) and On origin, ends at
"Branched from <base>" with Update branch, and loads more past 50. A
commit opens its own page: message, author, date, pushed state, files
with +/-, and Copy SHA / Open on GitHub in the menu.

Older hosts ignore the new params, so the list falls back to the full
history without groups or the base marker.
2026-11-01 18:38:17 +00:00
Kelvin Amoaba 3edc370cdf feat(mobile): diff screen with jump to file, folded context and viewed/stage next (#36998)
The review screen becomes the one diff screen from the approved design.
It walks the Changes section the file came from (uncommitted, staged or on
the branch) or one commit's files, so 'N of M' and next/previous stay in
that list. The title opens a jump-to-file sheet built on the shared
source-control tree, with search and viewed boxes. Unchanged runs fold the
way desktop's diff does. The bar's main button is Stage · next file for
uncommitted files and Viewed · next file otherwise; Discard and Unstage move
to the menu. Filter chips, hunk jumps and Stage Reviewed are gone.

openDiffForFile also takes { kind: 'commit', commitOid, filePath }, read
through git.commitCompare and git.commitDiff.
2026-11-01 18:07:43 +00:00
Kelvin Amoaba 2e1f439620 feat(mobile): open every changed file on the diff screen (#36937)
Source Control rows used to open a file three ways: the review screen, a
desktop editor tab the session then switched to, or a text-only branch
drawer. Every row now calls one openDiffForFile entry point that pushes the
review screen. The drawer, the session tab reveal and their handlers are
gone; Open in Session stays in the review screen's menu.
2026-11-01 17:53:52 +00:00
Neil a82538c3be refactor(runtime): organize session records and runtime modules (#37070) 2026-11-01 08:59:05 -08:00
Kelvin Amoaba d6f54f3561 fix(mobile): size the queued-message panel to its rows and fit translated Save/Cancel (#36928)
The queue card's invisible full-text line-count probe overflowed its two-line
row and stretched the queue's scroll range far past the real rows. Clip it to
the card text.

The queued-message editor drew Save and Cancel labels inside 38pt round icon
controls, so translated labels spilled over each other. They are now pills that
hug their label and truncate only when the row runs out of room.
2026-11-01 15:50:58 +00:00
Kelvin Amoaba ba0ebfa010 fix(native-chat): show images agents read, and markdown images on mobile (#36953)
A Claude Read of a PNG returns only base64; the path is on the call. A shared
rule turns each finished file-read of a raster image into an image-ref under
the tool run header on desktop and mobile. Mobile chat prose now draws
https, data and absolute-path markdown images inline, every image in a
paragraph, through the existing host image read.
2026-11-01 15:50:29 +00:00
Kelvin Amoaba 0d724378df feat(notifications): separate agent needs-input alerts from finished alerts (#36941) 2026-11-01 15:46:46 +00:00
Kelvin Amoaba 77db0c2000 fix(mobile): build iOS from checkout paths with spaces (#37058)
* fix(mobile): quote expo-constants iOS build paths so checkouts with spaces build

Backports the expo-constants 58 quoting of the app.config build phase
(podspec bash -l -c argument and basename $PROJECT_DIR) to 55.0.17.

* fix(mobile): quote react-native-xcode.sh call in the iOS bundle phase

Expo SDK 55's template leaves the command substitution unquoted, so the
Bundle React Native code and images phase splits a checkout path with a
space. Expo's SDK 58 template applies the same quoting.
2026-11-01 15:43:35 +00:00
Kelvin Amoaba 17a43f64c3 fix(mobile): scroll wide tables sideways in the rich Markdown editor (#36966)
* fix(mobile): scroll wide tables in the rich Markdown editor instead of squashing columns

* fix(mobile): keep CJK table columns from shrinking to one character
2026-11-01 15:40:38 +00:00
Kelvin Amoaba 397d4443bd fix(mobile): keep focus when Android hides the keyboard for a tapped autocorrected word (#36947) 2026-11-01 15:40:25 +00:00