Skip to content

fix(native-chat): say each chat outcome once and drop internal-only surfaces - #24595

Merged
brennanb2025 merged 21 commits into
mainfrom
brennanb2025/chat-ui-duplicate-surfaces
Oct 6, 2026
Merged

brennanb2025 merged 21 commits into
mainfrom
brennanb2025/chat-ui-duplicate-surfaces

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 20 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1024 $\color{#cf222e}{\Huge{\mathbf{−}}}$​144 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​880
Prod 36 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​484 $\color{#cf222e}{\Huge{\mathbf{−}}}$​328 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​156

ELI5

The native chat was telling you the same thing several times, and sometimes in words that only make sense to Orca's own internals. This removes the repeats and the internal-only bits, so each thing is said once, in the place you'd look for it.

What Changed

1. Resuming chats after Orca restarts

  • Problem: After a restart, Orca offers to resume chats that were mid-reply. A single resume could report its outcome in up to four places.
    • On success you got a toast ("Resumed 1 chat and asked it to continue") on top of the note Orca already writes into the chat.
    • On failure you got the chat's note, a toast ("1 chat couldn't be resumed", with Show/Dismiss), the status bar entry, and the resume dialog's row.
    • Other toasts appeared too: "Continuation delivery is unconfirmed for N chats…" when Orca lost the answer, and "Dismissing the resume offer was not confirmed — it may still be in the status bar."
    • Some failure rows in the dialog read "Another Orca window or terminal still owns this session" or "Orca is still working out which process owns this session".
  • After: A resume ends with one toast saying what it did. That covers a resume you click (Resume in the dialog, or a row's Retry) and the automatic resume at launch (when "Don't ask again" is on). The chats it touched are usually off-screen:
    • "Resumed N chats";
    • "N chats couldn't be resumed", with Show, which opens the dialog;
    • "Couldn't confirm N chats were resumed", with Show, when Orca couldn't confirm the message went out;
    • a mixed result in that same single toast.
    • No toast for Dismiss or for Orca's own bookkeeping. "Continuation delivery is unconfirmed…" and "Dismissing the resume offer was not confirmed…" are gone, because neither asks you to do anything.
    • Each chat's own note still says what happened to it.
    • The status bar entry is the one summary of what's still waiting ("N chats to resume", "N chats failed to resume", "N chats to check"). Clicking it opens the dialog listing every affected chat.
    • If Orca loses the answer to a resume or a dismiss, it re-reads the list.
    • If a Resume request fails before Orca reached any chat, so no chat gets a note, those chats now show as "failed to resume" in the status bar and dialog. They keep the existing "Orca couldn't resume this chat" line and a Retry button. The resume's toast counts them as couldn't be resumed. Before, a toast that said only that delivery was unconfirmed was the only sign of this.
    • The two failure rows now read "This chat is open in another Orca window or terminal. Close it there, then retry." and "This chat isn't ready to resume yet. Wait a moment, then retry."
  • Mechanism:
    • native-chat-restart-action-notifications.ts now builds only the one outcome toast for a resume, whether clicked or automatic at launch. Its bookkeeping toasts are deleted, along with their strings in every locale.
    • continueNativeChatRestartOffer raises the toast for every resume, clicked or automatic at launch, after the host's answer is published, so its counts match the status bar and the dialog.
    • Dismiss only publishes the host's answer.
    • The host cannot record a failure that happens before it reserves anything, such as its record store failing to lock or write. So the window keeps an in-memory mark for chats a failed request named (native-chat-resume-unsent-requests.ts).
    • Every answer from the host re-checks the mark. It applies only while the host still offers that chat as a plain resume, and it ends on Retry, a successful Dismiss, or relaunch.
    • The real error goes to the renderer log.

2. Unrecognised agent events with no text

  • Problem: When Codex or Claude sent an event Orca doesn't model and the event carried no sentence, the chat showed a raw row such as "codex · notification:foo", with a "Details" section holding the raw event.
  • After: Desktop and mobile chats no longer draw such a row. The host still stores it, so features that read the stored event keep working. The Codex task list (the checklist and the composer's progress panel) is built from the stored plan-update event, which has no sentence of its own. These rows stay visible:
    • rows that carry the provider's own sentence;
    • failures and notices (any row with a tone), because a wordless failure is the only sign something went wrong;
    • records of a request Orca already answered for you (Codex request: rows, such as a declined MCP request);
    • Claude's output for a local slash command (/usage and similar). It arrives in a content field, and the host now uses that as the row's text. Rows saved before this change, or written by an older host, still show as they did.
  • Also fixed, in the same Codex code:
    • Codex keeps at most 8 unrecognised-event rows per turn, then adds one "N more provider notifications not shown for this turn" line.
    • The hidden rows still used up those 8. A turn could show only that line, and a later row with a real sentence could be crowded out.
    • Hidden rows now have their own silent limit and never produce that line.
    • Plan updates are no longer limited at all. Before, the task list stopped updating after the turn's 8th such row. That bug was already on main.
  • Also fixed:
    • A hidden row no longer splits one run of tool calls into two.
    • A finished turn no longer offers an expand arrow when everything behind it is hidden.
    • On mobile, which has no task list, a plan update no longer splits a tool run.
  • Mechanism:
    • One shared check, isWordlessProviderFrame (src/shared/native-chat-provider-frame-summary.ts), decides what counts as text-less. It matches a row whose only text is the host's "provider · kind" fallback label, minus the exceptions above.
    • Desktop leaves such rows out where a row's drawable content is worked out (native-chat-row-content.ts). That is also where the transcript decides whether a row takes a slot, so a hidden row leaves no gap. The task list is built before that step.
    • Mobile drops the same rows before it folds its transcript.
    • The Codex host uses the same check for its per-turn limits.
    • Older journals store Codex subagent calls as such raw rows. Hidden, they still count as the agent acting when deciding which subagent section stays open.

3. Approval card

  • Problem: Claude's tool-approval card showed "Ask rule: Bash(git push:*) · projectSettings", which describes Claude's permission settings, not the request you're deciding on. It also showed "Blocked path: …" in Claude's own wording.
  • After: On desktop and mobile, the card shows the request, its detail, the "Reason" line, and the path the request needs, as "Needs access to: ". That line appears only when the path isn't already visible on the card. For example, a git push that needs .git/config shows it; a cat of that exact file doesn't repeat it. The ask rule is gone.
  • Mechanism:
    • The ask-rule row is removed from NativeChatApprovalCard and MobileNativeChatPermission, and its field is dropped from the view types the cards are built from.
    • One shared check, approvalBlockedPathToShow (src/shared/agent-session-approval-blocked-path.ts), decides whether the path is already visible: the exact path, or its JSON-escaped form, appears as a whole path in the description, the reason, or the request detail. Both cards use it.
    • The journal still records both fields (see Notes).

Why

Chat UI should say a failure once, in one place, and never in Orca's internal terms. It shouldn't add messages the common pattern doesn't show unless Orca has a real need for them. The resume flow said every outcome several times. The raw provider rows and the ask-rule line showed internal or settings data you can't act on.

  • Which resume surface to keep: The status bar entry is the only way back to the dialog once it's closed, and the dialog is where Retry lives. Keeping them, and keeping only the one toast that answers a click, leaves one summary of what's waiting plus one reply to the action you took. Removing the status bar entry instead would leave no route back to the list.
  • Provider rows, store and hide: An earlier revision of this PR stopped the host from storing text-less rows. That broke the Codex task list, which reads its plan from exactly such a row. The rows are now stored as before and hidden only where a chat draws them. Anything that reads stored events keeps working, and the same check also hides rows already in a chat's history.
  • Why a text check rather than a mark the host stores: Rows already in users' history carry no such mark. The check over stored data is needed either way, so a stored mark would be a second copy of the same fact.

Differences from the common pattern

  • A resume, clicked or automatic at launch, gets one toast saying what it did. Intended: in the common pattern, continuing after a restart is an automatic setting that shows nothing. Here a resume acts on chats that are mostly off-screen, so it gets one short toast as feedback. The toast is the same whether you clicked or it ran at launch. In rare cases a resume gets no toast, for example when every chat it named had already moved on. Temporary: a follow-up, not yet filed, decides what to say there.
  • Resume outcomes are recorded inside each chat, as in the common pattern. The status bar entry and the dialog it opens are an Orca addition. Intended: here a resume is offered after every restart, not only when switched on, so the offer needs a home once the dialog is closed. A chat whose resume failed is therefore listed there as well as in its own note. Intended for now: the dialog is where Retry lives, and the chat may not be open. Whether to keep failed chats in the list is a separate product decision.
  • A Resume request that never reached the host is remembered by this window only, in memory, as in the common pattern for a failed resume. It shows in the status bar and dialog rather than in the chat, because no chat was reached. Intended.
  • Unrecognised provider events are kept out of the chat, as in the common pattern. The mechanism differs: Orca still stores them and decides at display time from whether the row has any text of its own, not from the event's type. Intended: stored rows feed the task list, and rows already in history need the same check.
  • A wordless provider failure still shows as a raw "provider · kind" row. The common pattern hides wordless unrecognised events even when they look like errors. Intended for now: a failure must never be invisible. Rewording these rows is a copy change outside this PR.
  • Wordless records of requests Orca already answered (declined MCP requests and similar) still show. Intended: they record something Orca did for you.
  • Claude's local slash-command output is shown. The common pattern hides that event. Intended: Orca's composer offers these commands, and their output is the answer you asked for.
  • Rows that carry the provider's sentence keep their "Details" disclosure with the raw event. The common pattern shows the sentence without the raw event. Temporary: removing the disclosure is a follow-up, not yet filed, to keep this PR a removal of text-less rows.
  • Older Orca clients keep drawing the raw rows. Against a host with this change they may draw more per turn than before, because hidden rows no longer share the visible limit and plan updates are no longer limited. Temporary: it ends as clients update. The stored rows are unchanged on purpose.
  • "Reason" stays on the approval card. The common pattern shows the reason as the card's question. Intended: it is the provider's own sentence about the request.
  • The ask rule is no longer shown, as in the common pattern. Intended.
  • The path a request needs is shown as text ("Needs access to: ") when the card doesn't already show it. The common pattern counts it only inside the session-wide grant ("Write 1 path") and never shows the path itself. Intended: you need to know what the request touches to decide, and the path often isn't in the command. "Allow for this session" grants that path's folder, as Claude suggests.
  • The ask rule is still stored and sent; only the cards ignore it. Intended: removing it would change what older clients receive.

Linked Issue

N/A (internal native-chat cleanup).

Visual Proof

Captured in two hidden, isolated test builds of Orca with a stand-in Claude agent (no real agent or account). A separate non-Claude test agent drove the app and took the screenshots. The two resume pairs (the first and the last) were re-taken after the Resume toast came back, on the M4Air test Mac: before = 3284b4c70c9 (where this PR now branches from main), after = this PR at 4641f1de37e, driven by Grok. The other five pairs were taken earlier on the Windows test machine: before = 44a2ee54bbd, after = ece1efe30d9, driven by opencode with deepseek-v4.1-flash; the toast change doesn't touch what they show. Commits after 4641f1de37e only fix the restored toast's French, Japanese, Korean and Chinese wording, make Show re-read the list before opening the dialog, and fix a test lint error. None of that changes these screenshots.

  • Resuming a chat after a restart. Orca was quit while a chat was mid-reply, relaunched, and "Resume 1 chat" was clicked in the resume dialog. Both builds show one "Resumed 1 chat and asked it to continue" toast, plus the chat's own notes ("Orca restarted, which stopped what you were doing…" and "Orca asked this agent to continue after a restart. Your own prompt was not re-sent."). This PR keeps that toast for a Resume you click, so before and after match here. A recorder running in the page saw that one toast and no other. These shots were taken before the toast was shortened to "Resumed 1 chat" and before the automatic resume at launch got the same toast; neither of those is captured in a screenshot.
    resume-result-before
    resume-result-after
  • Unrecognised agent events with no text (turn details opened). Before: raw rows "claude message:system:qa_unmodeled_event" and "claude message:qa_unmodeled_frame". After: no such rows.
    unknown-event-before
    unknown-event-after
  • Approval card. Before: "Blocked path: C:\qa\demo.git\config" and "Ask rule: Bash(git push:*) · projectSettings" under the reason. After: the ask rule is gone. These shots were taken before the path came back, so this "after" does not yet show the "Needs access to: C:\qa\demo.git\config" line the card now draws for this git push (the path isn't in the command). A re-capture on the Mac test machine was abandoned because that machine stayed overloaded. The new line is covered by the desktop and mobile card tests listed under Testing.
    approval-card-before
    approval-card-after
  • Output of a local Claude command such as /usage. Before: a raw "claude message:system:local_command_output" row with none of the usage text. After: the usage text is the row's text. It shows as one line and is cut off with "…" at the edge of the transcript; the full text is kept, but this row doesn't wrap it.
    usage-before
    usage-after
  • A hidden row in the middle of a run of commands. Before: two separate commands with a raw "claude message:system:qa_unmodeled_event" row between them. After: one "Ran 2 commands" group (opened here) and no raw row.
    split-before
    split-open-after
  • A finished turn whose only extra row is a hidden one. Before: "Worked for 1s" has an arrow that opens onto a raw row. After: "Worked for 1s" is plain text with no arrow.
    quiet-open-before
    quiet-after
  • A resume request that fails before it reaches the chat. To force this, the test build's resume bookkeeping file was locked after the restart, before "Resume 1 chat" was clicked. Before: a "Continuation delivery is unconfirmed for 1 chat. Open it to check before sending another message." toast, while the status bar still says "1 chat to resume". After: one "1 chat couldn't be resumed" toast with a Show button, and the status bar says "1 chat failed to resume". Show opens the dialog, whose row says "Orca couldn't resume this chat. Open it to continue manually." with Open chat and Retry. No "Continuation delivery is unconfirmed" toast or second toast appeared. After the lock was removed, clicking that row's Retry showed one "Resumed 1 chat and asked it to continue" toast (last image).
    fail-result-before
    fail-toast-after
    fail-show-dialog-after
    retry-result-after

Compared with the earlier set: those screenshots were taken on a Mac at c74299b4790, before the review fixes. The unrecognised-events and approval-card pairs were re-taken and show the same result. The resume pair was re-taken and now shows the toast this PR keeps for a Resume you click. The last four pairs are new.

Not captured: a Codex plan update still showing its task list, and the per-turn limit on Codex rows. The stand-in agent speaks only Claude's protocol, and no real agent was used.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

New or updated tests. Each one fails against the code without its fix:

  • NativeChatResumeOnRestartModal.test.tsx checks:
    • a Resume or Retry click raises exactly one outcome toast: success, failure with Show, or a mixed result;
    • Show opens the dialog;
    • the automatic launch resume raises exactly one of the same toasts;
    • Dismiss and lost-answer bookkeeping raise none;
    • failures appear in the status bar entry;
    • a Resume request lost before reaching any chat is reported once, as failed, until a host answer, Retry or a successful Dismiss ends it;
    • a failed Dismiss leaves it shown as failed.
  • native-chat-restart-action-notifications.test.ts and native-chat-resume-on-restart-outcome-toast.test.ts check the toast's counts and wording, and that a lost request with nothing to open has no Show.
  • native-chat-resume-failure-guidance.test.ts checks that the resume guidance never says "owns", "process" or "session".
  • NativeChatApprovalCard.test.tsx, MobileNativeChatPermission.test.ts, NativeChatStructuredSession.test.tsx, mobile-structured-agent-prompts-permission.test.ts and agent-session-approval-blocked-path.test.ts check:
    • the card shows the reason and "Needs access to: " when the path isn't visible;
    • it doesn't repeat a path already shown, but does show one that is only the start of a longer path;
    • the ask rule and its source never show;
    • both clients pass the path through to the card.
  • codex-structured-journal-translation-streams.test.ts checks, through the real host translation:
    • the stored Codex plan-update row still carries a plan the task list can read;
    • plan updates past the turn's limit are still stored;
    • hidden rows neither crowd out rows with a sentence nor produce the "N more … not shown" line.
  • NativeChatMessageList.task-list-frames.test.tsx, native-chat-provider-frame-summary.test.ts and unhandled-provider-frame.test.ts check:
    • a wordless unrecognised row is not drawn;
    • a wordless failure still is;
    • a plan update still becomes the checklist;
    • Claude's local command output is shown, both new and older-host rows.
  • native-chat-tool-fold.test.ts, native-chat-turn-fold.test.ts and native-chat-transcript-slots.test.ts check:
    • a hidden row doesn't split a tool run;
    • a turn whose only other row is hidden offers no expand arrow.
  • mobile-native-chat-render-data.test.ts checks:
    • mobile leaves out the wordless row and keeps the failure and the row with a sentence;
    • a plan update doesn't split a tool run.

Ran locally:

  • The touched desktop suites and their neighbours (114 files), plus the touched mobile suites.
  • Web and node typechecks.
  • The mobile typecheck. Its only errors are the build-generated modules, which a checkout without a build doesn't have.
  • oxlint, the changed-code quality gate, React Doctor, and the localization verify, extraction and coverage checks.

Not run locally: the real Claude CLI suite. This PR doesn't touch the Claude structured-session code.

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Older clients and mixed versions: Nothing on the wire is removed or renamed. blockedPath and matchedAskRule stay in the journal schema and are still published. Older desktop and mobile builds keep showing both in their old wording. The new cards show the path in plain words and ignore the ask rule. Hiding text-less provider rows is done by the client, so it works against older hosts too. Older clients keep showing those rows until they update.
  • Existing history: Text-less raw rows already saved in a chat's history are hidden too, because the check runs when a row is drawn.
  • Unmodelled items whose text sits in a field Orca doesn't read also have only the fallback label, so they are now hidden. For Codex that means review output, an image path and hook prompt text. For Claude it means tool_use_summary and memory_recall, which the common pattern hides as well. Today these show only as that label, with the text inside Details.
  • Where the "agent is still starting" error came from: Not changed. Pressing Stop while the agent starts is accepted and ends the start. An option picked before the chat has a connection is held and applied once it does; after that, the host waits for Claude to finish starting before applying it. Answering a prompt needs a running agent. So in a normal start that error can't appear. It only appears when Claude's start hangs past the request timeout, a real failure that is reported once.

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)
  • 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)

…urfaces

After a restart, resuming a chat reported the same outcome in up to four
places: a toast, the chat's own note, the status bar entry and the resume
dialog. Success also toasted, and a lost answer or unconfirmed dismissal
raised toasts of their own. The chat's note and the status bar entry (which
opens the dialog listing every affected chat) now carry it alone, and the
resume guidance no longer talks about which process "owns this session".

Provider events Orca does not recognise and that carry no words of their own
are logged instead of journaled as raw "codex · notification:foo" rows. Rows
with the provider's own sentence, failures, and records of replies Orca
already sent stay.

The approval card no longer shows the matched ask rule, its settings source
or a "Blocked path" line; it keeps the request, its detail and the reason.
… drawn

Dropping text-less provider events on the host also dropped Codex's
turn/plan/updated row, which the task list (checklist and composer progress
panel) is built from. The host now journals these rows exactly as before,
and desktop and mobile chats leave out a row whose only text is the host's
"provider · kind" label. Failures, notices, rows with the provider's own
sentence and records of requests Orca answered still show. A hidden legacy
Codex collab-call row still counts as the agent acting for which subagent
section stays open.

Claude's local slash command output is read from `content` for that one
event kind only, so it shows as the row's text instead of disappearing.
@brennanb2025
brennanb2025 marked this pull request as ready for review October 2, 2026 19:47
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Approval types and cards no longer include blocked paths or matched ask-rule details. Native chat filters wordless provider-frame rows, while Claude local-command output rows can use their content as row text. Generic Codex frame storage applies separate limits to wordless and drawn rows, and plan updates do not consume those limits. Restart actions consolidate explicit-click outcomes into one toast. The store tracks failed-to-send resume requests and refreshes the host offer. Codex collaboration call-frame rows count as output in the subagent live-frontier check.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 53.19% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 47 functions across 42 files. (6 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main native-chat changes: reducing repeated outcome messages and removing internal-only UI details.
Description check ✅ Passed The description is detailed and follows the template. It explains the changes, rationale, visual proof, and test coverage. The linked issue is marked N/A, which is consistent with the stated internal …
Full details: Docstring Coverage

Explanation

Docstring coverage is 53.19% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 47 functions across 42 files. (6 skipped: 6 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 4b4bcaab-2185-4f33-8145-16a69583950a

📥 Commits

Reviewing files that changed from the base of the PR and between 306b457 and c74299b.

📒 Files selected for processing (35)
  • mobile/src/session/MobileNativeChatPermission.test.ts
  • mobile/src/session/MobileNativeChatPermission.tsx
  • mobile/src/session/mobile-native-chat-permission.ts
  • mobile/src/session/mobile-native-chat-render-data.test.ts
  • mobile/src/session/mobile-native-chat-render-data.ts
  • mobile/src/session/mobile-structured-agent-prompts.ts
  • src/main/codex/codex-structured-journal-translation-streams.test.ts
  • src/main/native-chat/agent-session-wire/provider-frame-disposition.ts
  • src/main/native-chat/agent-session-wire/unhandled-provider-frame.test.ts
  • src/main/native-chat/agent-session-wire/unhandled-provider-frame.ts
  • src/renderer/src/components/NativeChatResumeOnRestartModal.test.tsx
  • src/renderer/src/components/native-chat-restart-action-notifications.test.ts
  • src/renderer/src/components/native-chat-restart-action-notifications.ts
  • src/renderer/src/components/native-chat-resume-failed-chat-watch.test.ts
  • src/renderer/src/components/native-chat-resume-failure-guidance.test.ts
  • src/renderer/src/components/native-chat-resume-failure-guidance.ts
  • src/renderer/src/components/native-chat-resume-on-restart-store.ts
  • src/renderer/src/components/native-chat/NativeChatApprovalCard.test.tsx
  • src/renderer/src/components/native-chat/NativeChatApprovalCard.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.task-list-frames.test.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/components/native-chat/native-chat-interactive-prompt.ts
  • src/renderer/src/components/native-chat/native-chat-subagent-delegation.ts
  • src/renderer/src/components/native-chat/native-chat-subagent-live-frontier.ts
  • src/renderer/src/components/status-bar/NativeChatResumeStatusSegment.test.tsx
  • src/renderer/src/components/status-bar/NativeChatResumeStatusSegment.tsx
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/native-chat-provider-frame-summary.ts
  • src/shared/native-chat-row-content.ts
💤 Files with no reviewable changes (6)
  • mobile/src/session/mobile-structured-agent-prompts.ts
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/components/native-chat-resume-failed-chat-watch.test.ts
  • src/renderer/src/components/native-chat-restart-action-notifications.test.ts
  • src/renderer/src/components/native-chat-restart-action-notifications.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Comment on lines +63 to +68
).filter((message) => !isWordlessProviderFrameRow(message))
}

/** Same rule as desktop: an unrecognised event with no words of its own is stored, not drawn. */
function isWordlessProviderFrameRow(message: NativeChatMessage): boolean {
return message.blocks.length > 0 && message.blocks.every(isWordlessProviderFrameBlock)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '45,85p' mobile/src/session/mobile-native-chat-render-data.ts
sed -n '1,90p' src/shared/native-chat-provider-frame-summary.ts
rg -n 'foldMobileNativeChatMessages|isWordlessProviderFrameBlock' mobile/src/session src/shared

Repository: stablyai/orca

Length of output: 5667


🏁 Script executed:

#!/bin/bash
printf '%s\n' '--- mobile render data imports and body ---'
sed -n '1,180p' mobile/src/session/mobile-native-chat-render-data.ts
printf '%s\n' '--- mobile overlay ---'
sed -n '1,220p' mobile/src/session/MobileNativeChatOverlay.tsx
printf '%s\n' '--- desktop row content ---'
sed -n '1,180p' src/shared/native-chat-row-content.ts
printf '%s\n' '--- mobile row/render references ---'
rg -n -C 4 'blocks|NativeChatMessage|nativeChatRow|RowContent|providerFrame|foldMobileNativeChatMessages' mobile/src/session mobile/src -g '*.tsx' -g '*.ts'
printf '%s\n' '--- relevant tests ---'
sed -n '225,490p' mobile/src/session/mobile-native-chat-render-data.test.ts
printf '%s\n' '--- diff summary and changed hunks ---'
git diff --stat 3f37fcc423582b023dc6b9d7305a1056b655edbb c74299b479091c20cd532f5f655a00ef15bdfbd8
git diff --unified=25 3f37fcc423582b023dc6b9d7305a1056b655edbb c74299b479091c20cd532f5f655a00ef15bdfbd8 -- mobile/src/session/mobile-native-chat-render-data.ts src/shared/native-chat-row-content.ts src/shared/native-chat-provider-frame-summary.ts

Repository: stablyai/orca

Length of output: 45645


🏁 Script executed:

#!/bin/bash
printf '%s\n' '--- mobile render data imports and body ---'
sed -n '1,180p' mobile/src/session/mobile-native-chat-render-data.ts
printf '%s\n' '--- mobile overlay ---'
sed -n '1,220p' mobile/src/session/MobileNativeChatOverlay.tsx
printf '%s\n' '--- desktop row content ---'
sed -n '1,180p' src/shared/native-chat-row-content.ts
printf '%s\n' '--- mobile row/render references ---'
rg -n -C 4 'blocks|NativeChatMessage|nativeChatRow|RowContent|providerFrame|foldMobileNativeChatMessages' mobile/src/session mobile/src -g '*.tsx' -g '*.ts'
printf '%s\n' '--- relevant tests ---'
sed -n '225,490p' mobile/src/session/mobile-native-chat-render-data.test.ts
printf '%s\n' '--- diff summary and changed hunks ---'
git diff --stat 3f37fcc423582b023dc6b9d7305a1056b655edbb c74299b479091c20cd532f5f655a00ef15bdfbd8
git diff --unified=25 3f37fcc423582b023dc6b9d7305a1056b655edbb c74299b479091c20cd532f5f655edbb -- mobile/src/session/mobile-native-chat-render-data.ts src/shared/native-chat-row-content.ts src/shared/native-chat-provider-frame-summary.ts

Repository: stablyai/orca

Length of output: 45659


🏁 Script executed:

#!/bin/bash
printf '%s\n' '--- mobile view and message definitions ---'
fd -i 'MobileNativeChat(View|Message)' mobile/src/session
for f in $(fd -i 'MobileNativeChat(View|Message)' mobile/src/session | grep -E '\.(tsx|ts)$' | grep -v '\.test\.'); do
  echo "--- $f ---"
  wc -l "$f"
  rg -n -C 8 'folded|messages|blocks|derive|map|MobileNativeChatMessage|NativeChatMessage' "$f"
done
printf '%s\n' '--- provider-frame construction and consumers ---'
rg -n -C 6 'providerFrame|unhandled-provider-frame|fallback|frame\.provider|frame\.kind' src mobile -g '*.ts' -g '*.tsx' | head -n 1000
printf '%s\n' '--- mixed provider-frame tests ---'
rg -n -C 8 'providerFrame|wordless|unrecognised|unrecognized|fallback label|fallback' src mobile -g '*.test.ts' -g '*.test.tsx' | head -n 1200

Repository: stablyai/orca

Length of output: 41102


🏁 Script executed:

#!/bin/bash
for f in \
  src/main/agent-session-wire/unhandled-provider-frame.ts \
  src/main/agent-session-wire/unhandled-provider-frame.test.ts \
  src/shared/native-chat-types.ts \
  src/main/agent-session-wire/provider-frame-disposition.ts; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    wc -l "$f"
    cat -n "$f"
  fi
done
printf '%s\n' '--- exact providerFrame references (source only) ---'
rg -n -C 5 'providerFrame' src mobile \
  -g '*.ts' -g '*.tsx' \
  -g '!*.test.ts' -g '!*.test.tsx' \
  | grep -E 'providerFrame|unhandled-provider-frame|native-chat' | head -n 500
printf '%s\n' '--- exact unhandled-frame references and tests ---'
rg -n -C 8 'unhandled-provider-frame|UnhandledProvider|unhandled provider|provider frame' src mobile \
  -g '*.ts' -g '*.tsx' \
  | head -n 800

Repository: stablyai/orca

Length of output: 41308


🏁 Script executed:

#!/bin/bash
printf '%s\n' '--- tool folding ---'
rg -n -C 12 'export function foldToolMessages|function foldToolMessages|foldToolMessages' src/shared mobile/src -g '*.ts' -g '*.tsx' | head -n 500
printf '%s\n' '--- structured projection ---'
fd -i 'structured-agent-session-projection' src mobile
for f in $(fd -i 'structured-agent-session-projection' src mobile | grep -E '\.(ts|tsx)$' | grep -v '\.test\.'); do
  echo "--- $f ---"
  rg -n -C 12 'projectStructuredItemToNativeChat|blocks|providerFrame|status|tool' "$f" | head -n 700
done
printf '%s\n' '--- native-chat assembly/projection references ---'
rg -n -C 10 'project.*NativeChat|NativeChatMessage|blocks:.*map|blocks: \[|body\.blocks|body\.text|journal.*body' src/main/native-chat src/shared -g '*.ts' -g '*.tsx' \
  | head -n 1200
printf '%s\n' '--- unhandled frame body ---'
sed -n '80,190p' src/main/native-chat/agent-session-wire/unhandled-provider-frame.ts

Repository: stablyai/orca

Length of output: 43204


🏁 Script executed:

#!/bin/bash
printf '%s\n' '--- locate projection files ---'
fd -i 'structured.*projection|journal.*projection|native-chat.*assembly|native-chat.*projection' src mobile
printf '%s\n' '--- projection symbols and status mapping ---'
rg -n -C 18 'projectStructuredItemToNativeChat|kind === .status.|body\.kind|status.*blocks|role:.*system|role:.*assistant' src/shared src/main/native-chat -g '*.ts' | head -n 1400
printf '%s\n' '--- message merge/dedup logic ---'
rg -n -C 12 'merge.*message|messages.*merge|blocks.*concat|concat\(.*blocks|dedup|deduplicate|turnId' src/shared src/main/native-chat -g '*.ts' | head -n 1400

Repository: stablyai/orca

Length of output: 45661


🏁 Script executed:

#!/bin/bash
for f in \
  src/shared/structured-agent-session-projection.ts \
  src/shared/structured-agent-session-message-projection.ts \
  src/shared/native-chat-tool-fold.ts \
  src/main/native-chat/agent-session-wire/structured-agent-session-status-journal-projection.ts; do
  echo "--- $f ---"
  wc -l "$f"
  cat -n "$f" | sed -n '1,260p'
done

Repository: stablyai/orca

Length of output: 28369


🏁 Script executed:

#!/bin/bash
printf '%s\n' '--- journal body types and schemas ---'
sed -n '230,330p' src/shared/agent-session-journal-types.ts
sed -n '50,105p' src/shared/agent-session-journal-schemas.ts
sed -n '235,275p' src/shared/agent-session-journal-schemas.ts
printf '%s\n' '--- status block ---'
cat -n src/shared/structured-agent-session-status-block.ts
printf '%s\n' '--- Codex generic frame aggregation ---'
sed -n '1,230p' src/main/codex/codex-structured-journal-generic-frames.ts
printf '%s\n' '--- all calls that append generic frame rows ---'
rg -n -C 12 'appendFrameRow|genericRowsByTurn|unhandledProviderFrameJournalItem' src/main/codex src/main/native-chat -g '*.ts' | head -n 1200

Repository: stablyai/orca

Length of output: 43134


🏁 Script executed:

#!/bin/bash
printf '%s\n' '--- message item contract ---'
rg -n -C 20 'type AgentJournalMessageItem|AgentJournalMessageItem =|kind: .message.|blocks:' src/shared/agent-session-journal-types.ts | head -n 500
printf '%s\n' '--- message-item writers ---'
rg -n -C 12 'kind: .message.|appendItem\(.*message|body:.*blocks|blocks:.*providerFrame|providerFrame.*blocks' src/main src/shared -g '*.ts' | head -n 1000

Repository: stablyai/orca

Length of output: 41832


Filter wordless provider blocks inside mixed rows.

foldMobileNativeChatMessages removes only rows whose blocks are all wordless provider-frame blocks. A valid journal message can contain that fallback block together with meaningful text or tool blocks, so the row survives. MobileNativeChatMessage then renders the fallback label. Desktop removes the wordless block before rendering. Apply the same block-level filter on mobile.

Suggested fix
-  return stripNoiseMessages(
+  const folded = stripNoiseMessages(
     foldToolMessages(normalizeImageTranscriptMessages(messages.filter(isRootAgentJournalItem)))
-  ).filter((message) => !isWordlessProviderFrameRow(message))
+  )
+  return folded
+    .filter((message) => !isWordlessProviderFrameRow(message))
+    .map((message) => {
+      const blocks = message.blocks.filter((block) => !isWordlessProviderFrameBlock(block))
+      return blocks.length === message.blocks.length ? message : { ...message, blocks }
+    })
 }

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The re-read that replaces the removed resume toasts is not a reliable backstop. When the dismiss (or continue) RPC fails and the follow-up read also fails, the offer is cleared from the status bar with no remaining surface — the inline note has the trace and the two call sites.

Reviewed changes

  • Resume-after-restart toasts removed. native-chat-restart-action-notifications.ts and its test are deleted; continueNativeChatRestartOffer / dismissNativeChatRestartOffer now publish only the host's sessions/failed answer, with the status-bar segment and each chat's own note as the reports. All 6 locales and en-runtime-required.json drop the orphaned keys.
  • Wordless unrecognised provider frames stored but not drawn. New isWordlessProviderFrameBlock filters blocks in derive() (desktop) and whole rows on mobile. The Codex task-list projection runs before derive, so stored plan frames still become the checklist; failures, notices, request: rows, and Claude local_command_output stay visible. Raw Codex collab-call rows are hidden but still count via isNativeChatCodexCollabCallFrameRow.
  • Claude local_command_output text. The frame's content becomes the row sentence for that one kind.
  • Approval card drops blockedPath and matchedAskRule from both view types and both cards; the journal still records them, so the wire is unchanged.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@@ -343,7 +322,6 @@ export async function dismissNativeChatRestartOffer(sessionIds?: readonly string
}
} catch {
await refreshNativeChatRestartOffer()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dismiss toast was replaced by the re-read putting the still-pending offer back in the status bar, but that replacement only works while the read succeeds. When the dismiss RPC fails and the follow-up read fails too (the correlated case on a dropped host connection), readNativeChatRestartOffer publishes EMPTY (lines 236-243), so the status bar empties, the offered-chat watch is released (lines 111-116), and the dialog has already closed — the dismissal looks like it succeeded and nothing resurfaces it until the next launch.

The identical hole exists in the continue catch at line 290, where an opted-in automatic launch has no dialog and, if the host never received the send, no in-chat note either.

Technical details
# Resume outcome goes silent when the re-read also fails

## Affected sites
- `src/renderer/src/components/native-chat-resume-on-restart-store.ts:324` — dismiss catch relies on `refreshNativeChatRestartOffer()` as the only report.
- `src/renderer/src/components/native-chat-resume-on-restart-store.ts:290` — continue catch, same reliance.
- `src/renderer/src/components/native-chat-resume-on-restart-store.ts:236-243` — a failed read publishes `{ ...EMPTY }`, clearing the offer.
- `src/renderer/src/components/native-chat-resume-on-restart-store.ts:111-116` — EMPTY releases the offered-chat watch, so there is no later re-read to restore it.
- `src/renderer/src/components/NativeChatResumeOnRestartModal.test.tsx:201-214` — the only coverage mocks `restartResumable` to succeed, so the double failure is untested.

## Required outcome
- An explicit dismiss/continue whose confirmation is lost must stay visible to the user until the host can be reached or the next launch — not silently vanish.

## Open questions for the human
- Is clearing the offer on a failed read intended even for an in-flight user action? Keeping the previous snapshot through a failed re-read during an action (or a minimal unconfirmed surface) would close this without reintroducing the toasts.

…lit a turn's work

- Codex per-turn cap: a wordless provider row (decided by the same shared rule the clients use)
  has its own silent storage bound, so it no longer crowds out rows that draw and never produces
  a "N more provider notifications not shown" line about rows nobody sees. Plan updates are
  exempt from the cap, so the task list keeps updating after a noisy turn.
- A Claude local command's row an older host stored with only its label (/usage output in the
  payload) stays drawn instead of disappearing.
- A settled turn whose only extra row draws nothing offers no expand arrow, and a wordless row no
  longer splits one tool run into two.
…so once, with Retry

When the resume request fails before the host reserved anything (the host is not ready, or its
recovery record cannot be written), the host has nothing to record, and the chats used to fall
silently back to "N chats to resume". The status bar and dialog now show them as failed, with the
existing guidance and Retry, until Retry, Dismiss, a host answer that no longer offers them, or a
relaunch. Comments that still cited the removed toast are corrected.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues in the commits since the last review. Changes are described below.

Reviewed changes

  • Codex per-turn cap split by whether a client draws the row. codex-structured-journal-generic-frames.ts now tracks { drawn, wordless } per turn. Wordless frames (decided by the same isWordlessProviderFrame the clients use) get their own silent bound (MAX_CODEX_WORDLESS_ROWS_PER_TURN = 8) and are dropped without a suppression summary, so they no longer crowd out rows a chat draws; plan updates are exempt from both caps so the task list keeps updating after a noisy turn. Errors still bypass the cap.
  • Wordless rows no longer split work. isUndrawnProviderFrameMessage (native-chat-tool-fold.ts) keeps a wordless frame from resetting the fold target, so it no longer splits one tool run into two (a plan update still splits, since it draws as the checklist). A new draws field in native-chat-turn-fold.ts (fed from native-chat-transcript-slots.ts) stops a turn whose only extra row draws nothing from offering an expand arrow that opens onto nothing.
  • Older-host Claude local-command rows stay drawn. isWordlessProviderFrame excludes message:system:local_command_output, so a row an older host stored with only the fallback label remains visible; the rule was factored into isWordlessProviderFrame (row) / isWordlessProviderFrameBlock / isWordlessProviderFrameMessage.
  • A lost resume request is reported once, with Retry. New native-chat-resume-unsent-requests.ts marks the chats a rejected restartContinue named; withUnsentResumes (called from publishAnswer) moves any still-offered marked chat from candidates to failed with outcome:'refused', reason:'agent_session_restart_request_failed', retryable:true, so the status bar and dialog show them with Retry. The follow-up re-read is the discriminator: a chat the host actually processed is no longer offered, so its mark drops and no false Retry appears. forgetUnsentResumes clears marks on Retry/Dismiss/reset.
  • Comment-only corrections in structured-agent-session-restart-continuation.ts, structured-agent-session-restart-failure-ledger.ts, shared/agent-session-restart-continuation.ts, and provider-frame-disposition.ts now that the resume toasts are gone.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

…chat marked

- Mobile draws no task list, so it now drops wordless provider rows, plan updates included,
  before folding tool runs; a mid-run plan update no longer leaves two run headers back to back.
- A Dismiss the host never took keeps a lost resume request's chat shown as failed instead of
  turning it back into a plain offer. The lost request's real error now goes to the renderer log,
  since the row carries this side's own reason code.
- Comments corrected: the Codex cap no longer claims dropped wordless rows stay countable, and
  the resume comments cover a chat a lost request never reached.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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 charge error-surface frames against the… · codex-structured-journal-generic-frames.ts:154-161

src/main/codex/codex-structured-journal-generic-frames.ts:154-161
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not charge error-surface frames against the drawn quota.

error-surface frames bypass the drawn-row cap, but the successful append still increments rows.drawn. After eight accepted error frames in one turn, a later ordinary drawn frame is suppressed before reaching its own limit.

Suggested fix
-      isPlan
+      isPlan || isError
         ? rows
         : wordless

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 05426416-a7dd-4396-b144-c0d2a32bf0d7
📥 Commits

Reviewing files that changed from the base of the PR and between 5922e3b and ece1efe.

📒 Files selected for processing (8)
  • mobile/src/session/mobile-native-chat-render-data.test.ts
  • mobile/src/session/mobile-native-chat-render-data.ts
  • src/main/codex/codex-structured-journal-generic-frames.ts
  • src/renderer/src/components/NativeChatResumeFailureDetails.tsx
  • src/renderer/src/components/NativeChatResumeOnRestartModal.test.tsx
  • src/renderer/src/components/native-chat-resume-on-restart-grouping.ts
  • src/renderer/src/components/native-chat-resume-on-restart-store.ts
  • src/renderer/src/components/status-bar/NativeChatResumeStatusSegment.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/renderer/src/components/status-bar/NativeChatResumeStatusSegment.tsx
  • src/main/codex/codex-structured-journal-generic-frames.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues in the commits since the last review. The earlier review's concern about the follow-up read failing after a lost dismiss/continue is still open (tracked in that thread); no new inline feedback.

Reviewed changes

  • Mobile folds tool runs without a hidden plan update splitting them. foldMobileNativeChatMessages now drops wordless provider rows — plan updates included, since mobile draws no task list — before foldToolMessages instead of after, so a mid-run plan update no longer leaves two back-to-back run headers. A new test pins the one-run behavior.
  • A Dismiss the host never took keeps a lost-resume chat marked failed. dismissNativeChatRestartOffer moved forgetUnsentResumes(sessionIds) to after the RPC succeeds, so the catch's re-read re-applies the still-present mark instead of turning the chat back into a plain offer. Covered by a new test.
  • The lost resume request's real error goes to the renderer log. continueNativeChatRestartOffer's catch now console.warns it, since the row only carries this side's own reason code.
  • Comment corrections in the Codex row cap, the resume failure/grouping types, NativeChatResumeFailureDetails, and the status segment now match behavior.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Review summary

The problem. The native chat said some things more than once, and some things in Orca's internal terms.

  • Resuming after a restart: one resume's outcome could show up in four places at once: a toast, the chat's own note, the status bar and the resume dialog. Extra toasts appeared when Orca lost an answer or a dismiss wasn't confirmed.
  • Events Orca doesn't recognise: when Codex or Claude sent one of these with no text, the chat drew a raw "provider · kind" row with the raw event behind "Details".
  • Approval card: Claude's tool-approval card showed "Ask rule: … · projectSettings" and "Blocked path: …". Those lines describe Claude's permission settings, not the request you're deciding on.

What changes for you.

  • Resume:
    • No toast for any resume outcome.
    • Each chat's own note says what happened to it.
    • The status bar entry is the one summary of what's still waiting, and it opens the dialog.
    • Two dialog lines that talked about "owning a session" now say what to do: close the chat in the other window, or wait and retry.
  • Unrecognised events:
    • Text-less rows are no longer drawn on desktop or mobile. Rows with a sentence, failures, records of requests Orca answered for you, and /usage-style output still show.
    • The events are still stored, so the Codex task list keeps working.
  • Approval card: it shows the request, its detail and the "Reason" line.

What the review fixed.

  • The "N more not shown" line (P2): hidden rows still used up Codex's 8-row-per-turn budget. A turn could show only "N more provider notifications not shown for this turn", and a later row with real text could be crowded out. Hidden rows now have their own silent limit.
  • Frozen task list (P2): plan updates were capped with everything else, so the task list stopped updating after the 8th such row in a turn. This bug was already on main. Plan updates are now never capped.
  • Missing /usage output (P2): output saved before this change, or sent by an older remote host, would have disappeared. It now shows as it did before.
  • Silent failed Resume (P2): a Resume request that fails before Orca reaches any chat would have been silent once the toasts were gone. Those chats now show as "failed to resume" in the status bar and dialog, with Retry, and the real error goes to the log.
  • Smaller fixes (P3):
    • A hidden row no longer splits a run of tool calls into two, on desktop or mobile.
    • A finished turn no longer offers an expand arrow that opens onto nothing.
    • A failed Dismiss no longer flips a failed chat back to "to resume".
    • Comments that still described the removed toasts are corrected.
    • The PR description's comparisons and labels are corrected.

Deferred (none block this PR).

  • Product question: a chat whose resume failed is still listed in the status bar and dialog as well as in its own note. Reporting it only in the chat would mean removing the failure list. That's a product decision, so it's left as is.
  • Wire wording on kept rows: rows kept on purpose still read like wire names, for example a wordless failure as "codex · notification:…". Rewording them is a copy change for a follow-up.
  • /usage on desktop: the output shows as one truncated line, with the full text behind "Details".
  • Raw codes in the tooltip: the resume dialog's tooltip shows raw reason codes. This was already on main.
  • Retry of a recorded failure: if Retry on a failure the host already recorded never reaches the host, the row comes back unchanged. It still says it failed and still offers Retry.
  • Codex hook prompts: text that sits in fields Orca doesn't read is now hidden with the rest, for example in Codex hook prompts. Reading that field is a cheap follow-up.
  • Older clients: older Orca builds keep drawing the raw rows. Against an updated host they may draw a few more per turn, because the limits changed.

What was verified.

  • Tests: each change has tests that fail without it, through the real host translation where it matters. That includes Codex plan updates still producing the task list, and the new row limits.
  • Local checks: desktop and mobile suites around the change pass. So do the web, node and mobile typechecks, lint, the changed-code gate and the localization checks.
  • Readiness checklist: it passed on the final head with nothing blocking.
  • CI: green on the final head.
  • In the app: QA ran on the final head on the Windows test machine, in hidden, isolated test builds with a stand-in Claude agent and no real account. Seven before/after pairs are in the description's Visual Proof section, and each one behaves as described:
    • the resume toast is gone;
    • text-less rows are gone;
    • the approval card is trimmed;
    • /usage output shows;
    • a hidden row no longer splits a run of commands;
    • no expand arrow opens onto nothing;
    • a Resume request that fails before reaching the chat shows once, as "1 chat failed to resume" with Retry, and no toast.
    • No new pop-up or label appeared.

What wasn't verified.

  • Codex in the app: the Codex task list and Codex row limits weren't checked in the running app. The stand-in agent speaks only Claude's protocol. These are covered by tests through the real host translation.
  • Real Claude suite: not re-run, because this PR no longer touches that code.
  • Mixed versions: checked by reading the code and by tests, not live.

…duplicate-surfaces

# Conflicts:
#	mobile/src/session/mobile-native-chat-permission.ts
…oast

Clicking Resume in the dialog (or Retry on a row) closes the dialog and acts on
chats that are mostly off-screen, and nothing said what happened. One toast now
summarises that click: "Resumed N chats and asked them to continue", "N chats
couldn't be resumed" with Show (opens the dialog), "Couldn't confirm N chats were
resumed", or the mixed case in the same toast. A request lost before it reached
the chats counts its chats as not resumed. An opted-in automatic resume at launch
raises no toast; dismissal and other bookkeeping stay silent.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues in the new commit — the reworked one-toast-per-click logic is sound and well covered; one description nit in Nitpicks below.

Reviewed changes

  • One toast per Resume click, replacing the earlier no-toast direction. native-chat-restart-action-notifications.ts is re-created with a rewritten announceRestartResults/announceClick: a dialog Resume or a row Retry raises exactly one toast (a success count, a refused count with Show, an unconfirmed count, or a mixed toast carrying the other counts as block lines). An opted-in automatic launch and a Dismiss still raise none.
  • Store wiring for the click summary. continueNativeChatRestartOffer now builds the summary in both the success and the lost-request paths and announces it only when sessionIds names chats; the toast's dismiss cancel action and the standalone unconfirmed/dismiss toasts are gone.
  • Locale updates. continuedOne/continuedMany added to the five non-English locales; dismiss, continueUnconfirmed*, and dismissUnconfirmed dropped from all locales and en-runtime-required.json. The main-process continuation comment no longer references the toast.

ℹ️ Nitpicks

  • The PR description still says "Orca shows no toast for any resume outcome" and that native-chat-restart-action-notifications.ts was deleted, along with its strings in every locale. 4641f1de reverses that: the module is back and a Resume click (or row Retry) raises one toast. The resume "Mechanism" and "Differences from the common pattern" sections now describe the previous revision, so a reviewer following the description will be misled — worth refreshing before merge.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 04978721-250e-44ab-b088-5a05d314379a
📥 Commits

Reviewing files that changed from the base of the PR and between 7c55764 and 4641f1d.

📒 Files selected for processing (13)
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-continuation.ts
  • src/renderer/src/components/NativeChatResumeOnRestartModal.test.tsx
  • src/renderer/src/components/native-chat-restart-action-notifications.test.ts
  • src/renderer/src/components/native-chat-restart-action-notifications.ts
  • src/renderer/src/components/native-chat-resume-on-restart-click-toast.test.ts
  • src/renderer/src/components/native-chat-resume-on-restart-store.ts
  • src/renderer/src/components/status-bar/NativeChatResumeStatusSegment.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
🚧 Files skipped from review as they are similar to previous changes (8)
  • src/main/native-chat/agent-session-wire/structured-agent-session-restart-continuation.ts
  • src/renderer/src/components/status-bar/NativeChatResumeStatusSegment.tsx
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/zh.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

Comment on lines 148 to 150
const seenCarryingOn = notContinued.filter(
(sessionId) => !reported.includes(sessionId) && sentUnconfirmed(sessionId)
(sessionId) => hostFailed !== undefined && !failed.has(sessionId) && sentUnconfirmed(sessionId)
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- PR diff ---'
git diff --unified=25 3284b4c70c901402831bb4ccc5576ea083d2e5ae 4641f1de37e4907b484bf3c7c91ca22cf1d848cb -- src/renderer/src/components/native-chat-restart-action-notifications.ts
printf '%s\n' '--- target at reviewed head ---'
git show 4641f1de37e4907b484bf3c7c91ca22cf1d848cb:src/renderer/src/components/native-chat-restart-action-notifications.ts | nl -ba | sed -n '1,240p'
printf '%s\n' '--- outcome declarations and notification callers ---'
rg -n -C 4 'announceRestartResults|RestartContinuationOutcome|hostFailed|reportedResults' src
printf '%s\n' '--- sessions/reconciliation host response references ---'
rg -n -C 3 'sessions.*(pending|unknown)|(pending|unknown).*sessions|RestartContinuationOutcome|continuation.*outcome|restart.*result' src

Repository: stablyai/orca

Length of output: 42259


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- renderer store relevant section ---'
nl -ba src/renderer/src/components/native-chat-resume-on-restart-store.ts | sed -n '210,345p'
printf '%s\n' '--- host implementation relevant section ---'
nl -ba src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-host.ts | sed -n '1,330p'
printf '%s\n' '--- notification tests ---'
nl -ba src/renderer/src/components/native-chat-restart-action-notifications.test.ts | sed -n '1,240p'

Repository: stablyai/orca

Length of output: 29622


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- failure ledger outline and relevant logic ---'
ast-grep outline src/main/native-chat/agent-session-wire/structured-agent-session-restart-failure-ledger.ts
rg -n -C 7 'settle|failureAfterResume|unconfirmed|unknown|pending|list:' src/main/native-chat/agent-session-wire/structured-agent-session-restart-failure-ledger.ts
printf '%s\n' '--- continuation outcome declarations and verdict logic ---'
rg -n -C 5 'StructuredAgentSessionContinuationOutcome|outcome: .(pending|unknown|continued)|pending|unknown|verdict' src/main/native-chat/agent-session-wire/structured-agent-session-restart-continuation.ts src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-runner.ts
printf '%s\n' '--- candidate reader ---'
nl -ba src/main/native-chat/agent-session-wire/structured-agent-session-restart-candidates.ts | sed -n '1,240p'

Repository: stablyai/orca

Length of output: 32711


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- failure ledger full relevant implementation ---'
nl -ba src/main/native-chat/agent-session-wire/structured-agent-session-restart-failure-ledger.ts | sed -n '1,220p'
printf '%s\n' '--- candidate/resumable set rules ---'
nl -ba src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-set.ts | sed -n '1,260p'
printf '%s\n' '--- restart host reconciliation tests mentioning pending/unknown/failures/sessions ---'
rg -n -C 5 'pending|unknown|unconfirmed|failed|sessions' src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-host.test.ts src/main/native-chat/agent-session-wire/structured-agent-session-restart*test.ts

Repository: stablyai/orca

Length of output: 42407


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- capsule implementation locations ---'
rg -n -C 5 'class AgentSessionRecoveryCapsule|failResume\(|rollbackResume\(|completeResume\(' src/main
printf '%s\n' '--- capsule failure/rollback tests ---'
rg -n -C 6 'failResume|rollbackResume|completeResume|failure.*write|recording.*failure|throw.*fail' src/main/native-chat src/main/runtime
printf '%s\n' '--- production restart host capsule binding ---'
rg -n -C 6 'recoveryCapsule|createStructuredAgentSessionRestartResume' src/main/native-chat/agent-session-wire

Repository: stablyai/orca

Length of output: 45667


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- recovery capsule mutation methods ---'
nl -ba src/main/runtime/agent-session-recovery-capsule.ts | sed -n '125,215p;255,292p'
printf '%s\n' '--- publication-failure tests ---'
nl -ba src/main/runtime/agent-session-recovery-capsule.test.ts | sed -n '45,62p;550,610p'
printf '%s\n' '--- production recovery capsule binding ---'
rg -n -C 4 'recoveryCapsule:' src/main
printf '%s\n' '--- store notification and reconciliation call ---'
nl -ba src/renderer/src/components/native-chat-resume-on-restart-store.ts | sed -n '278,318p'

Repository: stablyai/orca

Length of output: 16336


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- store imports and local types ---'
nl -ba src/renderer/src/components/native-chat-resume-on-restart-store.ts | sed -n '1,75p'
printf '%s\n' '--- resume candidate type declaration ---'
rg -n -C 3 'export type ResumeCandidate|export interface ResumeCandidate|type ResumeFailure|export type ResumeFailure' src/renderer/src/components/native-chat-resume-on-restart-grouping.ts

Repository: stablyai/orca

Length of output: 4486


Keep still-offered pending or unknown chats unconfirmed.

When writing a pending or unknown outcome to the recovery capsule fails, settlement can roll the offer back. The host can then return the chat in sessions without a failed row. The store discards those remaining candidates, so seenCarryingOn can count the chat as resumed while its offer remains. Pass candidate IDs from both the action response and reconciliation refresh to announceRestartResults, and count a still-offered pending or unknown chat as unconfirmed.

Suggested fix
diff --git a/src/renderer/src/components/native-chat-restart-action-notifications.ts b/src/renderer/src/components/native-chat-restart-action-notifications.ts
@@
   hostFailed: readonly Pick<ResumeFailure, 'sessionId' | 'outcome'>[] | undefined,
-  show: () => void
+  show: () => void,
+  remainingSessionIds?: readonly string[]
 ): void {
@@
   const notContinued = restartChatsNotContinued(requested, results)
   const failed = new Map(hostFailed?.map((failure) => [failure.sessionId, failure.outcome]))
+  const remaining = new Set(remainingSessionIds ?? [])
+  const outcomes = new Map(results.map((result) => [result.sessionId, result.outcome]))
+  const sentUnconfirmed = (sessionId: string): boolean =>
+    outcomes.get(sessionId) === 'pending' || outcomes.get(sessionId) === 'unknown'
   // A host that lists failures has already dropped chats that moved on by themselves or that the
   // user answered; counting those would report a failure nothing on screen can show.
   const reported =
     hostFailed === undefined
       ? notContinued
-      : notContinued.filter((sessionId) => failed.has(sessionId))
-  const outcomes = new Map(results.map((result) => [result.sessionId, result.outcome]))
-  const sentUnconfirmed = (sessionId: string): boolean =>
-    outcomes.get(sessionId) === 'pending' || outcomes.get(sessionId) === 'unknown'
-  // An unconfirmed send the host no longer lists was seen carrying on (or answered by the user), so
+      : notContinued.filter(
+          (sessionId) => failed.has(sessionId) || (remaining.has(sessionId) && sentUnconfirmed(sessionId))
+        )
+  // An unconfirmed send the host lists as neither failed nor still offered was seen carrying on (or answered by the user), so
   // it was resumed and asked to continue; left out of both counts, the click would say nothing.
   const seenCarryingOn = notContinued.filter(
-    (sessionId) => hostFailed !== undefined && !failed.has(sessionId) && sentUnconfirmed(sessionId)
+    (sessionId) =>
+      hostFailed !== undefined &&
+      !failed.has(sessionId) &&
+      !remaining.has(sessionId) &&
+      sentUnconfirmed(sessionId)
   )
diff --git a/src/renderer/src/components/native-chat-resume-on-restart-store.ts b/src/renderer/src/components/native-chat-resume-on-restart-store.ts
@@
     >(LOCAL, 'agentSession.restartContinue', sessionIds ? { sessionIds } : {})
     const failed = failedFrom(result)
+    let remainingSessionIds: readonly string[]
     if (Array.isArray(result.sessions)) {
-      publishAnswer({ candidates: result.sessions, failed, listedAt: Date.now() })
+      const candidates = result.sessions as ResumeCandidate[]
+      publishAnswer({ candidates, failed, listedAt: Date.now() })
+      remainingSessionIds = candidates.map(({ sessionId }) => sessionId)
     } else {
-      await refreshNativeChatRestartOffer()
+      const refreshed = await refreshNativeChatRestartOffer()
+      remainingSessionIds = refreshed.candidates.map(({ sessionId }) => sessionId)
     }
     const listed = Array.isArray(result.failed) ? failed : undefined
-    outcome = [batch, result.continued, listed, requestNativeChatResumeOnRestartDialog]
+    outcome = [
+      batch,
+      result.continued,
+      listed,
+      requestNativeChatResumeOnRestartDialog,
+      remainingSessionIds
+    ]

Comment on lines +303 to +307
markUnsentResumes(batch, Date.now())
const read = await readNativeChatRestartOffer()
// Nothing reached the chats, so each is a failure of this click as the list now shows it.
const listed = read.available ? offer.failed : undefined
outcome = [batch, [], listed, requestNativeChatResumeOnRestartDialog]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

🔎 Supported by static analysis

🏁 Script executed:

#!/bin/bash
set -o pipefail
git diff --unified=18 3284b4c70c901402831bb4ccc5576ea083d2e5ae 4641f1de37e4907b484bf3c7c91ca22cf1d848cb -- src/renderer/src/components/native-chat-resume-on-restart-store.ts
printf '\n--- current focused source ---\n'
sed -n '220,345p' src/renderer/src/components/native-chat-resume-on-restart-store.ts
printf '\n--- callRuntimeRpc bindings and declarations ---\n'
rg -n -C 4 'callRuntimeRpc' src

Repository: stablyai/orca

Length of output: 45655


🏁 Script executed:

#!/bin/bash
set -o pipefail
printf '%s\n' '--- RPC client ---'
sed -n '1,260p' src/renderer/src/runtime/runtime-rpc-client.ts
printf '%s\n' '--- structured session wrapper ---'
sed -n '1,220p' src/renderer/src/runtime/structured-agent-session-client.ts
printf '%s\n' '--- restart RPC handlers ---'
rg -n -C 5 'agentSession\.restartContinue|restartContinue' src
printf '%s\n' '--- unsent and result/retry helpers ---'
rg -n -C 4 'markUnsentResumes|withUnsentResumes|forgetUnsentResumes|announceRestartResults|Retry' src/renderer/src/components/native-chat-resume-unsent-requests.ts src/renderer/src/components/native-chat-restart-action-notifications.ts src/renderer/src/components/native-chat-resume-on-restart-store.ts

Repository: stablyai/orca

Length of output: 42766


🏁 Script executed:

#!/bin/bash
set -o pipefail
printf '%s\n' '--- restart handler ---'
sed -n '1,180p' src/main/runtime/rpc/methods/structured-agent-session-restart-resume.ts
printf '%s\n' '--- local runtime call declarations/implementations ---'
rg -n -C 8 'runtime\.call|runtimeCall|runtimeCall' src/main src/preload src/shared | head -n 260
printf '%s\n' '--- unsent helper and notification implementation ---'
sed -n '1,190p' src/renderer/src/components/native-chat-resume-unsent-requests.ts
sed -n '100,180p' src/renderer/src/components/native-chat-restart-action-notifications.ts

Repository: stablyai/orca

Length of output: 33577


🏁 Script executed:

#!/bin/bash
set -o pipefail
printf '%s\n' '--- continuation implementation ---'
rg -n -C 8 'continueAfterRestart' src/main src
printf '%s\n' '--- runtime API bridge declarations and IPC bindings ---'
rg -n -C 6 'runtime\.call|runtime:call|runtimeCall' src/preload src/main/window src/main/runtime
printf '%s\n' '--- local runtime RPC dispatch and response ---'
rg -n -C 5 'dispatchRuntimeRpc|handleRuntimeRpc|dispatch.*Rpc|RuntimeRpcResponse|callRuntimeRpc' src/main/runtime/rpc src/main/window | head -n 260

Repository: stablyai/orca

Length of output: 45661


🏁 Script executed:

#!/bin/bash
set -o pipefail
printf '%s\n' '--- non-test restart continuation definitions ---'
rg -n -C 5 --glob '!*.test.*' --glob '!**/__tests__/**' 'continueAfterRestart' src/main/native-chat src/main
printf '%s\n' '--- runtime preload/window files ---'
git ls-files | rg '(^|/)(preload|runtime-rpc|runtime.*bridge|window-api)' | head -n 100
printf '%s\n' '--- local invoke binding and runtime dispatch references (production only) ---'
rg -n -C 5 --glob '!*.test.*' --glob '!**/__tests__/**' 'runtime\.call|runtimeCall|ipcMain\.handle.*runtime|runtime\.call' src/main src/preload 2>/dev/null | head -n 220

Repository: stablyai/orca

Length of output: 39743


🏁 Script executed:

#!/bin/bash
set -o pipefail
printf '%s\n' '--- restart service implementation ---'
sed -n '210,315p' src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-host.ts
printf '%s\n' '--- runtime IPC channel binding ---'
rg -n -C 5 'runtime:call|runtime\.call|callRuntimeRpc' src/preload src/main/ipc --glob '!*.test.*' | head -n 180
printf '%s\n' '--- runtime API preload source names ---'
git ls-files src/preload | rg 'runtime'

Repository: stablyai/orca

Length of output: 10273


🏁 Script executed:

#!/bin/bash
set -o pipefail
printf '%s\n' '--- restart service action pipeline ---'
sed -n '100,245p' src/main/native-chat/agent-session-wire/structured-agent-session-restart-resume-host.ts
printf '%s\n' '--- main runtime:call handler ---'
sed -n '58,125p' src/main/ipc/runtime.ts

Repository: stablyai/orca

Length of output: 9024


Keep rejected resume requests unconfirmed.

restartContinue can perform continuation work before a later host operation rejects. The renderer then marks every selected chat as unsent and exposes it as a retryable refusal. Retry can submit work that may already have been processed.

Do not create an unsent mark for an ambiguous RPC failure. Report the result as unknown until a host answer establishes non-delivery.

🐛 Suggested fix
 import {
   forgetUnsentResumes,
-  markUnsentResumes,
   withUnsentResumes
 } from './native-chat-resume-unsent-requests'
 
 ...
   } catch (error) {
     // The row's reason is this side's own code, so the real error is kept in the log.
     console.warn('[native-chat-resume] resume request failed before reaching the chats', error)
-    markUnsentResumes(batch, Date.now())
     const read = await readNativeChatRestartOffer()
-    // Nothing reached the chats, so each is a failure of this click as the list now shows it.
+    const uncertain = batch.map((sessionId) => ({ sessionId, outcome: 'unknown' as const }))
     const listed = read.available ? offer.failed : undefined
-    outcome = [batch, [], listed, requestNativeChatResumeOnRestartDialog]
+    outcome = [batch, uncertain, listed, requestNativeChatResumeOnRestartDialog]

…ix toast translations

Show could open nothing when the host retired the failure while the toast was up,
because the dialog draws nothing without rows and the request stayed latched. Show now
goes through the status bar entry's re-read-then-open path, moved into the store so
both use it. The French, Japanese, Korean and Chinese "Resumed N chats and asked them
to continue" strings are rewritten to match their sibling strings. Tests pin Show on
the toast of a lost resume request whose chats the re-read still lists.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues in the commits since the last review. The changed behavior is intentional and covered by tests that fail against the old code.

Reviewed changes

  • Show on the Resume toast re-reads the host first. Both the toast's Show action and the status-bar entry now call a new reopenNativeChatRestartOffer, which skips the read while a resume is in flight and otherwise re-reads the durable offer, opening the dialog only when the fresh answer still lists candidates or failures — so a failure the host has since retired opens nothing.
  • The status bar's private reopen logic moved into the store. refreshNativeChatRestartOffer is collapsed to a Promise<void> re-read, and NativeChatResumeStatusSegment's local reopenOffer is deleted in favour of the shared helper, removing the duplicated race guard.
  • Corrected the continuedOne/continuedMany toast strings in French, Japanese, Korean, and Simplified Chinese; es was already correct.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

The tests reached sonner's action handler with Reflect.apply, which the anti-slop lint
rejects. One test-support helper now returns the last toast's Show as a typed click.
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Follow-up: the Resume click gets its toast back

Why: after the first review, nothing told you what a Resume click did. That click acts on chats that are mostly off-screen, so with no toast it gave no visible feedback.

What changed for you:

  • A Resume you click, in the resume dialog or with a row's Retry, now ends with one toast saying what it did:
    • "Resumed N chats and asked them to continue";
    • "N chats couldn't be resumed", with Show, which opens the dialog;
    • "Couldn't confirm N chats were resumed", with Show, when Orca couldn't confirm the message went out;
    • a mixed result in that same single toast.
  • This includes a Resume request that never reached the chats, which now shows as "couldn't be resumed".
  • Some things still raise no toast:
    • the automatic resume at launch (when "Don't ask again" is on);
    • Dismiss;
    • Orca's own bookkeeping. "Continuation delivery is unconfirmed…" and "Dismissing the resume offer was not confirmed…" stay removed, because neither asks you to do anything.
  • Each chat's note, the status bar entry and the dialog rows are unchanged.

Also in this update:

  • Merged current main. The one conflict, in the mobile permission view, kept both sides.
  • Fixed the restored "Resumed N chats" wording in French, Japanese, Korean and Chinese.
  • Show now re-reads the list before opening, so it never opens an empty dialog.
  • Fixed a lint failure in the new tests.

Deferred, both rare:

  • A click whose chats had all already moved on ends with no toast.
  • A Retry that never reaches Orca's resume service shows "Couldn't confirm…" again.

Verified:

  • Tests pin one toast per click, Show, the mixed case and the no-toast cases. Removing the toast call fails 10 of them.
  • Lint, localization checks and the web typecheck pass.
  • A fresh narrow review found nothing above P3.
  • QA on the Mac test machine, in hidden isolated builds with a stand-in agent, recorded every toast:
    • a successful click shows exactly one "Resumed 1 chat…" toast;
    • a failed click shows exactly one "1 chat couldn't be resumed" toast, whose Show opens the dialog with Open chat and Retry;
    • Retry shows one toast;
    • no other toast appeared.
  • Screenshots are in the description's Visual Proof.
  • Those builds were taken at 4641f1de37e. Later commits only fixed translations, routed Show through a re-read, and fixed lint.

@brennanb2025
brennanb2025 marked this pull request as draft October 4, 2026 23:14
…esn't show it

The approval card dropped Claude's blocked path along with the ask rule, so a
request like `git push` that needs access to `.git/config` no longer said what
it touches. Bring the path back as "Needs access to: <path>", only when the
description, reason or request detail doesn't already show it (verbatim or
JSON-escaped). One shared rule serves desktop and mobile; the ask rule stays out.
…mes the whole path

'/srv/data' inside '/srv/data-old/x' hid the "Needs access to" line although
the path itself was never shown. A match now needs the next character to end
the path: end of text, whitespace, a quote or a separator. Also pin that the
desktop approval mapping passes the blocked path through and drops the ask rule.
@brennanb2025
brennanb2025 marked this pull request as ready for review October 5, 2026 00:34
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Follow-up: the approval card shows the path again, in plain words

Why: the first review removed both "Ask rule: …" and "Blocked path: …" from Claude's approval card. The path is what the request touches, and you often can't see it in the command. For example, a git push needs .git/config. Without the path, you can't tell what you're approving.

What changed for you:

  • On desktop and mobile, the card shows "Needs access to: " when the path isn't already visible on the card.
  • If the command or detail already shows that exact path, the line isn't repeated.
  • The ask rule ("Bash(git push:*) · projectSettings") stays removed. It describes Claude's settings, not the request.
  • The new wording is translated in all six languages.

How it decides: one shared check is used by both cards. It looks for the exact path, or its escaped form inside the request detail, appearing as a whole path in the description, the reason or the detail. A path that is only the start of a longer one (/srv/data inside /srv/data-old) doesn't count as shown.

Also: merged current main, with no conflicts.

Verified:

  • New tests fail without the line, on desktop, on mobile and in the shared check. They cover:
    • showing the path when it's hidden;
    • not repeating it when it's visible;
    • the longer-path case;
    • both clients passing the path to the card;
    • the ask rule never showing.
  • Lint, the localization checks and the mobile typecheck pass. CI is green. One Windows terminal test that this change doesn't touch timed out once, then passed on re-run.
  • A fresh narrow review found two small issues, both fixed: a missing desktop test, and the longer-path case.

Not verified:

  • A new screenshot. The re-capture on the Mac test machine was abandoned because it stayed overloaded. The description's approval-card "after" shot predates this change and says so.
  • The web typecheck locally: the shared install lacks two packages main just added. CI installs them fresh and covers it.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues in the commits since the last review. The approval-path helper and its wiring are sound and well covered; the earlier concern about a lost dismiss/continue whose follow-up read also fails is still open in its thread.

Reviewed changes

Reviewed the two commits added since the last pullfrog review — afccd88c4d and 818c635afd — which restore the path a blocked approval needs.

  • Blocked path named only when the request does not show it. New approvalBlockedPathToShow (src/shared/agent-session-approval-blocked-path.ts) returns the path when the description, the reason, and the drawn detail/plan text all lack it, verbatim or JSON-escaped; both NativeChatApprovalCard and MobileNativeChatPermission call it and render Needs access to: <path>. blockedPath is threaded through the structured-session and mobile permission projections, and the ask rule stays dropped.
  • A match must name the whole path. containsWholePath accepts only an occurrence followed by end-of-text, whitespace, a quote, or a separator, so /srv/data inside /srv/data-old/x no longer suppresses the line. The helper test fails against the previous text.includes(form).
  • Tests pin the card contract. New unit tests cover the helper and both cards, and NativeChatStructuredSession.test.tsx asserts the blocked path reaches the card while matchedAskRule never does.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

…duplicate-surfaces

Conflicts resolved:
- NativeChatApprovalCard.tsx / MobileNativeChatPermission.tsx: keep main's newer-subject
  handling (disabled options, "needs a newer version" line, isPlanApprovalSubject) beside this
  branch's "Needs access to" line; mobile passes newerSubject into the context sub-component.
- approvalBlockedPathToShow checks plan text only for a plan subject; a newer Orca's subject
  draws the detail, so the detail is what it checks.
- en/es locales: JSON 3-way merge; es drops the approval and resume keys en no longer has.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues in the two merge-only commits since the last review. The branch now carries main's newer-Orca approval-subject handling, and the merge resolution preserves this PR's own changes.

Reviewed changes

Reviewed the two commits added since the last pullfrog review — 63c24dcb68 and a51932420b, both merges of origin/main — which pull main's 98171a8934 approval-subject refactor into this PR's touched surfaces.

  • Adopted main's approval-subject narrowing in both cards. NativeChatApprovalCard and MobileNativeChatPermission now narrow with isPlanApprovalSubject, and disable every answer (keeping the card's cancel) for a subject kind this build cannot draw, drawing the approval's detail plus "This request needs a newer version of Orca." This is main's behavior inherited through the merge, not a change to this PR's own logic.
  • Kept approvalBlockedPathToShow aligned with the new narrowing. The helper narrows through isPlanApprovalSubject instead of an inline subject?.kind === 'plan', so the needed-path line and the newer-subject line coexist correctly; the /srv/data-old whole-path rule is unchanged.
  • No PR-authored change since the prior review. git diff 818c635afd..a51932420b restricted to the PR files shows only main's refactor; the PR's own changes (needed path, ask-rule removal, one toast per Resume click, wordless-frame hiding) are unchanged. The desktop card/helper/structured-session and mobile permission suites pass.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@brennanb2025

