Skip to content

feat(agent-chat): batch approvals — Deny all + context peek [blocked on runner collect window] - #5470

Merged
bekossy merged 4 commits into
feat/sessions-storage-reworkfrom
fe-feat/approval-batch-actions
Jul 28, 2026
Merged

feat(agent-chat): batch approvals — Deny all + context peek [blocked on runner collect window]#5470
bekossy merged 4 commits into
feat/sessions-storage-reworkfrom
fe-feat/approval-batch-actions

Conversation

@ardaerzin

Copy link
Copy Markdown
Contributor

Draft — dormant until the runner surfaces ≥2 approval gates at once. Stacks on feat/sessions-storage-rework.

What

When a turn parks on 2+ approval gates, the dock shows one card at a time, so "Approve all" was a blind click over hidden siblings. This turns the batch "Approve all" into a split button:

  • primary click still approves the whole batch,
  • the caret opens a peek listing every pending action (friendly tool name + one-line payload preview) so approving all is informed,
  • and offers an explicit turn-level Deny all — a warm reject of every open gate via resume (never inferred from a per-card Deny).

Per-card Deny/Approve unchanged. FE-only; a per-row read/write risk chip is a later increment. (Implements the Stop + context surface from the approved reject-siblings proposal, PR #5444.)

Why it's a draft / blocked

The UI only triggers when the dock sees ≥2 simultaneous pending gates. On the current base the runner parks concurrent gates together but the post-drain sweep force-defers all but the first (DEFERRED_NOT_EXECUTED), so the dock only ever shows one card — confirmed live on Pi and Claude. So this is dead-but-correct code until a small runner change surfaces the batch (hold parked siblings instead of deferring — the collect window; composes with #5382's per-card resume, no #5391 adapter work).

Discussion + the ask to Mahmoud: the reject-siblings Slack thread (approved proposal #5444).

Verification

  • oss tsc --noEmit clean in the changed file; prettier + eslint clean.

Do not merge until the runner surfaces the batch.

When a turn parks on 2+ approval gates the dock still shows one card at a time,
so "Approve all" was a blind click over the hidden siblings. Turn the batch
"Approve all" into a split button: the primary click still approves the whole
batch, but the caret opens a peek that lists every pending action (friendly tool
name + one-line payload preview) so approving all is informed, and offers the
explicit turn-level "Deny all".

Deny all is the deny counterpart to Approve all — a warm reject of every open
gate via resume (no teardown), never inferred from a per-card Deny. Per-card
Deny/Approve are unchanged for stepping one at a time. FE-only; a per-row
read/write risk chip is a later increment once the runner supplies the hint.
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6d577042-3fe1-4417-9288-b532dae098f8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

ApprovalDock adds batch “Deny all” handling and changes multi-gate approval actions to a split dropdown with payload previews and an explicit denial option.

Changes

Batch approval controls

Layer / File(s) Summary
Batch denial resolution
web/oss/src/components/AgentChatSlice/components/ApprovalDock.tsx
Tracks "deny-all" resolution, freezes all shown pending gates, and sends approved: false responses for each gate.
Split approval and preview UI
web/oss/src/components/AgentChatSlice/components/ApprovalDock.tsx
Replaces the multi-gate approval button with a split dropdown that previews collapsed, truncated inputs and exposes “Deny all”.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ApprovalDock
  participant PendingApprovalGates
  participant onApprovalResponse
  User->>ApprovalDock: Select Deny all
  ApprovalDock->>PendingApprovalGates: Collect shown pending gate IDs
  ApprovalDock->>onApprovalResponse: Send approved=false for each gate
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 change: batch approvals with Deny all and a context peek.
Description check ✅ Passed The description is directly related and accurately explains the batch approval split-button changes and blocker context.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fe-feat/approval-batch-actions

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.

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jul 28, 2026 8:09am

Request Review

@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
web/oss/src/components/AgentChatSlice/components/ApprovalDock.tsx (1)

61-62: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove or condense these implementation comments.

The helper and JSX structure already communicate the behavior; keep any necessary rationale to one short line.

  • web/oss/src/components/AgentChatSlice/components/ApprovalDock.tsx#L61-L62: remove or reduce to a one-line rationale.
  • web/oss/src/components/AgentChatSlice/components/ApprovalDock.tsx#L349-L353: remove or reduce to a one-line rationale.

As per coding guidelines, “Keep in-code comments to at most one short line; use longer comments only for genuinely surprising constraints such as bugs, races, or ordering requirements.”

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 184f21b2-e085-45eb-a6b7-baaec837be88

📥 Commits

Reviewing files that changed from the base of the PR and between 17dd3a1 and 35f7b28.

📒 Files selected for processing (1)
  • web/oss/src/components/AgentChatSlice/components/ApprovalDock.tsx

ardaerzin added a commit that referenced this pull request Jul 24, 2026
Stop is verified warm (§5 acceptance passes). Steer's 'message as model feedback' (§3) is NOT reachable pure-FE — both harnesses continue the original turn on reject and the ACP reply carries no text; the redirect needs runner path A or ACP-chain patch C. UI shipped flag-gated (#5477). Batch surfacing is a small runner change (#5470), not blocked by #5391.
ardaerzin added a commit that referenced this pull request Jul 24, 2026
…/Stop/steer) (#5444)

* docs(agent-workflows): reject-siblings approval policy proposal (Deny/Stop/steer)

* docs(agent-workflows): add task-5 implementation findings

Stop is verified warm (§5 acceptance passes). Steer's 'message as model feedback' (§3) is NOT reachable pure-FE — both harnesses continue the original turn on reject and the ACP reply carries no text; the redirect needs runner path A or ACP-chain patch C. UI shipped flag-gated (#5477). Batch surfacing is a small runner change (#5470), not blocked by #5391.
@ardaerzin
ardaerzin marked this pull request as ready for review July 27, 2026 11:02
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. Feature Request New feature or request Frontend labels Jul 27, 2026
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-production-1b09.up.railway.app/w
Project agenta-oss-pr-5470
Image tag pr-5470-a558831
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-07-28T08:17:58.357Z

…to fe-feat/approval-batch-actions

# Conflicts:
#	web/oss/src/components/AgentChatSlice/components/ApprovalDock.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Request New feature or request Frontend size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants