You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(codex): summarize every file of one multi-file apply_patch in native chat - #48038
If Codex edited two files in a single "apply patch" step, the finished chat turn showed no list of changed files. Doing the same edits as two separate steps did show the list. Now the single-step case lists every file too, with its own +/- counts, as long as the patch is small enough to reach the client whole.
What Changed
Before: a completed multi-file Codex fileChange was saved as the raw per-file diffs joined with \n, under the path N files. Nothing in the joined text said where one file ended and the next began. editFilesFromPatchText returned null for any file-count path, so the turn had no changed-files summary and no edit card.
After: the issue's case (a.txt and b.txt, one apply_patch) lists both files at +1 -1 each.
Mechanism:
Producer (main):codexFileChangePatch in the new src/main/codex/structured/items/codex-file-change-patch.ts gives each file of a multi-file change its own diff --git a/<old> b/<new> section with matching ---/+++ lines. A single-file change is still saved byte-for-byte as on main.
Add and delete content arrives as raw file text, so it becomes a whole-file hunk through the shared replacementHunk, which is split out of replacementPatch. That gives real counts and the right added/deleted kind.
A move keeps its destination: from kind.move_path, or from the Moved to: marker when the item was restored from rollout history.
Producer fallbacks: when the raw diffs total more than the 16 KiB wire head (AGENT_SESSION_WIRE_PAYLOAD_HEAD_BYTES), or a file name contains a tab or newline or has leading/trailing whitespace, the patch keeps main's plain join.
Client (shared): the Diff call now carries body.paths (the list of changed files). For an N files path, editFilesFromPatchText names files only when all of these hold:
the patch is untruncated;
it has exactly N sections, each opened by diff --git;
each section's source path matches paths[i].
Anything else returns null, which shows main's raw "Edited N files" row with "Show full output".
History:preserveSavedHistoryPayload now keeps a saved diff body as it is, so paths survives a history restore that has no changes.
Why
Both halves had to change. A parser-only fix has no file boundaries to work from, and a producer-only fix is still rejected by the N files early return.
The strict client check is what keeps the change safe:
A wire-cut head is not shown as a partial file list, and it keeps "Show full output".
An old headerless journal, or raw add content that happens to contain diff --git, cannot produce made-up file names.
This is a partial fix:
A multi-file apply_patch over about 16 KiB, raw or once signed, still shows the raw "Edited N files" row with no summary, as on main.
The same is true for file names that contain a tab or newline or have edge whitespace.
Sessions saved before this change are not repaired.
Listing every file of a large patch would need per-file summaries computed in the main process. That is left as a follow-up.
Original fix by @2SinceJuly in #48038; final version reworked during the bug bash. It also uses @bbingz's idea from #48033 of carrying body.paths into the Diff call input, here as the path check.
N/A: no layout, styling or component changed. The existing multi-file edit card and turn summary now render for this item, where before no card rendered. Seeing that needs a live Codex session and an Electron run, which were not done on this machine. The unit tests below assert on the same summary and card rows that the client renders from the wire form.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
src/main/codex/structured/items/codex-file-change-diff.test.ts runs the real path: codexJournalItem(fileChange), then agentJournalItemForWire, then itemBlocks, then buildEditSummaries / buildEditCards. It covers:
A mixed update (Windows path), add (CRLF), delete and rename in one fileChange. Each file gets its own counts, kind and card rows.
A rollout-restored rename keeps its destination.
An old headerless join, and an old journal whose first file is itself a git patch with N sections. Neither yields a summary.
Header-unsafe names (tab, newline, leading space, trailing space). These keep the plain join.
A history restore without changes keeps every file named.
A patch cut by the wire head keeps the raw row and its full-output link.
Runs on macOS, local:
vitest: src/main/codex/structured/items, src/shared/native-chat/tools and src/main/native-chat/agent-session-timeline (61/61), plus the codex history, tool-call-block and edit-card tests (10/10).
oxlint, oxfmt, the anti-slop and code-quality native plugins, ast-grep and the changed-code quality gate: all clean.
pnpm tc:node passed on the reviewed branch.
Performance
None that matters, because the producer runs in the main process once per completed Codex fileChange item (and once per item on history re-projection), not on a stream, keystroke or polling path. The renderer parse is cached per block.
Measured with tsx, locally:
Producer, typical 2-file patch: 0.0005 ms before, 0.0007 ms after.
Producer, adversarial case at the 16 KiB cap: about 0.12 ms before, 0.23 ms after.
Larger patches keep main's plain join, so a 15 MB delete plus an update stays at main's ~8.6 ms.
Renderer summary, typical 2-file patch: about 0.0025 ms.
Renderer cards, 16 KiB-class head: about 0.27 ms.
No sync I/O, subprocesses or polling were added.
Risk
Level: Low
The riskiest part is the stored text of a multi-file Codex fileChange item, which is now git-headed. Single-file items are byte-identical to main.
Mixed versions:
An old host with a new client sends a headerless patch, so the client shows the raw row as today.
A new host with an old client or mobile hits the old N files early return, so the raw row shows as today.
On new clients only, a raw multi-file Diff row now lists paths in its expandable input.
To back it out, do a plain revert. New multi-file rows saved in the meantime are git-headed text that the old client still treats as a raw N files row.
Review
Reviewed during the bug bash against the Codex source (~/projects/codex: item_builders.rsconvert_patch_changes / format_file_change_diff, and v2 PatchChangeKind with snake_case move_path).
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Security: header paths come from Codex's own change list. Names that the shared header parser would misread keep the plain join.
Cross-platform: only the a/ and b/ prefixes are stripped, so Windows and POSIX paths both survive (tested).
SSH and mobile: these use the same shared parser, and mixed versions fall back to the raw row.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Completed Codex file changes can produce per-file patch sections, and history projection preserves saved diff bodies. Native Chat passes changed paths into patch parsing and validates count-based multi-file patches. The timeline replacement patch function now delegates hunk construction to an exported helper.
Severity of issue fixed: Medium
Merge Risk: Low · up to 20307
Multi-file Codex edits should again show a per-file changed-files card. A rare patch whose hunk content looks like a file header can fall back to the plain "Edited N files" row. That is a cosmetic fallback with no data loss, so the merge risk is low.
Pre-merge checks: 4
Check name
Status
Explanation
Linked Issues check
[#48025] requires a completed Native Chat turn to list both changed files with +1 -1 each after one two-file apply_patch. At the reviewed head, codex-file-change-patch.ts (codexFileChangePatch) builds…
Out of Scope Changes check
The changed files lie on the path from the fileChange producer to the patch parser and the Diff call projection. Threading paths through structured-agent-session-tool-call-block.ts, native-chat-edit-c…
Title check
The title names the primary change: making native chat summarize every file of one multi-file Codex apply_patch. The changeset adds per-file git-style headers in the producer, a path-checked client pa…
Description check
The description follows the template: ELI5, What Changed, Why, Linked Issue (Refs #48025, with a note that it is a partial fix), Visual Proof (N/A with reason), Testing, Performance, Risk (Low, with r…
Full details: Linked Issues check
Explanation
[#48025] requires a completed Native Chat turn to list both changed files with +1 -1 each after one two-file apply_patch. At the reviewed head, codex-file-change-patch.ts (codexFileChangePatch) builds a multi-change body with a git-style header pair per file (diff --git, ---, +++) and the hunk body. The parser in native-chat-edit-patch-files.ts no longer returns null for a count caller path such as '2 files'. For a count path it accepts the patch only when it has exactly N sections, each opened by a git header, and each section path matches the changedPaths array. changedPaths comes from the Diff input paths, which the diff now threads through structured-agent-session-tool-call-block.ts and native-chat-edit-cards.ts. For the issue's two-update case, this path produces one summary entry per file. The two-separate-calls case uses single-file bodies, which keep their previous bytes. Residual uncertainty: the reader depends on the update diff from Codex containing hunks without file headers. I did not verify this against a live Codex payload, and the new tests were not re-read for this review, so the test evidence rests on the PR description. The end-to-end card rendering was not verified.
Full details: Out of Scope Changes check
Explanation
The changed files lie on the path from the fileChange producer to the patch parser and the Diff call projection. Threading paths through structured-agent-session-tool-call-block.ts, native-chat-edit-cards.ts, and native-chat-edit-normalize.ts is needed so the count-path rule can match changedPaths; this is connected to #48025. The history-projection change (preserving a saved diff body) and the provider-timeline-replacement-patch refactor (replacementHunk) support the per-file header generation. Discrepancy: the PR description says paths are not threaded through the call block and that the call-block shape is unchanged. The reviewed head does thread paths (input.paths when present). This is a description error, not an unrelated change. The PR description should be corrected. The description also says a count path is 'simply not usable as a fallback name', while the code applies a stricter rule (exact N git-headed sections matching paths, otherwise null). The code behavior is the connected one.
Full details: Title check
Explanation
The title names the primary change: making native chat summarize every file of one multi-file Codex apply_patch. The changeset adds per-file git-style headers in the producer, a path-checked client parser for N-files paths, and history preservation of paths. The title uses the fix(codex) convention and is specific, single-sentence, and under 80 characters.
Full details: Description check
Explanation
The description follows the template: ELI5, What Changed, Why, Linked Issue (Refs #48025, with a note that it is a partial fix), Visual Proof (N/A with reason), Testing, Performance, Risk (Low, with rollback notes), Review, Agent skill boundary, Notes, and Checklist. It explains the mechanism, the fallbacks, the mixed-version behavior, and the known limits. Two gaps remain: the Linked Issue section uses 'Refs' rather than the 'Fixes' line the template asks for, and the AI Disclosure section is absent, though the template says it applies only to outside contributors. The pnpm lint/typecheck/test/build checklist item is unchecked and not explained.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Data Integrity & Integration · Quick win
Keep each file's add, delete, and rename kind in multi-file patches.
The projection drops change.kind, and the per-file header pair names the same path on both sides. An added file therefore parses as edited, and a deleted file also parses as edited. A rename loses its previous path.
Required behavior:
Carry kind with each change.
For an added file, the old side must be absent: --- /dev/null before +++ b/<path>.
For a deleted file, the new side must be absent: --- a/<path> before +++ /dev/null.
For a rename, emit a diff --git a/<old> b/<new> header. The parser reads a bare pair with differing paths as a directory comparison, not a move. Apply this only when the provider supplies the previous path.
The checked-in fixtures do not show the app-server shape for add, delete, or rename changes. Confirm the kind values and any move field before writing the mapping.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 71c83cd1da8, with a test for each case.
The kind now travels with the change. The projection already carries it (kind: { type: 'add' | 'delete' | 'update', movePath? } from codex-rollout-item-projection.ts); fileChangeItem was reading only path and diff off each change and dropping it. It is now read and handed to the section builder.
The per-file headers state the kind:
add — --- /dev/null, +++ b/<path>
delete — --- a/<path>, +++ /dev/null
move — diff --git a/<old> b/<new> plus the header pair
update — the same-side pair as before
An add and a delete also get the hunk header the reader needs (@@ -0,0 +1,N @@ / @@ -1,N +0,0 @@) and have their raw content signed. Without that, unifiedPatchSections only opens a new file at a header pair that is immediately followed by @@ (native-chat-unified-patch.ts:179), so a trailing delete was folded into the previous file's section and lost. The counted rows then exceed the header's range, which is what summarizeUnifiedPatch would otherwise reject the section for.
Tests in codex-structured-item-translation.test.ts: one multi-file patch covering an add, an update and a delete asserting added / edited / deleted, and one asserting a move yields after.txt with oldPath: before.txt and renamed. Both fail without the change (the two files came back edited with no oldPath).
One thing I did not do: I left the kind out of the journal payload (input.changes on the tool call, and the codexJournalItem(...).body), so nothing persisted changes shape.
The reason will be displayed to describe this comment to others. Learn more.
Analysis chain
Script executed:
#!/bin/bashset -u
printf'%s\n''=== HEAD and commit ancestry ==='
git rev-parse HEAD
if git merge-base --is-ancestor 71c83cd1da8 HEAD 2>/dev/null;thenecho'Fix commit is an ancestor of HEAD';elseecho'Fix commit ancestry unavailable or not an ancestor';fifornamein codex-file-change-patch-section.ts codex-structured-item-translation.test.ts codex-rollout-item-projection.ts native-chat-unified-patch.ts native-chat-edit-patch-files.ts;doprintf'\n=== %s ===\n'"$name"while IFS= read -r path;doprintf'\n--- outline: %s ---\n'"$path"
ast-grep outline "$path" --items all 2>&1printf'\n--- numbered source: %s ---\n'"$path"
cat -n "$path"| sed -n '1,300p'done<<(fd --type f --fixed-strings "$name" .)done
#!/bin/bashset -u
printf'%s\n''=== Move-field references ==='
rg -n -C 3 'move_path|movePath'. --glob '!pnpm-lock.yaml'| head -n 300
printf'\n%s\n''=== Codex version references ==='
rg -n -C 2 '(@openai/codex|codex-cli|codex version|CODEX_VERSION|codexVersion)'. --glob '!pnpm-lock.yaml'| head -n 250
printf'\n%s\n''=== Approval detail implementation and tests ==='while IFS= read -r path;doecho"--- $path"
ast-grep outline "$path" --items all 2>&1
cat -n "$path"| sed -n '1,180p'done<<(fd --type f 'codex-file-change-approval-detail' .)
Length of output: 53484
web_search executed:
For the open-source Codex app-server protocol at codex-cli version 0.163.0, what exact JSON field name does an update file-change kind use for the move destination: move_path or movePath? Check the official versioned Rust protocol source or generated TypeScript schema, including serde rename attributes.
@2SinceJuly The add and delete cases now have kind-specific headers. The move case still needs a change:
The Codex CLI 0.163.0 app-server schema uses kind.move_path. codexFileChanges reads only kind.movePath, which the rollout projection and new test use. A multi-file move with the app-server shape is still reported as an edit. Please handle both spellings and test the app-server shape.
In codex-file-change-patch-section.ts, Line 38, wholeFileRows treats "\n" as empty. Adding or deleting a file containing one blank line therefore reports zero changed lines. Please distinguish that case from an empty file.
I’m not marking the original finding as addressed. I inspected the tests but did not run them.
📝 Learnings were not changed: only organization members or users with write access to this repository can add or remove learnings.
If you found this review helpful, would you consider giving us a shout-out on X?
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Preserve a file that contains one empty line.
When diff is '\n', Line 37 makes content empty. This branch then returns no rows. In a multi-file patch, an add reports +0 instead of +1; a delete reports -0 instead of -1.
Check diff === '' before removing the terminal newline. For nonempty input, split the remaining content even when it is empty. Add cases for both change kinds.
The PR objectives require accurate per-file line counts.
…ive chat
A completed Codex fileChange that touched several files was saved as one
headerless join under a "N files" path, and the client refused to name any
file from a count, so the turn showed no changed-files summary.
Each file of a multi-file change now gets its own diff --git section
(whole-file hunks for add/delete, rename destinations kept). The Diff call
carries body.paths, and a "N files" patch is summarized only when it arrives
whole with exactly N git-headed sections whose paths match. Larger patches,
header-unsafe names and older journals keep the raw "Edited N files" row.
Refs stablyai#48025
Co-authored-by: 2SinceJuly <[email protected]>
Co-authored-by: bbingz <[email protected]>
nwparker
changed the title
fix(codex): summarize every file of one multi-file apply_patch
fix(codex): summarize every file of one multi-file apply_patch in native chat
Nov 24, 2026
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Do not treat valid hunk content as a file boundary. · native-chat-unified-patch.ts:181
src/shared/native-chat/tools/native-chat-unified-patch.ts:181 Minor · Functional Correctness · Quick win
Do not treat valid hunk content as a file boundary.
A valid hunk can replace literal -- old with ++ new. Its patch rows are --- old and +++ new. If another hunk follows immediately, this condition treats those rows as file headers.
For a complete "2 files" patch, this creates a third section. The new count check then returns null, so neither file gets a summary.
Track the remaining old/new hunk lines before recognizing another header pair. Keep genuine header-only file boundaries valid after the preceding hunk ends.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 1775d4e2-84b1-43a8-9411-89bb7c4c1948
Commits
Reviewing files that changed from the base of the PR and between 71c83cd and 2030781.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
…ation going after the picker closes (#46245)
* feat(bots): inset the avatar description field and keep picture generation going after the picker closes
* fix(bots): an outfit pick is a newer choice than a picture still being generated
Rebased onto main's avatar outfits. An outfit-only pick now notes a choice in the
picture ledger and holds it open until its save is acknowledged, and the host bumps
avatarRevision on an outfit write, so a running Generate can no longer overwrite a
picked outfit. The color and outfit saves share main's useBotLookSave queue.
Also: the Generating tooltip stays controlled, "Close anytime" wraps inside the
tile, a failed Create no longer reopens New bot's picture popover, and Create's
picture handoff is one helper shared by New bot and Import.
* fix(bots): a look picked during a generated upload keeps its mascot, and a lost profile save no longer strands fresh uploads
A color or outfit pick made while a generated picture is uploading now sends the
mascot shown again, so the look wins whichever write the host takes first.
Before its bots are first listed, the host raises any record whose avatar revision is
behind its home's bot.json (a profile that lost its last save). A fresh read then
anchors a new Generate at the real revision, while a request made before the crash
is still refused.
* fix(bots): keep newer picture choices across import and settings
* Remove chat filter from group items (#47851)
* Remove group item chat filter
* Remove retired runtime catalog entries
* Fix phone group item refresh and paging
* Fix phone test array style
* Keep group asks fresh during phone refresh
* Clear departed group member reads
* feat(app-rail): space rail buttons out to a 40px rhythm (#48049)
Rail buttons sat on a tight 32px pitch. A 12px gap puts each 28px button in a
40x40 cell, matching the right activity bar, and the overflow slot follows.
Co-authored-by: m4air <[email protected]>
* fix(agent-permissions): show permission descriptions as tooltips (#42557)
* fix(agent-permissions): show permission descriptions as tooltips
Permission menus rendered a description line under every choice, which made
them tall. Rows are now one line; the description is a hoverable side tooltip
and always the row's accessible description. It renders inline on touch-only
screens, in narrow or zoomed windows, and on rows tapped in a mouse-opened
menu (first tap reveals, second selects). Disabled choices stay focusable so
their description can be read, and one Escape closes the tooltip and menu.
* fix(agent-permissions): comply with primitive style and test gates
* fix(agent-permissions): fit composer picker within zoomed viewport
* fix(agent-permissions): retain inherited permission row primitive
* fix(agent-permissions): constrain settings choices to viewport
* fix(items): read answers and drafts written with the pre-#47963 question line (#48041)
* fix(items): read answers and drafts written with the pre-#47963 question line
* fix(items): prefer this build's question heads before older ones across all questions
* fix(items): a longer old question head keeps its line over a shorter current one
* perf(items): work out each ask's question heads once, and skip head matching for a reply whose label does not end the line
* fix(i18n): translate English terms left in 64 Simplified Chinese strings (#48040)
Replace English terms that were left inside Simplified Chinese values
(Chat UI, API key, API token, issue, merge request, Linear ticket, Agent,
SSH config and 17 one-off terms) with the Chinese term zh.json already
uses for the same thing elsewhere, so one feature no longer has two names
in the Chinese UI. Only catalog values in zh.json change.
Fixes#48042
Co-authored-by: Neil <[email protected]>
* fix(dock): re-check Stop and Retry against the live dock, cancel held presses across a feed drop (#47951)
Follow-up to #47774. Before Stop is sent, including from Retry, it is checked against the live dock: same party, same dispatch, not settled, and stoppable by the same rule the row renders with. Settled retries read "Already stopped". Held mouse, touch and key presses on Stop are cancelled by a feed loss during the press, and each click activates as the press that produced it. Stop and Clear draw an inset focus ring that stays visible at 360px. Focus on the failure line passes to the next line or the dock toggle.
* test: clarify the agent-home guard error and run the reclaim test on Node on macOS (#47538)
Co-authored-by: jiang3ye <[email protected]>
* perf(browser): stream Save to this computer as binary frames so memory stays flat (#48059)
* perf(browser): stream a server download's copy as binary frames with acks
Save to this computer read the file as base64 JSON replies, so desktop
main's heap swung by hundreds of MB of short-lived strings on a big copy.
The host now sends the file as binary frames on the stream's own socket,
from a fixed set of buffers, at most a 2 MiB window ahead of the desktop's
acks; the desktop writes each frame and acks it. Memory no longer depends
on file size, and the copy is about five times faster.
* fix(browser): mark copy frames, refuse odd-sized ones, stop with the server's transport
* fix(browser): give up on a copy whose file stops arriving for a minute
* fix(browser): stop a copy whose file changes in place; finish short reads
* fix(mobile): make item thread comments, description and questions selectable on iOS (#48068)
Item thread comment bodies, the item description and ask question text
rendered MobileMarkdown without rangeSelectable. Inside the OTA shell
(react-native-web), a paragraph Text with selectable=false gets
user-select:none, so a long press did nothing. These call sites now pass
rangeSelectable={INLINE_TEXT_SELECTION}, matching the native-chat
transcript. A native (non-shell) Android render gets false and keeps
main's block selection.
Fixes#48039
* fix(bots): to stay silent a bot writes only NO_REPLY; any other words are its reply (#47962)
* fix(bots): to stay silent a bot writes only NO_REPLY; any other words are its reply
* fix(bots): only a tool that answered whoever waits stands in for the reply; every quiet note names the marker
* fix(bots): a thread request already answered with bot reply needs only the marker; leave the signed-off wait prompt as it was
* fix(bots): item-only silence only when no thread waits, and silence drops a memory's status line
* fix(bots): an item comment's silence also waits for any chat or thread still owed an answer
* fix(bots): a silent turn whose answer stays in Orca may keep one owner note before NO_REPLY
Turns answering a Slack, GitHub, Linear or Discord thread stay exactly NO_REPLY.
* fix(bots): the Home Chat owner note holds only when the turn answers no outside message; mail silence also waits for chat
* feat(shell): app rail destinations fill the whole page (#48045)
* feat(app-rail): rail destinations fill the whole page
With the experimental app rail on, Tasks, Automations, Artifacts, Skills
and Orca Mobile now fill the page beside the rail. The workspace list
collapses to zero width (its rows unmount; the saved open state and
width are never written), while the sidebar root stays in one keyed slot
so its dialogs, an unsaved Workspace details draft and the Workspace
Board keep their state across view switches.
On a rail page the sidebar toggle, Cmd+B, Open Workspace Board and the
Agent Dashboard shortcut return to Workspaces with the list showing,
then act. Settings keeps its current behavior.
Keyboard focus never drops to the page body: a page opened while a list
row had focus, or an overlay that closes back to a removed element,
hands focus to the page once it has loaded, unless something newer took
it. The titlebar controls keep focus when they move between the column
header and the page titlebar.
With the rail off, nothing changes.
* fix(app-rail): keep the hidden workspace list mounted on rail pages
A rail page used to unmount the workspace list rows. That dropped
unsaved edits in the list (the detected setup command, the Rename
group dialog), closed a row's open context menu under keyboard focus,
and made returning to Workspaces revalidate the Smart Sort order and
write it again.
The rows now stay mounted while a rail page hides the list: the list
keeps zero width and is inert and hidden from assistive technology.
Only collapsing the list yourself unmounts the rows, as before. Focus
inside the list when it hides moves into the page once it loads.
* fix(app-rail): keep the hidden workspace list out of keyboard handling
On a rail page the workspace list stays mounted but hidden, and two
keyboard paths still reached it:
- Its global shortcuts (focus worktree list, next/previous workspace,
collapse all projects) acted on the hidden rows, for example unfolding
Projects while Tasks stayed on screen. They now do nothing while a
rail page hides the list, and still work on Workspaces.
- Escape from a nested context-menu item (Copy > Path) left focus on the
page body, because the submenu is portaled apart from its menu. A
close now also counts when the last focused element left the DOM, so
focus moves into the page as it does for top-level items.
* fix(app-rail): recover focus only from a menu or dialog that owned it
Focus recovery on a rail page treated any focused element that had left
the page as stranded by the next overlay close. Clicking a control
outside an open, nonmodal menu could focus that control and remove it
before the menu reported its close, and focus then jumped into the
page.
Recovery now records which menus and dialogs own focus whenever focus
moves, including the parent menu of a portaled submenu, and acts on a
close only when the closing one owned it.
* fix(connectors): a bot's words before a trailing NO_REPLY post in every Slack conversation (#47896)
* perf(ipc): build the desktop runtime RPC registry once instead of per call (#47917)
* Check agent CLI updates after launch settles, a few at a time (#47923)
* perf(agent-cli-update): defer the startup CLI check and run at most three --version probes at once
* fix(agent-cli-update): give the update check a budget that covers queued version probes
* fix(agent-cli-update): cover the worst-case probe queue and let a failed check retry
* fix(i18n): translate 48 missing Korean strings for team-managed updates, plugins, and settings (#48053)
Korean users saw English in the team-required update card and restart
dialog, the install-on-quit prompt, required-plugin warnings, the plugin
catalog's team labels, the Orca account console row, and the settings
that a team turns off (Relay, Computer Use, artifacts, development
folders, bots). These keys existed in en.json but not in ko.json.
Each value is inserted after its preceding en.json sibling so the diff
is additions only, and every value keeps the English placeholder set.
A theme port uses 포팅 버전 so it does not read as a network port (포트),
and botsOffByTeam uses 이 실행 to match its botsOff and botPaused siblings.
Fixes#48054
Co-authored-by: Neil <[email protected]>
* Move the Linux port scan's per-file process lookup off Orca's main process (#47943)
* perf(ports): skip the Linux /proc fd walk when listening sockets are unchanged
The 30 s workspace port scan read every fd link of every process on the
machine to map listening sockets to pids. Reuse the last map while the set
of listening inodes and each owner's start time are unchanged; ownership
checks that authorize a kill still walk fresh.
* fix(ports): bound the Linux socket-owner cache to 10 scans and require our own sockets mapped
A socket handed to a child while its parent lives, or a root socket later
inherited by a user process, kept its inode and the cached owner. Walk again at
least every 10th scan and whenever one of our own sockets has no owner.
* fix(ports): revalidate cached Linux socket owners instead of trusting a live pid
A supervisor that handed its socket to a child and closed its copy stayed the
cached owner, so the port showed as external and its advertised URL was
dropped. On reuse, check that each cached owner still holds its socket and walk
processes started since the last walk, keeping the full walk's last-holder rule;
walk everything again after 10 scans or 5 minutes.
* perf(ports): list Linux socket owners with one ls in the port-scan worker
Replace the reuse cache with exact full-walk semantics: one ls -ln /proc/*/fd
in the port-scan worker lists every socket holder, and the owner is the last
holder in /proc's listing order, as the node walk picked. Falls back to the node
walk if the command fails.
* fix(ports): fall back to the node walk when the socket listing has no holders
* fix(ports): print only wanted socket holders from the Linux listing
Printing every socket fd could pass the worker's 2 MiB output limit on a large
machine, failing every scan into the main-thread walk. awk now prints only the
listener inodes plus a count of well-formed socket lines, which tells an
unreadable ls layout apart from listeners Orca can't see; holder lines must end
in ' -> socket:[N]'.
* fix(ports): retry a failed Linux socket listing every 10th scan instead of every scan
* fix(ports): keep the exact readlink walk for Linux kill and allow-list ownership checks
* fix(ports): stream one ls process through a worker-side filter for Linux socket owners
The sh | ls | awk pipeline left ls and awk running when a timeout or quit killed
sh, and awk's list search grew with sockets x listeners. The worker now execs a
single ls (LC_ALL=C), tracks it with the other scan children, and filters rows
line by line with a Set: only exact 11-field 'fd -> socket:[N]' rows count.
* fix(ports): run the Linux socket listing with only PATH and drop just an over-long line
TIME_STYLE or QUOTING_STYLE in Orca's environment changed ls's layout and
disabled the listing; an over-long path line split across chunks cleared the
current pid and lost that process's later sockets.
* fix(ports): list Linux fds with ls -q so a path with newlines can't forge a holder row
* fix(ports): ignore Linux socket holders that the /proc listing never saw
* fix(i18n): translate 64 missing Korean strings for skills, settings, the status bar, and the activity bar (#48057)
Add Korean translations for keys that were missing from ko.json, covering
skill replace/backup notices, shared Codex servers settings, usage status
bar rows, the activity bar reorder controls, and other recently added UI
strings, so Korean users no longer see English fallbacks there. Also add
the missing _one plural forms for counts.
Co-authored-by: Neil <[email protected]>
* Keep workspace deletion review at a stable size (#48065)
* Keep workspace deletion review at a stable size
* Animate workspace deletion file details
* Preserve disclosure panel links while collapsed
* fix(i18n): translate 36 missing Korean strings for browser cookies, server downloads, and port forwarding (#48055)
Korean users saw English in Settings > Browser's "Clear cookies" row and
its confirmation dialog, the download and print notices of pages
streamed from a paired server, browser-tab open failures, the paired
server port-forward toasts, the SSH session-host detail, and the
terminal link popover's refusal message. These keys existed in en.json
but not in ko.json, so i18next fell back to English.
Each value is inserted after its preceding en.json sibling and keeps the
English placeholder set. The SSH port-forward toast names the Ports
panel ("포트 패널") so it points to where forwarding is done.
Fixes#48056
Co-authored-by: Neil <[email protected]>
* fix(codex): never write a WSL distro's Codex config; regenerate the managed copy from it (#45247)
* fix(codex): never write a WSL distro's Codex config; regenerate the managed copy from it
* fix(codex): treat mapped-drive and drvfs distro configs as the distro's, write the baseline atomically, and recover a held config before the history pass
* fix(codex): recognize the extended spelling of a mapped distro drive, and leave the baseline and history writers as on main
* chore: drop an unrelated lockfile change
* test(codex): an unchanged WSL regeneration leaves the managed config untouched
* fix(codex): drop a held-back conflict for a ~/.codex linked or mapped into a distro
* fix(codex): skip the promotion write when a linked ~/.codex folder can't be resolved
* fix(cli): save downloads beside an older file of the same name instead of refusing (#48067)
* fix(cli): save downloads without --out next to, not instead of, an older file of the same name
* fix(cli): name a nameless or path-like download by its id, without Windows-dropped trailing dots
* fix(codex): summarize every file of one multi-file apply_patch in native chat (#48038)
A completed Codex fileChange that touched several files was saved as one
headerless join under a "N files" path, and the client refused to name any
file from a count, so the turn showed no changed-files summary.
Each file of a multi-file change now gets its own diff --git section
(whole-file hunks for add/delete, rename destinations kept). The Diff call
carries body.paths, and a "N files" patch is summarized only when it arrives
whole with exactly N git-headed sections whose paths match. Larger patches,
header-unsafe names and older journals keep the raw "Edited N files" row.
Refs #48025
Co-authored-by: Neil <[email protected]>
Co-authored-by: bbingz <[email protected]>
* feat(checks): show skeletons while checks and comments load (#47812)
Show layout-matched placeholders on the first checks and comments reads. Keep loaded results visible during refresh, distinguish unread from empty, and respect reduced motion.
* feat(app-rail): tighten rail button gap to 10px (#48084)
Keep the overflow slot height in step (28px button + 10px gap).
Co-authored-by: m4air <[email protected]>
* perf(bots): keep settled linked workers' reads between item views (#47911)
* perf(bots): keep settled linked workers' reads between item views
Item views and the usage-limit pass re-walked every linked Dispatch's
lineage on the main thread each read. Settled workers' reads are now kept
and dropped by the orchestration database's own row notices for any
Dispatch the walk read, so a refresh reads only running workers and
lineages written since.
* perf(bots): index a lineage's kept reads once, not per linked ref
* fix(bots): never keep a linked worker read whose Task or follow-ups couldn't be read
* perf(bots): keep only short reports with kept linked-worker reads
* fix(bots): batch insert lookups, copy kept values, and re-read hits a write dropped mid-read
* fix(bots): one status snapshot per linked-worker read, a report budget, and drops on another connection's writes
* fix(bots): keep only linked workers off a live pane, cap kept reports, and catch mid-read follow-ups
* perf(bots): validate kept linked workers with one fingerprint read per pass instead of tracking row events
* perf(bots): budget kept linked-worker reports, not entries, and skip long worker reads
* perf(bots): skip the fingerprint read when no write has landed since the last check
* fix(bots): drop a kept linked worker on its own Dispatch's notice, and check for writes after the fingerprint read
* fix(bots): drop kept linked workers on a deletion, copy reports only within the budget, and show reports written during a read
* fix(bots): re-read kept linked workers dropped during a read, keep finished workers after the reply, and allow long worktree paths
* fix(bots): drop kept linked workers on another connection's commit, and never restore one a failed re-read dropped
* fix(bots): re-check kept linked workers after each recovery read, not once
* fix(bots): re-check kept linked workers after a read awaits, keep only after the reply, and bound pending reports
* fix(bots): keep only plain follow-up chains, re-read a whole batch a write changed, and queue kept workers once
* fix(bots): re-check kept linked workers by fingerprint before a read replies, and never throw while keeping
* perf(bots): skip long terminal histories unparsed, and take keep slices off the queue's iterator
* fix(bots): read the database version once per linked-worker check
* fix(bots): check a linked-worker reply against the stamp its kept workers were checked at
* Preserve avatar choices across generation and repair revisions per bot
* Restored browser tabs load after a restart when an extension is installed (#47262)
* fix(browser): restored tabs wait for the profile's extensions before their first load
* fix(browser): a navigation during the held first load keeps the restored back list
* fix(browser): hold navigations made during the first-load wait and replay the newest
* fix(browser): keep the held page loading after its stop; restore only onto an empty page
* fix(browser): queue loads asked for during the first-load wait instead of stopping them
* fix(browser): keep a queued load's request options; reject it when the page closes
* fix(browser): replay any queued load with options directly
* fix(browser): a held page always waits until its profile's extensions are in the session
* fix(browser): closing a held page ends its hold and settles queued loads
* fix(browser): a navigation started outside loadURL during the hold still supersedes it
* test(browser): a held first load starts nothing until ready; move it to its own module
* test(browser): settle before the negative check; cover the load-ended fallback
* fix(browser): record startup extension ids at attach, so page-start needs no session registry import
* test(browser): note why the fake page and session casts are sound
* fix(browser): bound the in-session wait; a held load's deadline counts from its release
* fix(browser): one presence listener per profile, ended by the give-up; Stop cancels a held load
* fix(browser): the desktop attach passes the extension wait in, so the orcad bundle doesn't pull in extension code
* fix(browser): Stop ends the hold and stops real loads; failed extension loads end the wait; keep only a wait that gave up
* fix(browser): Stop with nothing loading settles the page load; later waits skip failed extensions; a wait is shared per profile attach
* perf(browser): every startup load's end, skipped or cancelled too, ends the page wait; keyed startup set
* fix(browser): Stop on a held restore keeps its history; a cancelled route initialization stops waiting for extensions
* perf(browser): a page's extension wait ends when the page closes; goto reports the closed tab
* fix(browser): don't hold a route page's blank bootstrap, which must finish within its mount deadline
* fix(browser): route navigations wait for extensions too; the attach's load deadline counts from attach again
* fix(browser): a route navigation rechecks live authority after waiting for extensions
* perf(browser): a cancelled route navigation stops waiting for extensions and doesn't load
* fix(browser): loads after Stop still wait for extensions; an overtaken route navigation doesn't load
* fix(browser): after Stop the saved history goes back only once ready; a waiting route navigation yields to a newer one
* refactor(browser): defer a page's guest until its profile's extensions are ready, instead of holding its first load
As a browser restores tabs only after the profile's extensions load: desktop tabs get their attach
marker, and This-device pages mount, only once the page's session has started its extensions. The
first-load hold on an attached guest (loadURL/stop overrides, queued loads, Stop and history
handling, route navigation waits) is removed.
* fix(browser): a waiting tab attaches after a remount, shows loading, keeps an address entered meanwhile; registration waits extend only on timeout; a failed This-device creation releases its extensions
* fix(browser): registration waits cover a wait that ended in their window and keep listening; closing a waking page cancels its wake; the newest address wins; Stop is a no-op while waiting
* fix(browser): cap the extension wait at 5 s, inside the deadlines around page creation; a page opened at the cap loads again once if its first load stalled; a closed waiting tab doesn't re-prepare
* fix(browser): the late-start retry keeps only live pages, yields to Stop and newer navigations, and is desktop-only; Stop during the wait keeps the page closed until Reload
* fix(browser): the late retry ends once the extensions are in the session and reloads a restored entry; Stop's marker yields to Reload or a new address
* perf(browser): no partition lookup with extensions off or for attached profiles; a refused This-device mount releases its extensions; any Reload undoes a waiting Stop; Stop-then-type reuses the deferred attach
* fix(browser): trim to the desktop defer: no Stop state while waiting, This-device keeps main's 3 s wait at navigation, and only restoring tabs load again
* fix(browser): a restoring tab loads again only if an extension loaded while its first request was in flight; no validation or Stop while a tab waits
* fix(browser): This-device blank first pages wait for extensions again (at most 3 s, as on main); no extra loading update before a tab's page exists
* fix(browser): retry only after the load that resets a session's loaders; an address typed during the wait opens without a second wait; partition lookup by index
* perf(browser): the late-retry extension listener is on only while a page still waits on it
* perf(browser): a routed page's session finds its source profile by its route, without scanning saved profiles
* refactor(browser): drop the one-time retry past the extension wait's bound; a stalled page keeps the existing notice and manual reload
* perf(browser): the extension presence observer ends with the startup load or the wait's bound
* Regenerate the avatar RPC parameter catalog
* Give New bot picture arrows room and keep the Generate draft (#47173)
Static analysis fails only on browser-session-registry.ts (301 lines), which already fails on main since #47262 and isn't touched by this PR. CI otherwise green; code review and UX-I passed on this head.
* Recover damaged avatar histories without blocking other bots
* Use the reviewed bot picture recovery messages
* Keep pristine bot manifests compatible with earlier homes
* Reject repaired picture histories missing their revision
---------
Co-authored-by: orca-remote-automation[bot] <359726236+orca-remote-automation[bot]@users.noreply.github.com>
Co-authored-by: m4air <[email protected]>
Co-authored-by: Jinwoo Hong <[email protected]>
Co-authored-by: Yohan <[email protected]>
Co-authored-by: Neil <[email protected]>
Co-authored-by: jiang3ye <[email protected]>
Co-authored-by: Kelvin Amoaba <[email protected]>
Co-authored-by: Neil <[email protected]>
Co-authored-by: Brennan Benson <[email protected]>
Co-authored-by: 2SinceJuly <[email protected]>
Co-authored-by: bbingz <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
If Codex edited two files in a single "apply patch" step, the finished chat turn showed no list of changed files. Doing the same edits as two separate steps did show the list. Now the single-step case lists every file too, with its own +/- counts, as long as the patch is small enough to reach the client whole.
What Changed
Before: a completed multi-file Codex
fileChangewas saved as the raw per-file diffs joined with\n, under the pathN files. Nothing in the joined text said where one file ended and the next began.editFilesFromPatchTextreturnednullfor any file-count path, so the turn had no changed-files summary and no edit card.After: the issue's case (
a.txtandb.txt, oneapply_patch) lists both files at+1 -1each.Mechanism:
Producer (main):
codexFileChangePatchin the newsrc/main/codex/structured/items/codex-file-change-patch.tsgives each file of a multi-file change its owndiff --git a/<old> b/<new>section with matching---/+++lines. A single-file change is still saved byte-for-byte as on main.replacementHunk, which is split out ofreplacementPatch. That gives real counts and the rightadded/deletedkind.kind.move_path, or from theMoved to:marker when the item was restored from rollout history.Producer fallbacks: when the raw diffs total more than the 16 KiB wire head (
AGENT_SESSION_WIRE_PAYLOAD_HEAD_BYTES), or a file name contains a tab or newline or has leading/trailing whitespace, the patch keeps main's plain join.Client (shared): the
Diffcall now carriesbody.paths(the list of changed files). For anN filespath,editFilesFromPatchTextnames files only when all of these hold:diff --git;paths[i].Anything else returns
null, which shows main's raw "Edited N files" row with "Show full output".History:
preserveSavedHistoryPayloadnow keeps a saveddiffbody as it is, sopathssurvives a history restore that has nochanges.Why
Both halves had to change. A parser-only fix has no file boundaries to work from, and a producer-only fix is still rejected by the
N filesearly return.The strict client check is what keeps the change safe:
diff --git, cannot produce made-up file names.This is a partial fix:
apply_patchover about 16 KiB, raw or once signed, still shows the raw "Edited N files" row with no summary, as on main.Listing every file of a large patch would need per-file summaries computed in the main process. That is left as a follow-up.
Original fix by @2SinceJuly in #48038; final version reworked during the bug bash. It also uses @bbingz's idea from #48033 of carrying
body.pathsinto the Diff call input, here as the path check.Linked Issue
Refs #48025
Reported by @zxdposter
Visual Proof
N/A: no layout, styling or component changed. The existing multi-file edit card and turn summary now render for this item, where before no card rendered. Seeing that needs a live Codex session and an Electron run, which were not done on this machine. The unit tests below assert on the same summary and card rows that the client renders from the wire form.
Testing
src/main/codex/structured/items/codex-file-change-diff.test.tsruns the real path:codexJournalItem(fileChange), thenagentJournalItemForWire, thenitemBlocks, thenbuildEditSummaries/buildEditCards. It covers:changeskeeps every file named.Runs on macOS, local:
src/main/codex/structured/items,src/shared/native-chat/toolsandsrc/main/native-chat/agent-session-timeline(61/61), plus the codex history, tool-call-block and edit-card tests (10/10).pnpm tc:nodepassed on the reviewed branch.Performance
None that matters, because the producer runs in the main process once per completed Codex
fileChangeitem (and once per item on history re-projection), not on a stream, keystroke or polling path. The renderer parse is cached per block.Measured with tsx, locally:
No sync I/O, subprocesses or polling were added.
Risk
Level: Low
fileChangeitem, which is now git-headed. Single-file items are byte-identical to main.N filesearly return, so the raw row shows as today.pathsin its expandable input.N filesrow.Review
Reviewed during the bug bash against the Codex source (
~/projects/codex:item_builders.rsconvert_patch_changes/format_file_change_diff, and v2PatchChangeKindwith snake_casemove_path).Agent skill upstream boundary
Notes
a/andb/prefixes are stripped, so Windows and POSIX paths both survive (tested).Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)