Copy link
Copy Markdown
Contributor Author

CI status after merging main (700a804185a)

Main is merged in again. The only conflicts were import lines in the desktop and mobile approval cards; main's changes and this PR's are both kept. Nothing this PR's description says has changed.

CI is red, but not because of this PR.

  • All three failing checks share one cause: the mobile lint reports mobile/src/session/use-mobile-native-chat-turn-disclosure.test.tsx as too long.
  • That file is identical on main, and this PR doesn't touch it.
  • The mobile lint checks every mobile file whenever a PR changes any mobile file, so main's oversized file fails it here too.
  • Main's fix is in flight in test(mobile): split the turn-disclosure test under the 800-line test limit #25933. Once it lands, main gets merged in again and CI re-runs.

This head has no CI test results yet. The lint failure stops the test, packaging and cross-version jobs from running, so they were skipped.

Checked locally on this head:

  • About 2,450 desktop tests and 134 mobile tests pass.
  • Four desktop test files couldn't load, because main just added the stream-json package and the local install doesn't have it.
  • The typechecks show only errors that are main's own or come from the same missing packages.
  • Lint, the code-quality gate and the translation checks pass.

…tcome toast as a click

An opted-in launch resume now calls the same announce as a clicked Resume, with the same copy:
how many resumed, how many couldn't (with Show), unconfirmed, or mixed, said once. Dismiss and
bookkeeping stay silent; a launch whose chats all moved on raises nothing.
Each chat's own note already says Orca asked it to continue, so the toast drops "and asked
it/them to continue" in every locale; the couldn't-resume and couldn't-confirm counts and Show
are unchanged.
…5/chat-ui-duplicate-surfaces

Conflicts: main moved the approval mapping into chatApprovalFromJournal (#24369); it now omits the ask rule as this branch's card does.
@brennanb2025
brennanb2025 merged commit a0a7535 into main Oct 6, 2026
32 checks passed
brennanb2025 added a commit that referenced this pull request Oct 6, 2026
Brings #24595 (say each chat outcome once). Paired machines follow its
outcome model: one toast per resume across every machine it reached
(clicked, a row's Retry, the reconnect offer's Resume, or an automatic
resume), no toast for Dismiss or bookkeeping, and a resume request lost
before it reached a machine marks that machine's chats failed until a
host answer, Retry, a successful Dismiss, or a re-pair ends it. The
status bar entry and every Show re-read before the dialog lists them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant