Skip to content

feat(chat): group successful automatic reviews with routine activity - #33363

Open
gentslava wants to merge 26 commits into
stablyai:mainfrom
gentslava:gentslava/upstream-compact-activity
Open

gentslava wants to merge 26 commits into
stablyai:mainfrom
gentslava:gentslava/upstream-compact-activity

Conversation

@gentslava

@gentslava gentslava commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When Codex's automatic approval reviewer approves a step, Orca adds a separate notice row ("Automatic approval review approved …"). These rows split the folded tool activity into several pieces and repeat routine text while you read. Now an approved review goes inside the same folded activity group as the tools around it, and opening the group shows it. Rejections, denials, errors and approvals that still need you stay visible as before.

What Changed

  • Before: each successful Codex automatic-review notice was its own system row between tool calls, splitting one routine check into several activity groups.
  • After:
    • A notice joins the surrounding activity group, in its original order, when every block in it is an approved review.
    • The group starts collapsed. Opening it shows the original review text and a Details disclosure with the stored provider payload.
    • Reviews that arrive before any tool get an Activity header.
    • Not grouped: rejected, denied, timed-out or unknown notices, text that only quotes the phrase, pending questions, approval receipts and assistant prose.
  • Mechanism:
    • src/shared/native-chat-successful-review.ts classifies a system message as an approved review: Codex notification:warning or notification:guardianWarning frame, warning tone, no failure or stop marker, and text starting Automatic approval review approved (…): ….
    • src/shared/native-chat/native-chat-work-run.ts adds a notice run member. nativeChatWorkRunEntries now returns asidesBefore/asidesAfter (previously thoughts only).
    • Desktop: use-native-chat-work-run.tsx renders notice asides, and NativeChatToolRun.tsx gets the "Activity" fallback label. NativeChatMessageRow.tsx and NativeChatAssistantMessageRow.tsx stop drawing a notice separately when it heads a run.
    • Mobile mirrors this in MobileNativeChatMessage.tsx, MobileNativeChatNoticeRow.tsx (new disclosed prop) and MobileNativeChatToolRun.tsx.
    • One new string, "Activity".

Why

Routine approvals interrupt reading, but their text should stay available, and anything unsuccessful or actionable must stay visible. The work-run projection already groups thoughts and tool calls on desktop and mobile. Adding one narrowly classified member reuses its ordering, disclosure state and header instead of adding a second grouping mechanism. Classification is client-side over existing records, so there is no new wire field, capability or journal change.

Linked Issue

Fixes #36590

Refs #33357 (umbrella tracker; not closed by this PR).

Visual Proof

Production desktop component fixtures render identical synthetic records through the same transcript projection. Before is upstream main, after is this branch. These are not live-provider or phone captures. The images are stored on a separate evidence branch, not in this PR's diff.

State Before After
Collapsed Before: separate successful review notice After: one collapsed activity group
Expanded Before: review remains a separate disclosure After: original successful review inside the opened group

Dark collapsed before, dark collapsed after, dark expanded before, dark expanded after, source/image manifest.

Reproduce: pnpm fixtures:shot native-chat/NativeChatSuccessfulReviewActivity --theme both.

Phone captures (a review notice between two tool calls, folded and opened) are pending; the phone uses the same grouping rule.

Testing

  • Fresh manual run with a live Codex auto-review session.
  • Automated tests added: src/shared/native-chat/native-chat-work-run.test.ts covers which notices join (approved only; rejected, denied, timed-out, empty-reason and quoted text do not) and the order of asides around a call. src/renderer/src/components/native-chat/NativeChatMessageRow.work-run.test.tsx covers review-first and tool-first runs collapsing into one row and reviews before any tool getting an Activity header.
  • Local validation on the last refresh (macOS): all five desktop/runtime TypeScript projects pass; the affected test files pass 23 tests; mobile typecheck passes; the affected mobile tests pass 6 tests. Normal commit hooks pass. The broad related-test selection hit its local time limit and is left to CI.
  • No installed-app, phone, live-provider, SSH, Windows or Linux run is claimed.

Risk

Level: Medium

The classifier relies on Codex's English sentence for approved reviews. If Codex changes that wording, approved reviews go back to separate rows; nothing is hidden. A false match would put an approval inside a collapsed group, where it can still be opened. The tests pin the negative cases above. Older hosts and retained history work the same because classification runs on the client over existing records. A plain revert restores separate notice rows; nothing is persisted.

AI Disclosure

Implemented and checked with OpenAI Codex assistance. The contributor owns the change and its validation.

Review

Earlier CodeRabbit and Greptile threads were about mobile error and approval notice components from a broader earlier version of this PR. They were fixed and resolved. That presentation was later dropped from this PR because upstream #36304 delivered compact settled permission notices, so this PR now contains only the grouping.

Agent skill upstream boundary

  • Not applicable: no upstream skill-installer material copied or translated.

Notes

Codex-only by construction (provider check). Same behavior for local and SSH hosts, and for folder workspaces and git worktrees. Desktop and mobile follow the same rule. No platform-specific code.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I stated the risk and how to back it out
  • Before/after screenshots attached for every changed surface (desktop attached; mobile pending)
  • Self-reviewed for correctness, security and performance
  • Cross-platform, SSH/remote and path/shortcut impact considered
  • pnpm lint, pnpm typecheck, pnpm test and pnpm build pass (CI will cover; local scope stated above)

@gentslava
gentslava marked this pull request as ready for review October 25, 2026 03:22
@coderabbitai

coderabbitai Bot commented Oct 25, 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

The change adds shared automatic-approval classification and work-run membership for approval notices. Desktop and mobile message rows render approval and error notices with expandable details. Approval notices can appear asides within grouped activity runs. Tool-run views support activity-only groups, and mobile run content uses a dedicated scroll component with follow and position-restoration behavior. Tests cover notice presentation, activity grouping, failures, and run boundaries.

Merge Risk: Minimal · previous review 3f34a

The approval and activity disclosures have no established merge-blocking issue. The English labels match across platforms, and mobile error notices retain their previous controls.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Description check Inconclusive The description conflicts with the change summary on error and rejected-review presentation. It also omits the failed-tool disclosure changes and lacks reproducible test steps. Describe the failed-tool, error, and rejected-review disclosures, including which recovery actions remain visible. Add test commands and the platforms tested.
Passed Passed checks: 3 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 identifies the primary change: grouping successful automatic reviews with routine activity.
  • 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.

Share

@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
  • 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: d720cf9a-dd3d-4682-93d9-0e9eceacedbd
Commits

Reviewing files that changed from the base of the PR and between 76f0f35 and 8f72836.

Files selected for processing: 26
  • mobile/src/session/MobileNativeChatAutoApprovalNotice.tsx
  • mobile/src/session/MobileNativeChatMessage.tsx
  • mobile/src/session/MobileNativeChatMessage.work-run.test.tsx
  • mobile/src/session/MobileNativeChatNoticeRow.tsx
  • mobile/src/session/MobileNativeChatToolRun.tsx
  • mobile/src/session/MobileNativeChatToolRunMembers.tsx
  • src/renderer/src/components/native-chat/NativeChatAssistantMessageRow.tsx
  • src/renderer/src/components/native-chat/NativeChatAutoApprovalNotice.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageRow.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageRow.work-run.test.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.auto-approval.test.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.appearance.test.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.test.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRunFailures.tsx
  • src/renderer/src/components/native-chat/native-chat-transcript-work-runs.test.ts
  • src/renderer/src/components/native-chat/use-native-chat-work-run.tsx
  • src/renderer/src/components/ui/collapsible.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/shared/native-chat-activity.test-fixture.ts
  • src/shared/native-chat-auto-approval.ts
  • src/shared/native-chat-notice.ts
  • src/shared/native-chat-tool-failures.ts
  • src/shared/native-chat-work-run.test.ts
  • src/shared/native-chat-work-run.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.

@gentslava gentslava changed the title feat: fold routine tools and successful reviews into compact activity feat: keep routine tools and completed approval notices compact Oct 25, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 26, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 26, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 26, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 26, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 26, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 27, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 27, 2026

@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.

🔇 Additional comments: 1
src/renderer/src/components/native-chat/NativeChatAutoApprovalNotice.tsx: 1

13-30: Trivial · Maintainability & Code Quality · Low value

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Reuse NATIVE_CHAT_NOTICE_COPY for the English fallbacks.

The mobile notice reads the outcome labels from NATIVE_CHAT_NOTICE_COPY (autoApprovalGranted, autoApprovalRejected, autoApprovalDenied, autoApprovalTimedOut, safetyCheckDenied). This file repeats the same strings as literals. NativeChatErrorNotice.tsx already passes NATIVE_CHAT_NOTICE_COPY.agentError as its fallback. If the two copies drift, desktop and mobile show different wording.

Use the shared constants as the fallbacks.

♻️ Proposed refactor
+import { NATIVE_CHAT_NOTICE_COPY } from '../../../../shared/native-chat-notice'
@@
 const OUTCOME_LABEL: Record<NativeChatAutoApprovalOutcome, () => string> = {
   approved: () =>
-    translate('components.native-chat.notices.autoApprovalGranted', 'Automatic approval granted'),
+    translate(
+      'components.native-chat.notices.autoApprovalGranted',
+      NATIVE_CHAT_NOTICE_COPY.autoApprovalGranted
+    ),
   rejected: () =>
-    translate('components.native-chat.notices.autoApprovalRejected', 'Automatic approval rejected'),
+    translate(
+      'components.native-chat.notices.autoApprovalRejected',
+      NATIVE_CHAT_NOTICE_COPY.autoApprovalRejected
+    ),
   denied: () =>
-    translate('components.native-chat.notices.autoApprovalDenied', 'Automatic approval denied'),
+    translate(
+      'components.native-chat.notices.autoApprovalDenied',
+      NATIVE_CHAT_NOTICE_COPY.autoApprovalDenied
+    ),
   'timed-out': () =>
     translate(
       'components.native-chat.notices.autoApprovalTimedOut',
-      'Automatic approval timed out'
+      NATIVE_CHAT_NOTICE_COPY.autoApprovalTimedOut
     ),
   'safety-denied': () =>
     translate(
       'components.native-chat.notices.safetyCheckDenied',
-      'Permission denied by safety check'
+      NATIVE_CHAT_NOTICE_COPY.safetyCheckDenied
     )
 }

As per coding guidelines: "Before writing new logic at any scale ... check whether an existing implementation already does the job. Extend or generalize it instead of building a parallel version."

Source: Coding guidelines


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: 051e7a00-6ae5-467e-a8ca-23a8f28f252d
Commits

Reviewing files that changed from the base of the PR and between abea827 and 3f34ae4.

Files selected for processing: 22
  • mobile/src/session/MobileNativeChatAutoApprovalNotice.tsx
  • mobile/src/session/MobileNativeChatErrorNotice.tsx
  • mobile/src/session/MobileNativeChatMessage.test.ts
  • mobile/src/session/MobileNativeChatMessage.work-run.test.tsx
  • mobile/src/session/MobileNativeChatNoticeRow.tsx
  • mobile/src/session/MobileNativeChatToolRun.test.tsx
  • mobile/src/session/MobileNativeChatToolRun.tsx
  • mobile/src/session/mobile-native-chat-message-render-mocks.test-fixture.ts
  • src/renderer/src/components/native-chat/NativeChatAutoApprovalNotice.tsx
  • src/renderer/src/components/native-chat/NativeChatErrorNotice.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageRow.work-run.test.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.auto-approval.test.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.test.tsx
  • src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.test.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.tsx
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/shared/native-chat-activity.test-fixture.ts
  • src/shared/native-chat-auto-approval.ts
  • src/shared/native-chat-notice.ts
  • src/shared/native-chat-work-run.ts
Files skipped from review as they are similar to previous changes: 2
  • src/shared/native-chat-notice.ts
  • src/renderer/src/i18n/locales/en.json

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

gentslava added a commit to gentslava/orca that referenced this pull request Oct 27, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 27, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 27, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 28, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 28, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 28, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 28, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 28, 2026
gentslava added a commit to gentslava/orca that referenced this pull request Oct 28, 2026
@gentslava
gentslava force-pushed the gentslava/upstream-compact-activity branch from e6009ab to 8756e37 Compare October 28, 2026 09:36
@gentslava gentslava changed the title feat: keep routine tools and completed approval notices compact Keep routine tools and completed approvals compact Oct 28, 2026
@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issue was found.

Summary

Keeps routine activity and completed permission notices compact on desktop and mobile.

  • Routine reviews and tool calls share one compact activity row.
  • Completed decisions and errors show short summaries that open to details.

No new actionable issues were found. Both earlier unnumbered findings are fixed. This review checked code and tests; it did not run tests or capture the UI.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Chat row] --> B{Row content}
  B -->|Tools or successful automatic review| C[Expandable activity]
  B -->|Completed error or denial| D[Compact notice]
  B -->|Pending question or approval| E[Response controls]
  C --> F[Open to read activity]
  D --> G[Open to read explanation and provider details]
Loading

Reviews (3) · Last reviewed commit: "Merge commit '8cc687818e59e455d355281c9c..." · Reviewed by Greptile

gentslava pushed a commit to gentslava/orca that referenced this pull request Oct 31, 2026
gentslava pushed a commit to gentslava/orca that referenced this pull request Oct 31, 2026
gentslava pushed a commit to gentslava/orca that referenced this pull request Oct 31, 2026
@gentslava
gentslava requested a review from Jinwoo-H as a code owner November 7, 2026 13:13

This branch has not been deployed

No deployments
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.

[Feature]: Group successful automatic reviews with routine chat activity

1 participant